User Tools

Site Tools


networking:improve_dns_performance:dnsmasq

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
networking:improve_dns_performance:dnsmasq [2020/03/25 19:37] – [Configure Dnsmasq] peternetworking:improve_dns_performance:dnsmasq [2020/04/14 15:58] (current) – removed peter
Line 1: Line 1:
-====== Networking - Improve DNS Performance - Dnsmasq ====== 
- 
-===== Install Dnsmasq ===== 
- 
-<code bash> 
-sudo install dnsmasq 
-</code> 
- 
----- 
- 
-===== Configure Dnsmasq ===== 
- 
-Dont change **/etc/dnsmasq.conf**. 
- 
-Setup **127.0.0.1** as DNS server name in **/etc/resolve.conf** file: 
- 
-<file bash /etc/resolve.conf> 
-nameserver 127.0.0.1 
-nameserver 1.1.1.1 
-nameserver 9.9.9.9 
-</file> 
- 
-Replace 1.1.1.1/9.9.9.9 with the DNS servers you prefer. 
- 
-dnsmasq should read the list of nameservers automatically from /etc/resolv.conf. 
- 
-<WRAP info> 
-**NOTE:** Ensure that 127.0.0.1 is listed as the first nameserver address in /etc/resolv.conf. 
- 
-This ensure that local clients always gets cached queries. 
-</WRAP> 
- 
- 
----- 
- 
-===== Restart Dnsmasq ===== 
- 
-<code bash> 
-/etc/init.d/dnsmasq restart 
-</code> 
- 
----- 
- 
-===== Update your devices to point to the DNS server ===== 
- 
-Point your clients to the address of the server running Dnsmasq. 
- 
-It is easy to use Dnsmasq rather than setting up caching BIND server. 
- 
-But hold on it has some cool usage too. 
- 
-You can add domains which you want to force to specific IP address. 
- 
-For example, doubleclick.net displays ugly adds on many sites, just send this server it to our 127.0.0.1 (i.e. your local server ). 
- 
-Just open a file /etc/dnsmasq.conf and add following line to it: 
- 
-<file bash /etc/dnsmasq.conf> 
-address=/doubleclick.net/127.0.0.1 
-</file> 
- 
-Restart Dnsmasq and make sure you runs local webserver at 127.0.0.1 with some default page. 
- 
-Read the Dnsmasq man page and docs for more information. 
- 
  
networking/improve_dns_performance/dnsmasq.1585165038.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki