Today I've upgraded to 25.1.9_2. After the upgrade my local hosted website was no longer approachable through the OPNSense Nginx proxy server. Investigating what the problem was by pinging my local webserver url from the console the error is "cannot resolve [my website's url]: Name does not resolve" Hereafter I've tried a bunch of other local url's and all were not resolved. Conclusion can only be that OPNSense no longer is using my local DNS server to resolve local addresses. I ended up to resolve the issue for now was to input the internal url into the /etc/hosts file to make my website available for the outside world.
I can't figure out as to why this situation occurred after the upgrade to 25.1.9_2.
Any ideas?
For some reason the hosts file is renewed automatically and removing my manual added entry and results actually into a no solution to the problem. I found an old thread where Franco advises to use an Unbound override and that solved the issue of not being able to ping my local DNS server from the console as it also resolved NGINX passing the "nginx -t" test command successfully.
Having resolved the issue for now I'm still puzzled as to why this all happened after the upgrade and making an override for all my internal addresses in not an option. I must say that this problem only exists for requests from OPNSense itself. The other networks attached to this firewall do not show this problem.
Do you have 127.0.0.1 in the /etc/resolv.conf
Yes, this is the first entry in resolv.conf
hereafter other nameservers like 8.8.8.8 are present as well as my internal DNS server.
Have you tried to use dig or nslookup to check 127.0.0.1 for your host overrides?
E.g. from the opnsense shell
dig @127.0.0.1 -p 53 myhostname.internal
Hi Cedric,
dig and ping is what I have used in the first place. The dig answer is that it would not resolve my internal subdomains except the one I've added in resolv.conf
The AUTHORITY SECTION: shows the name server of the provider where my domain is registered.
Quotemydomain.com. 2418 IN SOA ns1.anony.nl. hostmaster.mydomain.com. 2100000175 14400 3600 604800 86400
This tells me that OPNSense does not look for my internal DNS in the first place.