What's new

Dual WAN - Dual DDNS?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

peraburek

Senior Member
@Merlin

1. is it possible to add second DDNS account for secondary WAN in Load-Balancing setup
or
2. is it possible to force router to update primary/only DDNS account in Fail-Over setup

I have managed to get Fail-Over working with Huawei E3372 LTE (4G) USB dongle
I am using ASUS RT-N66U with current Merlin release 378.54_2 FW

when primary WAN goes down, is it possible to do the following (maybe with a script)?
1. clear DNS cache (flush DNS?)
2. update DDNS with new public IP
3. repeat step 1 and 2 when primary WAN comes back

scenario:
I use DDNS hostname to access Remote Desktop on one of the workstations
it all works fine on primary WAN, however in fail-over mode when primary WAN goes down, and secondary WAN is UP and running, DDNS hostname is not updated with new IP unfortunatelly and I can not use hostname anymore to connect to remote computer (or ping my router from Internet)

this is particulary bad on dynamic IP that changes with every connection so DDNS is the only solution here AFAIK (there is no option to go for static IP)
friends have confirmed Internet is

These are two small changes would further improve Merlin FW which is great anyway!
I believe that ASUS would incorporate these changes in their code if somebody gets that done
Thank you for understanding

here is log
Code:
Jun 17 16:06:48 dnsmasq[2427]: read /etc/hosts - 5 addresses
Jun 17 16:06:48 dnsmasq[2427]: read /etc/hosts.dnsmasq - 1 addresses
Jun 17 16:06:48 dnsmasq-dhcp[2427]: read /etc/ethers - 5 addresses
Jun 17 16:06:48 dnsmasq[2427]: using nameserver 192.168.5.1#53 for domain local
Jun 17 16:06:48 dnsmasq[2427]: using nameserver 192.168.5.1#53 for domain Home
Jun 17 16:06:48 dnsmasq[2427]: using nameserver 192.168.5.1#53
Jun 17 16:06:50 WAN(0) Connection: Fail to connect with some issues.
Jun 17 16:06:50 stop_nat_rules: apply the redirect_rules!
Jun 17 16:06:52 rc_service: wanduck 276:notify_rc restart_wan_if 1
Jun 17 16:06:54 pppd[1374]: Connection terminated.
Jun 17 16:06:54 pppd[1374]: Sent PADT
Jun 17 16:06:54 pppd[1374]: Modem hangup
Jun 17 16:06:58 pppd[3034]: pppd 2.4.7 started by admin, uid 0
Jun 17 16:07:07 pppd[3034]: Serial connection established.
Jun 17 16:07:07 pppd[3034]: Using interface ppp0
Jun 17 16:07:07 pppd[3034]: Connect: ppp0 <--> /dev/ttyUSB1
Jun 17 16:07:09 pppd[3034]: Could not determine remote IP address: defaulting to 10.64.64.64
Jun 17 16:07:09 pppd[3034]: not replacing existing default route via 192.168.5.1
Jun 17 16:07:09 pppd[3034]: local  IP address 88.125.124.87
Jun 17 16:07:09 pppd[3034]: remote IP address 10.64.64.64
Jun 17 16:07:09 pppd[3034]: primary   DNS address 195.29.166.120
Jun 17 16:07:09 pppd[3034]: secondary DNS address 195.29.166.121
Jun 17 16:07:09 rc_service: ip-up 3085:notify_rc start_firewall
Jun 17 16:07:09 dnsmasq[2427]: read /etc/hosts - 5 addresses
Jun 17 16:07:09 dnsmasq[2427]: read /etc/hosts.dnsmasq - 1 addresses
Jun 17 16:07:09 dnsmasq-dhcp[2427]: read /etc/ethers - 5 addresses
Jun 17 16:07:09 dnsmasq[2427]: using nameserver 195.29.166.121#53 for domain local
Jun 17 16:07:09 dnsmasq[2427]: using nameserver 195.29.166.120#53 for domain local
Jun 17 16:07:09 dnsmasq[2427]: using nameserver 192.168.5.1#53 for domain local
Jun 17 16:07:09 dnsmasq[2427]: using nameserver 192.168.5.1#53 for domain Home
Jun 17 16:07:09 dnsmasq[2427]: using nameserver 192.168.5.1#53
Jun 17 16:07:09 dnsmasq[2427]: using nameserver 195.29.166.120#53
Jun 17 16:07:09 dnsmasq[2427]: using nameserver 195.29.166.121#53
Jun 17 16:07:09 wan: finish adding multi routes
Jun 17 16:07:09 start_nat_rules: apply the nat_rules(/tmp/nat_rules__eth0)!
Jun 17 16:07:25 rc_service: wanduck 276:notify_rc restart_wan_if 0
Jun 17 16:07:25 rc_service: waitting "start_firewall" via  ...
Jun 17 16:07:28 custom script: Running /jffs/scripts/firewall-start (args: )
Jun 17 16:07:29 pppd[1374]: Unable to complete PPPoE Discovery
Jun 17 16:07:29 pppd[1374]: Hangup (SIGHUP)
Jun 17 16:07:29 pppd[1374]: Terminating on signal 15
Jun 17 16:07:29 pppd[1374]: Exit.
Jun 17 16:07:29 kernel: Attempt to kill tasklet from interrupt
Jun 17 16:07:29 kernel: br0: port 1(vlan1) entering disabled state
Jun 17 16:07:29 kernel: br0: port 1(vlan1) entering listening state
Jun 17 16:07:29 kernel: br0: port 1(vlan1) entering learning state
Jun 17 16:07:29 kernel: br0: topology change detected, propagating
Jun 17 16:07:29 kernel: br0: port 1(vlan1) entering forwarding state
Jun 17 16:07:32 rc_service: udhcpc 3133:notify_rc start_firewall
Jun 17 16:07:32 rc_service: waitting "restart_wan_if 0" via wanduck ...
Jun 17 16:07:40 rc_service: wanduck 276:notify_rc restart_wan_line 1
Jun 17 16:07:40 rc_service: waitting "restart_wan_if 0" via wanduck ...
Jun 17 16:07:50 rc_service: skip the event: restart_wan_line 1.
Jun 17 16:07:50 WAN(1) Connection: Ethernet link down.
Jun 17 16:08:02 rc_service: skip the event: start_firewall.
Jun 17 16:08:02 dhcp client: bound 192.168.5.10 via 192.168.5.1 during 86400 seconds.
Jun 17 16:08:02 dnsmasq[2427]: read /etc/hosts - 5 addresses
Jun 17 16:08:02 dnsmasq[2427]: read /etc/hosts.dnsmasq - 1 addresses
Jun 17 16:08:02 dnsmasq-dhcp[2427]: read /etc/ethers - 5 addresses
Jun 17 16:08:02 dnsmasq[2427]: using nameserver 195.29.166.121#53 for domain local
Jun 17 16:08:02 dnsmasq[2427]: using nameserver 195.29.166.120#53 for domain local
Jun 17 16:08:02 dnsmasq[2427]: using nameserver 192.168.5.1#53 for domain local
Jun 17 16:08:02 dnsmasq[2427]: using nameserver 192.168.5.1#53 for domain Home
Jun 17 16:08:02 dnsmasq[2427]: using nameserver 192.168.5.1#53
Jun 17 16:08:02 dnsmasq[2427]: using nameserver 195.29.166.120#53
Jun 17 16:08:02 dnsmasq[2427]: using nameserver 195.29.166.121#53
Jun 17 16:08:02 pppd[3178]: Plugin rp-pppoe.so loaded.
Jun 17 16:08:02 pppd[3178]: RP-PPPoE plugin version 3.11 compiled against pppd 2.4.7
Jun 17 16:08:02 pppd[3179]: pppd 2.4.7 started by admin, uid 0
Jun 17 16:08:07 pppd[3179]: PPP session is 63107 (0xf683)
Jun 17 16:08:07 pppd[3179]: Connected to 50:57:a8:83:2d:41 via interface eth0
Jun 17 16:08:07 pppd[3179]: Couldn't allocate PPP unit 0 as it is already in use
Jun 17 16:08:07 pppd[3179]: Using interface ppp1
Jun 17 16:08:07 pppd[3179]: Connect: ppp1 <--> eth0
Jun 17 16:08:08 pppd[3179]: CHAP authentication succeeded
Jun 17 16:08:08 pppd[3179]: CHAP authentication succeeded
Jun 17 16:08:08 pppd[3179]: peer from calling number 50:57:A8:83:2D:41 authorized
Jun 17 16:08:08 pppd[3179]: local  IP address 89.164.163.162
Jun 17 16:08:08 pppd[3179]: remote IP address 213.191.132.188
Jun 17 16:08:08 pppd[3179]: primary   DNS address 213.191.128.8
Jun 17 16:08:08 pppd[3179]: secondary DNS address 213.191.128.9
Jun 17 16:08:08 rc_service: ip-up 3197:notify_rc start_firewall
Jun 17 16:08:08 dnsmasq[2427]: read /etc/hosts - 5 addresses
Jun 17 16:08:08 dnsmasq[2427]: read /etc/hosts.dnsmasq - 1 addresses
Jun 17 16:08:08 dnsmasq-dhcp[2427]: read /etc/ethers - 5 addresses
Jun 17 16:08:08 dnsmasq[2427]: using nameserver 195.29.166.121#53 for domain local
Jun 17 16:08:08 dnsmasq[2427]: using nameserver 195.29.166.120#53 for domain local
Jun 17 16:08:08 dnsmasq[2427]: using nameserver 192.168.5.1#53 for domain local
Jun 17 16:08:08 dnsmasq[2427]: using nameserver 192.168.5.1#53 for domain Home
Jun 17 16:08:08 dnsmasq[2427]: using nameserver 213.191.128.9#53 for domain local
Jun 17 16:08:08 dnsmasq[2427]: using nameserver 213.191.128.8#53 for domain local
Jun 17 16:08:08 dnsmasq[2427]: using nameserver 213.191.128.8#53
Jun 17 16:08:08 dnsmasq[2427]: using nameserver 213.191.128.9#53
Jun 17 16:08:08 dnsmasq[2427]: using nameserver 195.29.166.120#53
Jun 17 16:08:08 dnsmasq[2427]: using nameserver 195.29.166.121#53
Jun 17 16:08:08 wan: finish adding multi routes
Jun 17 16:08:08 start_nat_rules: apply the nat_rules(/tmp/nat_rules_ppp0__dev_ttyUSB1)!
Jun 17 16:08:08 custom script: Running /jffs/scripts/firewall-start (args: ppp0)
Jun 17 16:08:10 WAN(1) Connection: WAN was restored.
 
