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

    Specifying an Alternate Wan address for dyndns

    Scheduled Pinned Locked Moved Routing and Multi WAN
    3 Posts 3 Posters 2.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.
    • N
      nitrus10032
      last edited by

      My current setup contains two WAN interfaces.  I'm using the second as failover incase the primary goes down (business environment with VoIP and asterisk).  I've found it useful to be able to connect in situations when the primary is down, unfortunately my secondary interface is just a cheap DSL connection with a dynamic IP.  I wanted to use dynamic dns with an alternate interface instead of the normal WAN.  One work around would be to put the secondary connection onto the WAN interface and enable DNS.  I didn't like this idea so I decided to hack around in the source code on the box.  Here's what i came up with.

      I modified the service_dyndns.php to add another field to select an alternate WAN interface (copied code from the load balancer edit section).

      Then i modified the services.inc to lookup the name of this new field and get the IP address.  I also modified the call to updatedns() to include the wan ip.

      I subsituted all the calls to get_wan_ip_address (or whatever it is) and used the internal _dnsWanip instead.

      I also modified all the CURL options to use the desired interface as the outbound connection to use (i use zoneedit so this was required).

      I haven't tested this with all dyndns providers and i need to make sure it works for them all.  However,  I don't want to bother if there is no community interest in this feature.

      If you think this feature is useful, let me know and I'll finish the development and test it against all dyndns providers, then post the necessary patch or put it in the develoeprs mailing list.

      1 Reply Last reply Reply Quote 0
      • S
        sullrich
        last edited by

        There is very much interest in this.  Ultimately if you can allow for DynDNS to work on multiple interfaces, that would be swell.

        1 Reply Last reply Reply Quote 0
        • E
          eri--
          last edited by

          Just for completeness.
          1.3 has support for multiple DYNDNS accounts on multiple interfaces. In fact you can even run multiple dydns services on the same interface.

          Ermal

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