Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    OpenVPN Client Try Multiple Ports

    Scheduled Pinned Locked Moved OpenVPN
    5 Posts 3 Posters 2.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      abeauchamp
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • dotdashD
        dotdash
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • A
          abeauchamp
          last edited by

          Do you know where I can find some documentation on how to add the additional connection options to the config file?

          Thank you.

          1 Reply Last reply Reply Quote 0
          • dotdashD
            dotdash
            last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • T
              tomelgato
              last edited by

              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;

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.