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

    OpenVPN windows client vpn "Failover"?

    Scheduled Pinned Locked Moved OpenVPN
    10 Posts 4 Posters 1.5k 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
      AKFI
      last edited by

      Hello everybody,

      actually i'm looking for a new firewall and testing PFSense.

      I have got 2 wan connections using Gatewaygroups.

      Open VPN is listening on a Lan Interface. Ports were forwarded to Lan 1194 udp.

      That works gerat.

      VPN ist establised Roadwarrior. But what will happen if follwing occurs.

      WAN1 <- VPN <- Laptop
      WAN2 <- Internet connected.

      Wan1 goes down vpn goes down only Wan2 is available.

      Now i want the client to Change destination Address for the VPN-Connection to connect automatically to WAN2

      Ist that possible? Someone tried  before?

      Greez

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

        Try forwarding the port from the second WAN and using the 'auto magic multi-wan' option when you do the client export.

        1 Reply Last reply Reply Quote 0
        • P
          phil.davis
          last edited by

          I do (require) failover, so I use DynDNS. I make a name in my DynDNS account with a format like:
          remote-office-company.dyndns-ip.com

          A "real" example might be:
          remote-sydney-bigcorp.dyndns-ip.com

          (Using a format like that helps me make a unique name for each [office/connection point] that has not been used by someone else on DynDNS already.)

          Make a Gateway Group called RoadWarrior that has the primary WAN Tier1 and secondary WAN Tier 2.
          Add an entry in Services->Dynamic DNS to make that name update itself based on the RoadWarrior Gateway Group.
          Then select that DynDNS in "Host Name Resolution" when doing client export.

          The client will use remote-office-company.dyndns-ip.com when it tries to connect, and that should translate to the current public IP for reaching the OpenVPN server.

          DynDNS-Road-Warrior.png
          DynDNS-Road-Warrior.png_thumb

          As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
          If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

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

            Hey guys,

            thanks for answer!

            I already used auto magic …. but in .ovpn file there is no IP inside.

            That means the client doestn't know where to connect to.

            I already added two portforwardings for each wan connection.

            See my config. OpenVPN listens on "Lan" for OpenVPN connection.

            Portforward.JPG
            Portforward.JPG_thumb
            Wangroups.JPG
            Wangroups.JPG_thumb

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

              @phil.davis

              If i understand this correctly.

              I have two dyndns client names. Now which one do ich have to insert into the ovpn file. Or have to be both in there?

              Do you have an example file. Maybe yours and you change dns names in examples?

              I have for each connection a static IP. Normally i don't need an dyndns service.

              Maybe there ist a roundrobin possibility in Windows client.

              I'll try the follwing, add two lines in hosts.

              for Example

              10.0.0.1  akfi.de
              10.0.0.2  akfi.de

              edit .ovpn and insert akfi.de

              maybe that works… lets try.

              1 Reply Last reply Reply Quote 0
              • P
                phil.davis
                last edited by

                I edited my post to clarify - I was giving the naming format that I use, then an example.
                Just use 1 DNS name. The IP address for it will switch between the public IPs when the gateway group status changes (when the primary WAN fails or recovers).

                Then choose that name for "Host Name Resolution" when making Client Export packages.

                As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                1 Reply Last reply Reply Quote 0
                • DerelictD
                  Derelict LAYER 8 Netgate
                  last edited by

                  It would be nice to be able to set defaults for client export in a particular vpn instance.  I understand this pretty much means incorporating client export into pfSense instead of it being a package, but it sure would be nice.

                  Chattanooga, Tennessee, USA
                  A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                  DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                  Do Not Chat For Help! NO_WAN_EGRESS(TM)

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

                    @ phil.davis

                    thanks a lot. That would be a great possibility.

                    For tests i used hosts file.

                    It seems to work. In first tests. (Windows 7 32bit Pro)

                    Insert.
                    192.168.0.1 akfi.de
                    192.168.0.2 akfi.de

                    into Hosts file.

                    ping akfi.de

                    answer 192.168.0.1

                    now disconnect device .0.1

                    ping akfi.de

                    answer 192.168.0.2

                    It works using ping.

                    On other mobile devices Dyndns might be the better way.

                    Thanks a lot!!!

                    1 Reply Last reply Reply Quote 0
                    • P
                      phil.davis
                      last edited by

                      Yes, out on the public internet, if you do not already have your own public domain name infrastructure, then you will need to use some 3rd-party service.

                      As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                      If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                      1 Reply Last reply Reply Quote 0
                      • P
                        phil.davis
                        last edited by

                        @Derelict:

                        It would be nice to be able to set defaults for client export in a particular vpn instance.  I understand this pretty much means incorporating client export into pfSense instead of it being a package, but it sure would be nice.

                        I raised a feature on Redmine a while ago: https://redmine.pfsense.org/issues/3478

                        There is nothing to stop the OpenVPN Client Export package from being able to save some default settings. I thought about doing it but have not got around to it. I want 2.2 to happen more than I want this  ;)

                        As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                        If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

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