Dynamic DNS with Ubiquiti EdgeRouter (Vyatta)

This tutorial will walk you through the process of setting up Dynamic DNS on an EdgeRouter. In my network topology, the WAN is connected to `eth2`; change that to whatever interface you would like.

  1. Create an account with a supported service provider. If you do not want to use one of the below providers, I have written a different tutorial [[ddns-using-libcloud-edgerouter|here]]. As of now, they are:
    • [[http://dnspark.com/|DNS Park]]
    • [[http://www.dslreports.com/|DSL Reports]]
    • [[http://dyn.com|DynDNS]]
    • [[http://web.easydns.com/|Easy DNS]]
    • [[http://www.namecheap.com/|Name Cheap]]
    • [[http://www.sitelutions.com/|SiteLutions]]
    • [[http://www.zoneedit.com/|ZoneEdit]]
  2. Set the service provider, login, and password. Modify the service from `dyndns` to your service provider, and the username/password to match your credentials.
    {{{
    edit service dns dynamic interface eth2 service dyndns
    set login $USERNAME
    set password $PASSWORD
    }}}

  3. Set the hostname to update, modifying my domain for yours. You can also repeat this step for multiple host names.
    {{{
    set host-name dlasley.net
    }}}

  4. Commit and save
    {{{
    commit
    save
    }}}


Posted

in

by

Comments

8 responses to “Dynamic DNS with Ubiquiti EdgeRouter (Vyatta)”

  1. nikola Avatar
    nikola

    Hi,
    I have problem with updating dyndns,i do evrithing as shown in tutorial,i check username,password … evrithing is ok.
    My wan port is eth1,no ppoe or shomething.

    I got this massage in log

    ubnt ddclient[1048]: WARNING: file /var/cache/ddclient/ddclient_eth1.cache, line 3: Invalid Value for keyword ‘ip’ = ”

    1. dlasley Avatar

      That error message is somewhat ambiguous, but is definitely related to DDNS. Would you please email me your DDNS config (make sure to remove uname/passwd) and the outputs from the following commands: ‘show dns dynamic status’ and ‘show interfaces’?

  2. nikola Avatar
    nikola

    Here it is
    I tested dyndns acount on other routers (airRouter ubq and mikrotik)at the same modem (internet WAN) and its working fine

    I made a change WAN is eth0.

    LOG

    ubnt ddclient[2383]: WARNING: file /var/cache/ddclient/ddclient_eth0.cache, line 3: Invalid Value for keyword ‘ip’ = ”
    ubnt ddclient[2383]: WARNING: skipping update of ********.dyndns.org from to 188.252.****.****.

    ubnt@ubnt:~$ show dns dynamic status
    interface : eth0
    ip address :
    host-name : ********.dyndns.org
    last update : Sun Nov 17 10:50:42 2013
    update-status: noconnec

    ubnt@ubnt:~$ show interfaces
    Codes: S – State, L – Link, u – Up, D – Down, A – Admin Down
    Interface IP Address S/L Description
    ——— ———- — ———–
    br0 10.0.0.1/23 u/u
    eth0 188.252.***.***/22 u/u WAN
    eth1 – u/u LAN
    eth2 – u/u LAN2
    lo 127.0.0.1/8 u/u
    ::1/128

    1. dlasley Avatar

      The `ip address` statistic in your dynamic status looks off. I do not have that listed in my outputs, and it correlates to the error you are receiving. What is the output from `show service dns dynamic interface eth0` while in config mode?

  3. PeterD Avatar
    PeterD

    I’m getting the same problem on VC6.6R1. It seems that the IP address of the external facing NIC is not being picked up. I tried using ddclient on another system and was able to specify to ddclient to use checkip.org and it worked. But vyatta is not getting the external IP. The IP shows up fine in ‘show interfaces’. Does anyone know where the ‘ddclient.pl’ script is located in the vyatta sub system?

    show service dns dynamic interface eth1
    service easydns {
    host-name apophis.negativecontact.com
    host-name http://www.negativecontact.com
    login XXXXXXXX
    password XXXXXXXX
    server api.cp.easydns.com
    }

    Nov 24 11:36:59 NETRTRP144A ddclient[12846]: WARNING: file /var/cache/ddclient/ddclient_eth1.cache, line 3: Invalid Value for keyword ‘ip’ = ”
    Nov 24 11:36:59 NETRTRP144A ddclient[12846]: WARNING: file /var/cache/ddclient/ddclient_eth1.cache, line 4: Invalid Value for keyword ‘ip’ = ”
    Nov 24 11:36:59 NETRTRP144A ddclient[12846]: WARNING: skipping update of apophis.negativecontact.com from to 216.230.239.125.
    Nov 24 11:36:59 NETRTRP144A ddclient[12846]: WARNING: last updated but last attempt on Sun Nov 24 11:35:58 2013 failed.
    Nov 24 11:36:59 NETRTRP144A ddclient[12846]: WARNING: Wait at least 5 minutes between update attempts.
    Nov 24 11:36:59 NETRTRP144A ddclient[12846]: WARNING: skipping update of http://www.negativecontact.com from to 216.230.239.125.
    Nov 24 11:36:59 NETRTRP144A ddclient[12846]: WARNING: last updated but last attempt on Sun Nov 24 11:35:58 2013 failed.
    Nov 24 11:36:59 NETRTRP144A ddclient[12846]: WARNING: Wait at least 5 minutes between update attempts.

    1. dlasley Avatar

      Vyatta’s dynamic update script is located at `/opt/vyatta/sbin/vyatta-dynamic-dns.pl`. Line 106 (`$output .= “use=if, if=$interface\n\n\n”;`) is where the IP is assigned for DDNS. I have run into instances (such as double NAT) where you would need to change to use an external source so that you can get true public IP. Maybe try doing that here? Instructions are located here http://philipsilly.blogspot.com/2012/05/allowing-ddclient-on-vyatta-to-push-nat.html

  4. PeterD Avatar
    PeterD

    No joy. I tried that suggestion and still nothing has changed. I edited file to include ‘verbose=yes’ and while the IP is pulled from the site. It is not being assigned to the ‘ip’ = ” variable. Still working on this.

    1. dlasley Avatar

      Hmm that might mean that the issue is located in the ddclient configurations. Take a look in `/etc/ddclient/ddclient_ethX.conf`, there should be a statement similar to `use=if, if=eth2` that is specifying where to obtain the IP for the interface. Is your configuration maybe lacking that, or specifying something else? There is also a main configuration located at `/etc/ddclient.conf` that could contain the setting. These are being created by the perl script, so this will probably just be a confirmation of what we already know. I’ve uploaded the version of the script on my device to https://blog.laslabs.com/vyatta-dynamic-dns-pl/, would you post yours somewhere so that I may compare the differences?

Leave a Reply to dlasley Cancel reply

Your email address will not be published. Required fields are marked *