-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check contents of /etc/resolv.conf #209
Comments
That's a great suggestion, thanks. We'd need to be careful to only apply this when the DNS service is configured and to not assume which addresses are there. The installer configures 127.0.0.1 if there are any IPv4 addresses and ::1 if any IPv6 in https://github.com/freeipa/freeipa/blob/master/ipaserver/install/bindinstance.py#L1127 |
This is somewhat complicated by systemd-resolvd which now owns /etc/resolv.conf. I guess if the file is a symlink to /run/systemd/resolve/stub-resolv.conf then we can executed systemd-resolv --status and scrape for 127.0.0.1. |
Since (I think) I filed this issue, FreeIPA has been enhanced to tell NetworkManager to configure the system's DNS to use 127.0.0.1/::1 as its resolver. So probably the original reason I filed this issue is no longer reproducible. Nonetheless it's probably still useful to have a health check for proper DNS configuration. If you want to check whether resolved 'owns' |
Yes, D-Bus is a much nicer way to inquire on status, thanks for that! |
I may add this under meta as an informational value. Simple code for getting this property:
|
I've got a machine where
resolv.conf
was changed from:to:
Maybe
ipa-healthcheck
could complain if::1
and127.0.0.1
are not the only configured nameservers, and if the search list doesn't include the IPA domain?(In case someone else finds it useful--this particular server is using
network-scripts
to configure via DHCP; the fix was to addDNS1=127.0.0.1
andDNS2=::1
to/etc/sysconfig/network-scripts/ifcfg-eth0
and reboot).The text was updated successfully, but these errors were encountered: