Score:0

Socat TUN listener can't handle multiple connections?

ru flag
ndd

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?

Martin avatar
kz flag
fork TUN: creates for every incoming connection a tun device with the specified address. My guess is that the TUN driver refuses to create a second interface with the same IP, as every IP must be unique within one kernel namespace.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.