ubuntu/debian –Setting up DNS

Setting up DNS

When it comes to DNS setup Debian doesn’t differ from other distributions. You can add hostname and IP addresses to the file /etc/hosts for static lokups.

To cause your machine to consult with a particular server for name lookups you simply add their addresses to

/etc/resolv.conf.

For example a machine which should perform lookups from the DNS server at IP address 192.168.1.1 would have a resolv.conf file looking like this:

search my.flat

nameserver 4.2.2.2

nameserver 4.2.2.3

(Here the search my.flat causes lookups of hostnames to have my.flat appended to them. So lappy would be looked up as lappy.my.flat)

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.