I set up tun device server on 1.2.3.4
socat -v -v -v -v -d -d TCP-LISTEN:11443,reuseaddr,fork TUN:10.3.33.20/16,up
I set up client 1:
socat TCP:1.2.3.4:11443 TUN:10.3.33.21/16,up
I can ping 10.3.33.20 from client 1
I set up client 2:
socat TCP:1.2.3.4:11443 TUN:10.3.33.22/16,up
I can't ping 10.3.33.20 from client 2 I can ping 10.3.33.20 from client 2 only if I terminate (ctrl+c) connection from client 1 (immediate effect)
Why? TUN device can't handle multiple connections? Or is that a socat limitation? How should I setup such simple tunneling so I don't have to setup separate listener for every client?
0 Answers