Can OpenVPN work on both tcp and udp in one configuration?
Best Answer
up to my knowledge one tunnel cannot work with both udp and tcp.
on the other hand i have running configuration with tunnel broker supporting incoming both tcp connections and udp connections defined in separate config files.
Fortunately I figured out the issue, unfortunately it was my own mistake. A short while ago I was testing VPN over UDP on another server and thus had UDP connections on port 1194 redirected to the other server. The other server still had OpenVPN running, with a very similar certificate. So in fact, the error was correct, and was caused by connection to a different server when connecting using UDP. Although I feel stupid about making this mistake, I'm glad I actually figured out what went wrong.
The server log is very clear on why it's not working.
TCP/UDP: Socket bind failed on local address [undef]: Address already in use
You've got something else running on that combination of protocol/port. You can take a look what it is by doing netstat -nlp | grep 1234 (change port number accordingly) and kill that process or move that to another port.
Best Answer
up to my knowledge one tunnel cannot work with both udp and tcp.
on the other hand i have running configuration with tunnel broker supporting incoming both tcp connections and udp connections defined in separate config files.