Raspberry pi – dynamic IP and static DNS

To get an IPĀ  address via DHCP but stick to a pre defined DNS server could be accomplished by:

Edit /etc/dhcp/dhclient.conf and uncomment the following line:

#prepend domain-name-servers 127.0.0.1;

If you want to use e.g. Google DNS Server modify to:

#prepend domain-name-servers 8.8.8.8;

 

Leave a Reply

Your email address will not be published. Required fields are marked *