Issue on resolv.conf

Hi all, :frowning:

I am facing issue while I have updated in resolv.conf, after nework service restart, it was automatically deleted IP from resolv.conf file.
Could you please let me know what is the reason resolv.conf deleted any IP which I have manually updated, but it store only my router IP permanently.

Advance thanks for helping..

# vi /etc/resolv.conf
 
# Generated by NetworkManager
search server.com
nameserver 192.168.2.4
nameserver 192.168.2.1
# service network restart
Shutting down interface eth0: Device state: 3 (disconnected)
[ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: Active connection state: activated
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/5
[ OK ]
 
cat /etc/resolv.conf
# Generated by NetworkManager
search server.com
nameserver 192.168.2.1

It says # Generated by NetworkManager so I would look there for an answer...

1 Like

You can safely turn off the NetworkManager service. It's good for a Desktop computer but not for a server.

chkconfig NetworkManager off
service NetworkManager stop
1 Like

Thank you All