Setting up a local recursive resolver
Since all attempts to access a website require that you look up the hostname, the responsiveness of your nameserver can have a large impact on the loading of a webpage. A slow nameserver can delay the initial loading of the webpage as well as the loading of the various embedded images, video, and JavaScript, which might have been pulled third-party sites.
In this section, we'll be looking at setting up our own recursive nameserver, which will help cut down on the round trips between you and your resolver. We will additionally configure it to forward uncached queries to a public recursive nameserver in order to take advantage of their caching.
How to do it…
Let's set up the local recursive resolver:
- Install
bind9
on Ubuntu; this can be done withsudo apt-get install bind9
. On Red Hat and CentOS, it can be done withyum install bind
instead. For other distributions, consult the relevant documentation. - Add an
allow-recursion
entry in the options...