souravndp

dnsmasq

Dec 24th, 2018
496
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.01 KB | None | 0 0
  1. vi /etc/dnsmasq.conf
  2.  
  3. #basic configuration. set DNS IP to your router's IP address on your client devices. otherwise, you can also use the firewall (iptables) to redirect all outgoing DNS queries to your router (just like the ISPs do). By this way, all your devices will end up using your dnsmasq. various other useful configurations are available. use google.
  4.  
  5. no-resolv #ignore interface specified DNS addresses
  6.  
  7. #use opendns (at port 5353) as upstream DNS provider, if a DNS record is not found in the cache.
  8. server=208.67.220.220#5353
  9. server=208.67.222.222#5353
  10.  
  11. cache-size=300 #cache size. change depending on your RAM and performance
  12.  
  13. except-interface=eth0 #dont listen on WAN interface
  14.  
  15. address=/pornhub.com/216.18.168.15 #specify an address for a domain. equivalent to the editing of hosts file on client devices. can be used to avoid isp block. ISPs blocked pornhub.com but not pornhub.net. the above IP is pornhub.net's IP. thus if you use pornhub.com, dnsmasq will return pornhub.net's IP and the page will open.
Advertisement
Add Comment
Please, Sign In to add comment