Last edited:
These are two small changes would further improve Merlin FW which is great anyway!

Those aren't "small", they are quite complicated.

I believe that ASUS would incorporate these changes in their code if somebody gets that done

So you're saying I should do it for free, so Asus does not have to pay their developers to do it? Eh.

You should ask them directly, as I don't touch the Dual WAN code. It's too complex (and undocumented, so I don't know how it actually works).
 
"There are old programmers, and there are bold programmers - but there are no old and bold programmers."

And for good reason. I haven't even looked at the code, but I can say that such a feat (dual WAN failover) is not a "small change". I'd say that if you're in real need of that feature, you might want to look at more enterprise-type routers that provide that feature.
 
I am very new to this Dual Wan router on Merlin however I noticed this issue last night when I was playing with the setting right after installing on my RT-N16. Playing with the VPN it squawked about needing to set up DDNS.

I had Dual Wan set and used the failover mode which understandibly only showed 1 DDNS setup. I enabled load balancing and that still onky showed 1 DDNS. Bummer.

Then I remembered that my Foscam web cam always sent me an e-mail when the WAN IP changed. Off to the Web cam, and sure enough there was a xxx.myfoscam.org setting as well as a place to insert a second one.

Sure enough, a ping to the xxx.foscam.org returns my current WAN IP.

While this may be a hack, it does seem to work for me.

If you have a web cam, poke around in the configuration and see what is there.
 
@Merlin
I have managed to get Fail-Over working with Huawei E3372 LTE (4G) USB dongle
I am using ASUS RT-N66U with current Merlin release 378.54_2 FW

I have Huawei E3372 USB dongle too and I can't make it work with AsusWRT Merlin. I downloaded latest package for RT-N66U and it fails same way as original firmware does. Router is able to see that Huawei mass storage device is connected but it can't understand that there is modem too.

How did you made E3372 work with RT-N66U?
 
I have Huawei E3372 USB dongle too and I can't make it work with AsusWRT Merlin. I downloaded latest package for RT-N66U and it fails same way as original firmware does. Router is able to see that Huawei mass storage device is connected but it can't understand that there is modem too.

How did you made E3372 work with RT-N66U?
Earned make it work correctly in Ac68u huawei e3372?
I have many problems in navigation, even in online games.
 
@Merlin

1. is it possible to add second DDNS account for secondary WAN in Load-Balancing setup
or
2. is it possible to force router to update primary/only DDNS account in Fail-Over setup

I have managed to get Fail-Over working with Huawei E3372 LTE (4G) USB dongle
I am using ASUS RT-N66U with current Merlin release 378.54_2 FW

when primary WAN goes down, is it possible to do the following (maybe with a script)?
1. clear DNS cache (flush DNS?)
2. update DDNS with new public IP
3. repeat step 1 and 2 when primary WAN comes back

scenario:
I use DDNS hostname to access Remote Desktop on one of the workstations
it all works fine on primary WAN, however in fail-over mode when primary WAN goes down, and secondary WAN is UP and running, DDNS hostname is not updated with new IP unfortunatelly and I can not use hostname anymore to connect to remote computer (or ping my router from Internet)

this is particulary bad on dynamic IP that changes with every connection so DDNS is the only solution here AFAIK (there is no option to go for static IP)
friends have confirmed Internet is

These are two small changes would further improve Merlin FW which is great anyway!
I believe that ASUS would incorporate these changes in their code if somebody gets that done
Thank you for understanding

Did you try to access your router from outside through USB WAN? Did your USB modem pass incoming traffic?

fixed by:
1. running DDNS update client on both: router and server PC with same "login/pass/domain" settings
2. point DMZ ip address on usb modem to local server's ip
 
Last edited:
There was another thread that was similar to this - can't find it at the moment, but OP had a similar question, and the resolution was not to do change the router, but to change the DDNS configuration at the DNS side
 
Correct me if I'm wrong, but this mean that I can still use DDNS with Dual WAN but DDNS will only work with primary network in fail over mode, right? I'm planning to add 3G router(1GB 3G, and unlimited edge for 3 dollars) as my backup network which should let me surf a few websites.
 
Correct me if I'm wrong, but this mean that I can still use DDNS with Dual WAN but DDNS will only work with primary network in fail over mode, right? I'm planning to add 3G router(1GB 3G, and unlimited edge for 3 dollars) as my backup network which should let me surf a few websites.

No, it means that you can use one DDNS provider and two WAN IP's, as the domain/dns entry is seperate from the IP addresses it's bound to..

One can have a single domain with multiple IP addresses behind it... but you need to do it at the DNS level... check with your DDNS provider for details.
 
No, it means that you can use one DDNS provider and two WAN IP's, as the domain/dns entry is seperate from the IP addresses it's bound to..

One can have a single domain with multiple IP addresses behind it... but you need to do it at the DNS level... check with your DDNS provider for details.
I use Asus.com as DDNS provider. Even if I use fail over mode, it the domain will still have 2 WAN IP's? Because my secondary network will be Edge netwokr (384Kbps) while my main network is a lot faster. So do you what happen if I use ASUS DDNS?
 
Maybe you need a better DDNS provider then - dyndns is pretty cool ;)
 
