Can't access server in local network using my dns domain (although i can from 192.168.1.2). From external internet i can access the dns domain

how do i do that? in the webui of router i donā€™t think i have that possibility .

iā€™m afraid you have to ask your isp.

Hi @Ricardo_Santos

Look for a setting called NAT-Loopback or NAT Reflection in the Port Forwarding section of your router. That would be the easiest way to make it work. If your router doesnā€™t support NAT Reflection, look for local DNS settings. Something like DNS host override or similiar. If this function also isnā€™t available, you could use either a seperate DNS server in your local network or you could do the DNS host overrides on your client devices by editing the local hosts file:

https://docs.rackspace.com/support/how-to/modify-your-hosts-file/

1 Like

Hi @bb77 thanks! that seems to have worked.
Is there a way to make it work also on an android device?

Im not a 100% sure, but I do not think itā€™s possible without root, because the hosts file is read only on Android. Maybe there are apps that can work around that, but I donā€™t know any from the top of my head. Apart from that, this method doesnā€™t make that much sense on a mobile device, because you would have to delete / change the entry every time you leave your local network with the device

My recomandition would be, running a second Raspberry Pi with Pi-Hole on it and use that as your primary DNS-Server in your local network. Then you can manage the host override via Pi-holeā€™s Web-UI and as a bonus you get a nice solution to block ads and tracking for all your devices. Pi-hole also does not have high hardware requirements. An older Pi with 512MB will do just fine.

1 Like

if he had a router with all of pfSenseā€™s features, i could also have made better suggestions. :wink:

Why would you do such a thing, if you have a router like pfSense, where you simply can add a host override to the DNS-Resolver??

You just have to make sure that all clients use pfSense as their primary DNS server, then the host overrides will work. Just announce it via DHCP, which should be the default setting anyways.

Otherwiseā€¦ whatever works for you is ok, I guess. But the advantage of a proper ā€œSplit Horizon DNS configurationā€ isā€¦

  • all clients can always use the same URL, regardless of whether the clients are currently in the local network or not.
  • the clients connect directly with the proper server, instead of sending all the traffic through NAT.

Any chance you have advice on making Nextcloud accessible after installing OpenWrt on router? I just updated the router firmware to OpenWrt and now 192.168.0.162 is no longer accessible. Iā€™ve gone through all the router settings trying to spot what change to make, but canā€™t get Nextcloud accessible. Also canā€™t find any help in NC or OpenWrt forums.