Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I wanted to know if it was possible to have a server running OpenVPN with server key and have multiple clients connect to it?

I would like the server to be 10.9.8.1, the first client to be 10.9.8.2 (this works) and have a third one be 10.9.8.3 so the three of them appear on the same private network. I couldn't manage to connect the third one, I get

TCP/UDP: Socket bind failed on local address [undef]:1194: Address already in use.

when I try to connect the third one to the VPN server.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Of course it's possible. The configuration you might want to try is tap rather than tun if you wonder about that, even though it might bit a bit harder to configure, it's easier to get hosts together in one network that way. You might need to enable client-to-client connections for that - there is a line for that commented out in example OpenVPN configs.

Your error is another matter, though. It means that the program using port 1194 (OpenVPN in that case) is already running, so you have to specify some other port in config, or make sure that the previous instance is off if it shouldn't be on.

ps ax | grep openvpn

If there is OpenVPN running and shouldn't be, and it has PID of, say, 1234 (first number on the left) you can type kill 1234 to turn it off.

share|improve this answer
    
Thanks a lot! This seems to do the trick :) if you can, could you explain a bit what is the difference between tun and tap, and why tap would be more appropriate here? Can I still use tun devices here? –  Noé Malzieu Apr 19 '13 at 17:26
    
In tap devices are like connected in one physical network with same address range. tun on the other hand makes device act as if they were on different networks and it requires special measures (ie. routing) for them to interconnect. It's hard to explain shortly if you don't know how it goes. Due to addresses you want to use in this case only tap is appropriate. –  TNW Apr 19 '13 at 18:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.