DynDNS domain not reachable in local LAN

Hi everyone!

I asked for a setup using a VPN client and server in combination. I were helped absolutely fantastic and I hope, the second problem regarding this setup can be answered also by this great community!
The setup can also be found in the old post when important:


Short story: there are two VLANs, one is using a Mullvad Wireguard VPN client, one not. Some routing rules allow access from an Android phone via a Wireguard VPN server to the router. A pihole is attached as a DNS resolver using the Mullvad DNS server. I can answer more questions for the setup if needed.

The final and (how I hope) the last problem regarding this setup is the access of my nextcloud instance ( on a raspberry pi in my network) via my DynDNS name. The setup regarding this is quite straight forward: I forwarded the ports 80 and 443 from WAN to LAN. I can reach the pi from the outside via the DynDNS name. I can also reach the IP of the Pi from my network in all VLANs (thanks to routing rules). But I can not reach the Pi when using the DynDNS name from inside my LANs. This might be a topic where I need more routing rules, but I am a little confused since this was never a problem before I added a second VLAN.

I can ping the DynDNS name from my network so I guess it is only about port forwarding. I tried port forwarding (80/443) from LAN2 (the VLAN where my PC is in) to LAN1 (the VLAN where the nextcloud pi is in) but this crashed the access to my router via luci web interface. I also tried port forwarding from the Mullvad VPN interface to LAN but nothing changed.

Any ideas I need to add? At the moment I can not find out, what setting I could miss. If any logs or settings will help I will provide them.

Thank you a lot!

It would be easiest to add a local A Record to the LAN IP.

You add this to /etc/config/dhcp

config domain                                    
        option ip '192.168.xxx.xxx'
        option name 'example.dyndns.org'

Otherwise you'll have to make redirection firewall rules for each port - to redirect the traffic on the WAN IP to the LAN IP (more complex, and not recommended by some on this forum).

4 Likes

Fantastic, this worked great! Thank you so much! You solved all problems regarding my setup. Everything is working now, as I wanted it and I learned a lot!

1 Like

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