Recently, after a dist-upgrade to Debian 9.0, I happened to notice that danted (a socks v5 proxy server) and stunnel4 (an SSL/TLS tunneling service) services can not resolve domain names.
In danted logs:
request was not performed due to error: could not resolve hostname "www.google.com": Name or service not known
In stunnel logs:
Error resolving "www.stunnel.org": Neither nodename nor servname known (EAI_NONAME)
If I change the system user that the service is running under (for danted it is proxy, and for stunnel is stunnel4), to root and restart the service, it works fine.
- ordinary users can ping/resolve domain names.
/etc/nsswitch.confand/etc/resolv.confare world readable.even
suing to system user, you can ping/resolve domain names:# su - -s /bin/sh -c "getent ahosts www.stunnel.org" proxy 207.192.69.165 STREAM linode.mirt.net 207.192.69.165 DGRAM ...the content of
resolv.conf:nameserver 127.0.0.1 nameserver 8.8.8.8 nameserver 208.67.222.222 nameserver 208.67.220.220I use
dnsmasq.
I'm not sure, what to do next.