Dynamic DNS not wollowing 'web-options'

I’m trying to setup DDNS on VyOS 1.4-rolling-202309050021, and running into an issue with web-options. I think this was changed from previous versions where it was use-web.

Currently in the configuration, when DDNS pushes the IP address, it pushes the local IP instead of the public IP address that is generated from the URL.

As an aside, the documentation still reflects the old commands, I’ve made a PR to try and update that document to reflect what I think is currently accurate for syntax: Update dns.rst by Dibins · Pull Request #1105 · vyos/vyos-documentation · GitHub

It does seem somewhat similar to a previous issue: does "use-web" actually work (dynamic dns)

Here is the dynamic dns configuration:

 dns {
     dynamic {
         address eth3 {
             service dyndns {
                 host-name <redacted>
                 host-name <redacted>
                 host-name <redacted>
                 host-name <redacted>
                 host-name <redacted>
                 host-name <redacted>
                 host-name <redacted>
                 host-name <redacted>
                 host-name <redacted>
                 host-name <redacted>
                 host-name <redacted>
                 host-name <redacted>
                 host-name <redacted>
                 password <redacted>
                 protocol namecheap
                 server dynamicdns.park-your-domain.com
                 username <redacted>
             }
             web-options {
                 url http://dynamicdns.park-your-domain.com/getip
             }
         }
     }
 }

Documentation rewrite is pending, I’ll get to that shortly.

Meanwhile, set service dns dynamic address web service ... is what you would need to use web-based IP detection as visible in the completion:

vyos@v15# set service dns dynamic address 
Possible completions:
 > <text>               Use interface to obtain the IP address
 > web                  Use HTTP(S) web request to obtain the IP address
 > eth0                 
 > lo                   

And then, if you want to use a custom web URL, you can do:

set service dns dynamic address web web-options url https://....

Note, please consider using https://... (HTTP over TLS) instead of http://...

1 Like

AHHHH - okay, so each record needs to be associated under web if I want that to work, I see how that works now, and it is working as I would expect it to, given the syntax you provided.

I’ll go update my pull request and try and add some detail, that didn’t intuitive with how I read the documents. Perhaps I can make it better for the next person.

One question, if I may - given the new syntax/design, is it not possible then to use the web based IP discovery to tie it to the IP of a specific nic? In my current design, I am doing wan-failover on this install as well. The main WAN connection is not one that I don’t want used in the ddns config, I wanted to use the pubic IP discovered when using the other WAN.

For example, I can curl --interface eth3 http://dynamicdns.park-your-domain.com/getip (I’ll work on moving to an HTTPS provider, this is my first attempt at setup.) and get the IP that I actually want DDNS to set.

AHHHH - okay, so each record needs to be associated under web if I want that to work, I see how that works now, and it is working as I would expect it to, given the syntax you provided.

I’ll go update my pull request and try and add some detail, that didn’t intuitive with how I read the documents. Perhaps I can make it better for the next person.

Awesome, thank you!

One question, if I may - given the new syntax/design, is it not possible then to use the web based IP discovery to tie it to the IP of a specific nic?

Good point! This is, unfortunately, a limitation of ddclient’s web based IP Address lookup. There are two possibilities that I can think of:

  • Configure dns dynamic as usual and then use event handler to force a ddclient refresh by runing op-mode command restart dns dynamic after the WAN connection fails over to the secondary WAN
  • Select a different routing path to reach the remote host of the web URL that provides the IP address and make that host routable only via the secondary WAN

For example, I can curl --interface eth3 http://dynamicdns.park-your-domain.com/getip (I’ll work on moving to an HTTPS provider, this is my first attempt at setup.) and get the IP that I actually want DDNS to set.

This is another possibility - exposing cmd based IP Address lookup (like curl, dig, wget, ip etc.). This might be too powerful to expose as a CLI configuration because of the inherent risk of ending up being misconfigured. I did consider implementing this (cmd based IP lookup) during the big dns dynamic rewrite but held back because of this.

Ahh! The routing idea probably can work for me here. We’ll be swapping ISPs soon, and the new one will be the one that I will be able to let change without having to deal with using the secondary WAN as my actual WAN for hosting things on.

I’ve added comments here: Update dns.rst by Dibins · Pull Request #1105 · vyos/vyos-documentation · GitHub (hopefully that link works). I think I explained it well, but please feel free to provide any feedback!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.