How to resolve DNS in LAN
-
I use apache web server in LAN. On changeip.com I use the free dns service, where I have a registered domain name.
If I connect to a web server under a domain name from wan, everything works great. If I connect from the LAN, I see a warningPotential DNS Rebind attack detected, see http://en.wikipedia.org/wiki/DNS_rebinding Try accessing the router by IP address instead of by hostname.
or
404 Not Found nginx
Nastavil som v services - dns resolver - Host Overrides
I disabled it in System / Advanced / AdminAccess "DNS Rebind Check" then it redirects to the default gateway.
How do I set DNS to work on my LAN? -
If you’re using the DNS resolver for name resolution add a host override for your public domain pointing to the internal servers IP.
-
I set up in services - dns resolver - Host Overrides
-
The client you're testing from is not hitting the override if you're seeing the pfSense webgui. Is ut even using pfSense for DNS at all?
https://docs.netgate.com/pfsense/en/latest/recipes/port-forwards-from-local-networks.html
Steve
-
It was necessary to set
System / Advanced / Firewall & NAT / NAT Reflection mode for port forwards on Pure NAT
since then everything works -
@gusto
So what @stephenw10 wrote above will be the case. Your client doesn't use pfSense for DNS resolution.
Maybe its using DoH. -
Yup, could well be DoH. Are you using Firefox?
Split DNS is generally better if you can do it as it doesn't load the firewall unnecessarily.
Steve