Reply
Highlighted
Emerging Member
Posts: 54
Registered: ‎11-10-2014
Kudos: 20
Solutions: 1

DDNS two services requiring Dyndns service type (protocol dyndns2) hack

I use No-ip.com for DDNS and Tunnekbroke.net (Hurricane Electric) for my 6in4 tunnel.  Both require me to update them when my public IP address changes using a dyndns service type (protocol dyndns2).  The CLI tool will not setup more than dyndns service and will not allow you to override protocol of another service.
After spending many hours over several days I found this thread that edits the script that generates ddclient configuration files.  When I looked at the file I was able to override the protocol by adding a single line to its switch statement.  I chose to add the namecheap line.

 

       switch ($service) {
           case "dslreports" {$service="dslreports1";}
           case "dyndns"     {$service="dyndns2";}
           case "namecheap"  {$service="dyndns2";}
           case "zoneedit"   {$service="zoneedit1";}
           case "afraid"     {$service="freedns";}
       }

I recommend Putty to SSH into the router.  You can download the Windows version here

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Everything is case sensitive

 

sudo i
cd /opt/vyatta/sbin
cp vyatta-dynamic-dns.pl vyatta-dynamic-dns.pl.bak
vi vyatta-dynamic-dns.pl
:/case
o
           case "namecheap"  {$service="dyndns2";}
escape
:x
Exit (returns you to admin)

 

configure
set service dns dynamic interface eth1 service dyndns host-name YOURHOST.DOMAIN.COM
set service dns dynamic interface eth1 service dyndns server dynupdate.no-ip.com
set service dns dynamic interface eth1 service dyndns login YOURUSERNAME
set service dns dynamic interface eth1 service dyndns password YOURPASSWORD
set service dns dynamic interface eth1 service namecheap host-name yourtunnelid
set service dns dynamic interface eth1 service namecheap server ipv4.tunnelbroker.net/nic/update
set service dns dynamic interface eth1 service namecheap login yourhelogin
set service dns dynamic interface eth1 service namecheap password yourhepassword
commit
save
exit

 

the password is the Tunnel specific authentication key if your tunnel has one else it is your tunnelbroker password

https://forums.he.net/index.php?topic=1994.0

When you upgrade the router firmware you may need to reinsert the case statement.  You may also need to add the server lines.

Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5429
Solutions: 1656
Contributions: 2

Re: DDNS two services requiring Dyndns service type (protocol dyndns2) hack

Nice work, thanks for sharing! Yeah this is a limitation caused by the original configuration design (using the protocol name as the "service" which has to be unique). Perhaps we should look into a way to allow user-defined service or something like that.

Emerging Member
Posts: 54
Registered: ‎11-10-2014
Kudos: 20
Solutions: 1

Re: DDNS two services requiring Dyndns service type (protocol dyndns2) hack

I would start by posting a question asking users what DDNS services they currently use and what services they would like to use.

New Member
Posts: 17
Registered: ‎09-15-2015
Kudos: 2
Solutions: 1

Re: DDNS two services requiring Dyndns service type (protocol dyndns2) hack

Any chance you can help out a n00b?

I am using no-ip too but I can't get it to work. What steps do I have to take?

Emerging Member
Posts: 54
Registered: ‎11-10-2014
Kudos: 20
Solutions: 1

Re: DDNS two services requiring Dyndns service type (protocol dyndns2) hack

With 1.7 and latter firmware you can set up a custom service from the GUI.

You don't need a CLI hack.

Reply