Hello
I see numerous places where dns servers are hardcoded into hestia. Would there be an issue to set all of them to 127.0.0.1 as recursion is enabled on the localhost ?
What is the hestia method to remove all these external resolvers ? thanks
This does have some obvious false hits but there are several hardcoded resolvers
thanks for the reply.
Was pretty sure the graphic files didnt do anything but wasnt sure if resolvers had been added to the php code
So I take it that /etc/resolv.conf is only read, never written, and these 2 files mentioned below are the only places hestia defines resolvers, and that if I manually edit these 2 files nothing from within hestia will change them ?
8.8.8.8 was in/etc/resolv.conf when I installed hestia. Makes sense
This was the one that got my attention. In the current release of Hestia this code is in /etc/init.d/hestia but appeared to be commented out. Now that is has moved to syshealth.sh should it be labeled as a function ?
What would you think about adding a v-update-sys-resolvers that utilizes a version of the function in syshealth and updates /etc/nginx/nginx.conf and $HESTIA/nginx/conf/nginx.conf with one of these choices 1./etc/resolv.conf, 2. hestia defaults, or 3.custom resolvers ? Maybe it is just simpler to manually edit these 2 files.
yea it is in main. My points were that should it be labeled a function , and it could be used to allow users to use a v-file to update all the resolvers that hestia has set.
But I believe you have answered my main questions : Where are all the places hestia sets a resolver and if I manually update them will they be safe from updates and refreshes of hestia
The one you are using is fine. I would replace one of the resolvers by another one so they don’t belong to the same provider but there is nothing wrong with that conf… maybe I would lower the timeout to 3 or 5 seconds.
Yes to clarify ,if you use 8.8.8.8 or 1.1.1.1.1 ( google or cloudflare), or their related ip addresses, will work fine as dns resolvers. It is a personal choice not to use them and they are simple to avoid.
So if I understand it correctly:
that file controls how the nginx proxy and possible web server handles dns. Hestia web interface uses a different file and possible configuration. Apache , if installed, and the rest of the server would use the values in /etc/resolv.conf . My goal was to sync them all and to permanently set them to my preference.
I had not used Nginx before and am not accustomed to dns resolving being set in so many separate places. I appreciate all the help
Yes, resolver directive tells to Nginx what are the resolvers to be used to resolve domain names. Nginx uses this instead of OS resolver, because OS resolver is not asynchronous and it could block all Nginx connections while a resolver call is used.
Yes, indeed it’s another Nginx instance completely independent.
Yes.
Just a tip for you @Devdoit.pl and @jperkins , if you use Exim and Spamhaus as a block list (by default it is enabled) you should not use neither Google nor Cloudflare public dns resolvers (there a few public resolvers out there that won’t work too). If you use Google’s resolvers (8.8.8.8 and/or 8.8.4.4), al request to Spamhaus will be ignored so you never will block spammers. If you use Cloudflare’s resolvers (1.1.1.1 and/or 1.0.0.1) ALL incoming mails will be blocked.
You could use any of these public resolvers if you create a Free Data Query Service Account. More info here.
I created a script to check if your dns resolver will work with Spamhaus.
To check the default primary name server in your OS: