Can OpenVPN work on both tcp and udp in one configuration?
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.
This is an old question, but generally you do not want to use OpenVPN under TCP because it results in more network traffic.
For example with OpenVPN under UDP, sending single user tcp message looks like this:
With OpenVPN under TCP, every OpenVPN message is also TCP, so it has to get ack'd, including the acks that are part of the embedded stream. The same message looks like this:
Also TCP headers are a bit bigger.
With OpenVPN over UDP, the internal TCP layer will take care of any retransmits. The main disadvantage of UDP is that the connection can't tell whether it is really up or not. The default OpenVPN configuration handles this by setting a periodic keepalive ping.