Use these steps to speed your internet browsing requests on Ubuntu, by enabling local DNS cache :
1- Run this command to install dnsmasq package
sudo apt-get install dnsmasq
2- Modify the file :
sudo gedit /etc/dnsmasq.conf
change the line :
#listen-address=
To :
listen-address=127.0.0.1
3- Modify the file :
sudo gedit /etc/dhcp3/dhclient.conf
Ucomment the line :
prepend domain-name-servers 127.0.0.1;
4- Add the DNS 127.0.0.1 to your connection through your connection manager
Your DNS servers should be :
127.0.0.1,8.8.8.8,4.2.2.4
5- Restart your connection
sudo /etc/init.d/networking restart
To check if it is working issue the following command twice:
dig php-architect.com | grep 'Query'
first response will be like :
;; Query time: 96 msec
run the previous command again
dig php-architect.com | grep 'Query'
Response now should be :
;; Query time: 0 msec
This will speed your browsing especially in pages with many HTTP requests.