Maybe you need a better DDNS provider then - dyndns is pretty cool ;)
So Asus DDNS is not good? Is dyndns free? Will there be a problem if my WAN IP address change like every 5 minutes?
 
You get what you pay for... dyndns ain't free anymore
Just saw the price, not too expensive. I will think about it. Thanks
 
I was thinking about this and thought you might be able to do this by having two update clients running on your network (one on the router) and use routing rules to send each one down a different WAN connection.
Alternatively, if you can whip up a script to resolve your two WAN ips by a different means then you could probably just invoke the DynDNS update service manually for each one. It'll just be an HTTP POST I imagine...
 
I was thinking about this and thought you might be able to do this by having two update clients running on your network (one on the router) and use routing rules to send each one down a different WAN connection.
Alternatively, if you can whip up a script to resolve your two WAN ips by a different means then you could probably just invoke the DynDNS update service manually for each one. It'll just be an HTTP POST I imagine...
I don't understand yet what you mean, but what if I only want the Primary IP to be working with just one DDNS service, will that be possible? And is it possible to use Asus DDNS Service?
 
I made a DDNS script to cover my quite complex needs and lazyness, and the only thing I did not try (have) is double WAN situation. But, if I would have to guess, speaking with my script in mind:

1. If one WAN is main and other is bacup, I see no problem. When IP changes (from main to backup or back), routing also changes, DDNS gets updated. Script would not care. DDNS service should not mind many updates with new IPs. But, if that new address will be seen quicly enough is another matter and DDNS service dependant.

