Resolv.conf issue
-
Yesterday I was having network connectivity on my Fedora 26 laptop via Wireless. I wasn't sure what the problem was, but the quick fix I figured out without knowing anything was to edit resolv.conf to use the google dns addresses.
Now that I'm back on a regular network, I'd like to "reset" that file to default.
Is there a way to do that so things start working correctly again on a private network with it's own dhcp/dns?
-
Default is typically blank. Just delete the Google entries. DHCP should update it, in theory.
-
@scottalanmiller said in Resolv.conf issue:
Default is typically blank. Just delete the Google entries. DHCP should update it, in theory.
I tried deleting the file, then restarting the network service.
I tried deleting the contents of the file, then restarting the network service.It's populated automatically by Network Manager, but I can't get network manager to repopulate it.
I just don't want to have to manually enter DNS servers every time I'm on a private network with it's own DNS (such as at work or on a VPN).
-
I managed to fix it. I'm not entirely sure what the fix was because I made too many changes at once.
I think it was an issue where SELinux suddenly didn't like Network Manager touching that file for some reason. No idea why that would suddenly be an issue.
Anyways, the four main changes I did:
First
# Cleared the contents of: /etc/resolv.conf
Second
ausearch -c 'dnsmasq' --raw | audit2allow -M my-dnsmasq semodule -X 300 -i my-dnsmasq.pp
Third
ausearch -c 'NetworkManager' --raw | audit2allow -M my-NetworkManager semodule -X 300 -i my-NetworkManager.pp
Fourth
reboot now