Opisek
@Opisek@lemmy.world
- Comment on Need help getting domain to resolve over LAN 1 year ago:
I explained why. Misconfiguration and caching.
- Comment on Need help getting domain to resolve over LAN 1 year ago:
You would also need to color your device’s DNS cache.
- Comment on Need help getting domain to resolve over LAN 1 year ago:
Not two A records. From what I understand, OP has an A record pointing to their public IP address. Then, on the local network, OP uses their own DNS server to ignore that entry and instead always serve the local IP when a host on the LAN queries it.
Aside from OP’s devices potentially using a different DNS server (I was only able to solve it for my stock Android by dropping outgoing DNS in my firewall), this solution is a nightmare for roaming devices like mobile phones. Such a device might cache the DNS answer while on LAN or WAN respectively and then try to continue using that address when the device moves to the other network segment. That’s the second likely scenario in my opinion - OP’s devices are ignoring the hacky DNS rewrite and try to access the server via the public IP.
- Comment on Need help getting domain to resolve over LAN 1 year ago:
Never point your DNS at a local IP address. That will only cause you pain and unexpected behaviour.
What you are experiencing is solved by so-called “NAT reflection” or “NAT loopback”. It’s a setting that in the best case you should just be able to activate on the appropriate interface in your gateway.