2. If two WANs are used for load balancing (simultaneously), obviously DDNS script must be explicitly told to either use only one particular interface or update both at the same time. I do not know how routing is done in that second situation, but variant 2.1 should be very simple, for 2.2 I can not comment as I do not know how roouting is done. But, since obviously there must be a way to use 2 routes at the same time, script would also not care about updating 2 hostnames more, once that is solved.
 
1. If one WAN is main and other is bacup, I see no problem. When IP changes (from main to backup or back), routing also changes, DDNS gets updated. Script would not care. DDNS service should not mind many updates with new IPs. But, if that new address will be seen quicly enough is another matter and DDNS service dependant.

this was NOT working with 378.54_2 FW, I didn't tried it later with 380.58 or 380.59 (I am using DynDNS service)
your IP is not updated by router when router do failover from WAN to 3G/4G USB
I have checked logs at DynDNS there is no request for update after WAN is down, and my 4G backup is running fine
it should be reported to ASUS FW team, they should address this issue
 
this was NOT working with 378.54_2 FW,...
your IP is not updated by router when router do failover from WAN to 3G/4G USB
I have checked logs at DynDNS

Do not look at DynDNS. Look at the router.

1. at the first page of Web interface, it shows if DDNS is updated. If a red fllag is after your hostame, it did not get updated for the current WAN IP address.

2. That (1) is providing a router knows actual WAN IP address. Do not assume that.

3. Double NAT may be a factor here, likely, if occurs.

To test:

1. connect with primary WAN
ssh and enter:

Code:
ip route get 8.8.8.8

2. Yank primary wan out of the router
issue the same comand as above

Post results (but, my logic and single WAN experince may be useless, and I might be completely wrong).
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top