Every computer is uniquely identified by an IP address, but these are inconvenient, and it's much easier to refer to them by name. The Domain Name System is a network's white pages, but instead of looking up somebody's name in order to get their telephone number, you can look up a domain name (e.g. awasu.com) and get its corresponding IP address (e.g. 126.96.36.199).
Installing and configuring the DNS server
We need to install a DNS server on our gateway, so that computers on the internal network can do domain name lookupsFor example, if you open http://awasu.com in a browser, the browser needs to know the IP address of that web site so that it can get the web page..
First, we need to install the DNS server:
sudo apt-get install bind9
We can also install some useful tools that let us do DNS lookups from the command line (e.g. dig and nsupdate):
sudo apt-get install dnsutils
Now, computers on my internal network will have their DNS lookups done by the DNS server running on our gatewayThis happens because they were told to do this when they received their IP address, via the domain-name-servers option..
However, the gateway DNS server itself needs to do DNS lookups, and this is configured in /etc/resolv.conf. In the case of my home network, I get given the address of a DNS server when I connect via wifi, but you might want to use something else e.g. 188.8.131.52, if you want to use Google's DNS servers.
|« Setting up DHCP||Tutorial index||Setting up NAT »|
[ + ]
|1.||↵||For example, if you open http://awasu.com in a browser, the browser needs to know the IP address of that web site so that it can get the web page.|
|2.||↵||This happens because they were told to do this when they received their IP address, via the domain-name-servers option.|