I need to prepend my
/etc/resolv.conf with an entry. My interface is enp0s3. So I created
/etc/dhcp/dhclient-enp0s3.conf and added the line:
prepend domain-name-servers 127.0.0.2
When I restart the CentOS VM, the NetworkManager automatically creates this file:
When I cat that I can see that my dhclient-enp0s3.conf file in /etc/dhcp IS being read properly:
[root@localhost network-scripts]# cat /var/lib/NetworkManager/dhclient-enp0s3.conf # Created by NetworkManager # Merged from /etc/dhcp/dhclient-enp0s3.conf prepend domain-name-servers 127.0.0.2 option rfc3442-classless-static-routes code 121 = array of unsigned integer 8; option ms-classless-static-routes code 249 = array of unsigned integer 8; option wpad code 252 = string; also request rfc3442-classless-static-routes; also request ms-classless-static-routes; also request static-routes; also request wpad; also request ntp-servers;
However, when I cat
/etc/resolv.conf, the prepended nameserver doesn't appear anywhere. I also ran
dig just to test if my internal hostnames would resolve properly, but they don't.
Since the NetworkManager config appears to be generated, where do I go from here?