Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I am trying to configre my openSuSE 12.1 machine as DHCP client, but especially do not want it to set the name server entries to /etc/resolv.conf it has got from DHCP server.

Can I do it on the client site without manually deleting the entries afterwards?

On windows machines this is possible due to the setting

(   ) Obtain DNS server address automatically

(O) User the following DNS server addresses:

and then just leave the fields for Preferred and Alternate DNS server blank.

share|improve this question

1 Answer 1

Add to your /etc/dhclient.conf:

supersede domain-name-servers HERE_THE_DNS_SERVER_IP;
share|improve this answer
sorry, but the file /etc/dhclient.confdoesn't exists, instead I found another dhcp-client config file /etc/sysconfig/network/dhcp. I tried to add your line to it, but even after invoking /sbin/SuSEconfig again, the entries still remain in my resolf.conf... I also tried to set void nameservers in YaST (e.g., &, but the client still sets it's search domain to the one gotten from DHCP server... – Master of Celebration Apr 17 '12 at 6:55
Does setting NETCONFIG_DNS_STATIC_SERVERS in /etc/sysconfig/network/config help? – jofel Apr 17 '12 at 8:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.