Advertisement
ROODAY

DNSMasq Config for Pihole

Apr 17th, 2016
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.43 KB | None | 0 0
  1. # Pi-hole: A black hole for Internet advertisements
  2. # (c) 2015, 2016 by Jacob Salmela
  3. # Network-wide ad blocking via your Raspberry Pi
  4. # http://pi-hole.net
  5. # dnsmasq config for Pi-hole
  6. #
  7. # Pi-hole is free software: you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation, either version 2 of the License, or
  10. # (at your option) any later version.
  11.  
  12. # If you want dnsmasq to read another file, as well as /etc/hosts, use
  13. # this.
  14. addn-hosts=/etc/pihole/gravity.list
  15.  
  16. # The following two options make you a better netizen, since they
  17. # tell dnsmasq to filter out queries which the public DNS cannot
  18. # answer, and which load the servers (especially the root servers)
  19. # unnecessarily. If you have a dial-on-demand link they also stop
  20. # these requests from bringing up the link unnecessarily.
  21.  
  22. # Never forward plain names (without a dot or domain part)
  23. domain-needed
  24. # Never forward addresses in the non-routed address spaces.
  25. bogus-priv
  26.  
  27. # If you don't want dnsmasq to read /etc/resolv.conf or any other
  28. # file, getting its servers from this file instead (see below), then
  29. # uncomment this.
  30. no-resolv
  31.  
  32. # Add other name servers here, with domain specs if they are for
  33. # non-public domains.
  34. server=208.67.222.222
  35. server=208.67.220.220
  36.  
  37. # If you want dnsmasq to listen for DHCP and DNS requests only on
  38. # specified interfaces (and the loopback) give the name of the
  39. # interface (eg eth0) here.
  40. interface=eth0
  41. # Or which to listen on by address (remember to include 127.0.0.1 if
  42. # you use this.)
  43. listen-address=127.0.0.1,192.168.178.XX
  44.  
  45. # Set the cachesize here.
  46. cache-size=10000
  47.  
  48. # For debugging purposes, log each DNS query as it passes through
  49. # dnsmasq.
  50. # log-queries
  51. # log-facility=/var/log/pihole.log
  52.  
  53. # Normally responses which come from /etc/hosts and the DHCP lease
  54. # file have Time-To-Live set as zero, which conventionally means
  55. # do not cache further. If you are happy to trade lower load on the
  56. # server for potentially stale date, you can set a time-to-live (in
  57. # seconds) here.
  58. local-ttl=300
  59.  
  60. # This allows it to continue functioning without being blocked by syslog, and allows syslog to use dnsmasq for DNS queries without risking deadlock
  61. log-async
  62. dhcp-range=192.168.178.XX,192.168.178.200,12h
  63. dhcp-host=XX:XX:XX:XX:XX,192.168.178.1
  64. dhcp-option=3,192.168.178.1
  65. address=/raspberrypi.lan/192.168.178.XX
  66. address=/gate.way/192.168.178.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement