OpenVPN Client Try Multiple Ports
-
Good afternoon I am wondering if what I want to accomplish is possible.
I would like my OpenVPN client to try connecting first on UDP port 1194 but if that port is not open to failover to UDP port 80 and then finally TCP port 80.
I believe what I want to do is setup 2 OpenVPN servers on my pfSense box and then do 3 separate port forwards, UDP 1194 to UDP 1194, UDP 80 to UDP 1194 and finally TCP 80 to TCP 80 for the second OpenVPN server. This part I can handle without issue.
Where I am running into a problem is trying to configure the client so that it tries those ports in order to find one that is open if they are behind a restrictive firewall.
Can anyone shed some light on this or let me know if this is even possible.
Thank you.
-
You can list multiple remotes on the client side. I would just have multiple instances of OpenVPN on the firewall listening on different ports. You can just open the ports to your WAN address, no need to forward ports.
-
Do you know where I can find some documentation on how to add the additional connection options to the config file?
Thank you.
-
The OpenVPN website is a good start. If you are rolling you own config, just duplicate the remote line, with the port and protocol adjusted. If you are using the client export package, you can add the additional remote lines in the additional options box.
-
Look under the Advanced box ;)
Enter any additional options you would like to add to the OpenVPN client configuration here, separated by a semicolon
EXAMPLE: remote server.mysite.com 1194; or remote 1.2.3.4 1194;