[arch-general] dnsmasq w/ad-blocking hosts file (was NTP: Possible permissions bug)

Curtis Shimamoto sugar.and.scruffy at gmail.com
Sat May 10 15:15:56 EDT 2014


On 05/10/14 at 06:43pm, luc.linux at mailoo.org wrote:
> On Sat, May 10, 2014 at 12:41:36PM -0400, Carl Schaefer wrote:
> > 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
> for that case, I have modified /etc/resolvconf.conf to make netctl
> generate dns information on /etc/resolvdns.conf. I then setted
> /etc/resolv.conf to localhost, and configured dnsmasq to use
> /etc/resolvdns.conf. It is a bit a a hack, but it works.
> 

Instead of all that, you can simply use /etc/resolv.conf.head.  Whatever
you put in there will be put in the top of /etc/resolv.conf.  This only
works with dhcpcd though.  For dhclient, you can configure this in
/etc/dhclient.conf.

-- 
Curtis Shimamoto
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/arch-general/attachments/20140510/0a0100f7/attachment.asc>


More information about the arch-general mailing list