Re: dnsmasq w/ad-blocking hosts file (was NTP: Possible permissions bug)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Fri, 2014-05-09 at 18:34 +0200, luc.linux@xxxxxxxxxx wrote:
> To cache your values of /etc/hosts, you can install a dns server locally
> (like dnsmasq). That way, dns resolution of cached values are nearly
> instantaneous, and you can have a lot of dns rules. I have an /etc/hosts
> of 16M, and yet I have a really fast DNS resolution.

thanks, that looks like a good solution.  This is what I ended up doing:

. revert /etc/hosts to local definitions
. download the ad-blocker hosts file to /etc/hosts-adblock
. install dnsmasq, and add to /etc/dnsmasq.conf:
  addn-hosts=/etc/hosts-adblock
. remove "hosts" from /etc/host.conf

Also, since my machine doesn't travel:
. add "nohook resolv.conf" to /etc/dhcpcd.conf
. put "nameserver 127.0.0.1" in /etc/resolv.conf
. add to /etc/dnsmasq.conf
  no-resolv
  server=8.8.8.8
  server=8.8.4.4

I haven't set this up on a laptop yet, but I imagine that would be more
complicated because sometimes the google DNS servers will be
inaccessible (e.g. hotel wifi).  Using OpenDNS on port 5353 might be a
good alternative.
Carl


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux