If you have been following our Ubuntu server series, you have learned how to setup a LAMP server and configure an APF firewall. In order to do any of this, you likely already had your networking configured correctly, but if you do not, this brief tutorial explain how to setup name servers and ensure they are resolving correctly.
You can setup your system to use DNS for name resolution in /etc/resolv.conf. You can also add DNS suffix searches for your server’s domain names. A basic setup using public DNS servers, such as Google’s will look like this:
In this example, your domain is example.com, and the nameservers are public DNS servers. If your server is part of a network or larger domain of servers, you might want to configure different DNS settings for each machine and then point your router to the public DNS server.
If you require multiple domains or subdomains for searching, you can add them on the same line:
search example.com billing.example.com support.example.com
For more information about Ubuntu network configuration, consult the online Ubuntu documentation.