DDNS does not work

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Goto page 1, 2  Next
Author Message
stanzani
DD-WRT Novice


Joined: 06 Mar 2021
Posts: 22

PostPosted: Tue Mar 09, 2021 9:19    Post subject: DDNS does not work Reply with quote
Hello forum
I have just installed the DD-WRT firmware Firmware: DD-WRT v3.0-r45849 std (02/25/21) to a Netgear X8 R8500 (A). I am currently connected to the internet via VDSL using a Zyxel modem/router (B) which is connected to A-R though a static route (see post https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1231239#1231239)
In my previous setup I used just B-MR and DDNS worked fine. Now I disable DDNS on B-MR and enabled it on A-R and it does not work. Should I disable DHCP on B-MR? Should I create a new NAT rule on A-R? Should I set to yes 'Úse external IP Check'?

Status looks OK
Tue Mar 9 11:35:44 2021: INADYN: Started 'INADYN Advanced version 1.96-ADV' - dynamic DNS updater.
Tue Mar 9 11:35:44 2021: INADYN: IP read from cache file is 'n.m.i.j'. No update required.

but I cannot ping.

If I disable dynamic DNS on router A and enable on modem-router B I can ping but still I cannot access myserver from outside

VPN is active but this should not care right?
Please help

Thanks much


Last edited by stanzani on Wed Mar 10, 2021 10:34; edited 1 time in total
Sponsor
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 9157

PostPosted: Wed Mar 10, 2021 3:12    Post subject: Reply with quote
What does A-R, B-R, and B-MR mean?
_________________
ddwrt-ovpn-split-basic.sh (UPDATED!) * ddwrt-ovpn-split-advanced.sh (UPDATED!) * ddwrt-ovpn-client-killswitch.sh * ddwrt-ovpn-client-watchdog.sh * ddwrt-ovpn-remote-access.sh * ddwrt-ovpn-client-backup.sh * ddwrt-mount-usb-drives.sh * ddwrt-blacklist-domains.sh * ddwrt-wol-port-forward.sh * ddwrt-dns-monitor.sh (NEW!)
stanzani
DD-WRT Novice


Joined: 06 Mar 2021
Posts: 22

PostPosted: Wed Mar 10, 2021 10:30    Post subject: Reply with quote
A-R is router A Netgear X8 R8500 (A-R)
B-MR is the Zyxel modem/router (B-MR)
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Wed Mar 10, 2021 10:52    Post subject: Reply with quote
I already tried to explain it to you but I will try once more.

DDNS takes your WAN IP address and places that in the DNS record.

Your router B is a secondary router which does not have a public IP address so the WAN IP address is not working here.

DDWRT's DDNS implementation has a trick to overcome this if you enable/YES for "External IP check" then it will use a similar query like you are doing with browsing to ipleak.net (and the likes) so it will find your public IP address.

So from a secondary router you should enable this.

However if you are using a VPN client on this secondary router then the external IP address is the IP address of your VPN provider.

So you better set DDNS on router A.

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
stanzani
DD-WRT Novice


Joined: 06 Mar 2021
Posts: 22

PostPosted: Wed Mar 10, 2021 11:14    Post subject: Reply with quote
Thanks for your reply and please forgive my donkeyness

I tried your suggestion but I cannot ping my ddns host also in the last case (DDNS enabled on modem router and disabled on secondary router). All ports looks closed if I check with https://www.portcheckers.com/ and I cannot ping by dynamic IP hostname

I am now working in the NAT/QoS tab of B and I wonder how should I set the 'Source address' field. I guess I should set to the IP of B (address are inside the LAN of B) but does not work


Last edited by stanzani on Wed Mar 10, 2021 12:01; edited 1 time in total
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Wed Mar 10, 2021 11:42    Post subject: Reply with quote
IF you want to reach anything on the LAN of secondary router B you have to set a port forward on router A and a port Forward on Router B for that client on LAN B.
(and yes you can also set a static route on router A and open the firewall of router B but that is for the advanced class)

When you are using a VPN client on router B it will not work at all because traffic goes in in the WAN interface and by default routes out via the VPN and that will be blocked.
In that case you have to use Policy Based Routing for the VPN client.

First disable the VPN client and then get Port forward working after it works you can enable the client and start working on PBR

Port forwarding wiki:
https://wiki.dd-wrt.com/wiki/index.php/Port_Forwarding

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
stanzani
DD-WRT Novice


Joined: 06 Mar 2021
Posts: 22

PostPosted: Wed Mar 10, 2021 12:14    Post subject: Reply with quote
egc wrote:

In that case you have to use Policy Based Routing for the VPN client.

First disable the VPN client and then get Port forward working after it works you can enable the client and start working on PBR

OK I disable the VPN client on router B and port forwarding is working finally
What about PBR? I found this but no practical example case here
https://wiki.dd-wrt.com/wiki/index.php/OpenVPN#OpenVPN_in_DD-WRT

In practice Should I add just the IP list I want go from/to the WAN by VPN?



Thanks
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Wed Mar 10, 2021 12:39    Post subject: Reply with quote
One of these days after I clone myself I must ask wiki access Smile

We have an "excellent" PBR guide (and I am not saying that because I wrote it LoL)

For some recent VPN documentation which is a sticky in the advanced networking forum:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=327398

PBR guide:
https://forum.dd-wrt.com/phpBB2/download.php?id=44547

But basically set all IP addresses which you want to use the VPN in the PBR box, use CIDR notation (explained there)

Of course the routers own address must not be set there

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
stanzani
DD-WRT Novice


Joined: 06 Mar 2021
Posts: 22

PostPosted: Wed Mar 10, 2021 16:24    Post subject: Reply with quote
This works fine. Thank you so much for teaching advanced stuff Smile
stanzani
DD-WRT Novice


Joined: 06 Mar 2021
Posts: 22

PostPosted: Fri Mar 19, 2021 8:04    Post subject: Reply with quote
I am sorry but for some black magic this is not working any longer. There is a possibility I badly checked this and I was too happy before
I set PBR rule in the VPN as 192.168.1.xxx/yyy

I enabled ddns on A (the modem/router) and disabled on router B.
Still I cannot ping myhost.ddns.net if VPN is enabled
DHCP is enabled on both A and B
... ddns works if I disable VPN on router B ....
My setup is still ... temperamental Smile

Thanks for any help
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Fri Mar 19, 2021 10:25    Post subject: Reply with quote
Do not included routers B address in the PBR range
_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
stanzani
DD-WRT Novice


Joined: 06 Mar 2021
Posts: 22

PostPosted: Fri Mar 19, 2021 10:30    Post subject: Reply with quote
I did not
I just added the local IPs I want to disclose to the WAN
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Fri Mar 19, 2021 10:37    Post subject: Reply with quote
Also do not include the IP address of the client you want to port forward to
_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
stanzani
DD-WRT Novice


Joined: 06 Mar 2021
Posts: 22

PostPosted: Fri Mar 19, 2021 10:42    Post subject: Reply with quote
I have a PC in my home network running a media server , address is IPADR: 192.168.1.MMM The port NN is forwarded on both router A and router B at IPADR
All of this works with VPN off i.e. I can access to the server by <mydns>.ddns.net:NN
What else should I forward?
IPADR is in the PBR list of the VPN text box

Thanks
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Fri Mar 19, 2021 10:58    Post subject: Reply with quote
You cannot forward via the WAN to a client which is using the VPN, so that clients IP address cannot be in the PBR box.

Traffic which goes in via the WAN (your port forward) must also go out via the WAN.
If the client is using the VPN (its address is in the PBR box) then traffic goes out via the VPN and that will not work.

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum