I got away with updating to pihole 2.9.2 and have all running without any issues.
Running raspberry and using dnsmasq to serve dhcp.(and a whole lot off other stuff like privoxy and also nxfilter on a second network interface)
In the past, after updating pihole, to restore my personal dnsmasq settings was to overwrite 01.pihole.conf with my former one.
Now I noticed with version 2.9.4 (pihole -up=> keep settings) somehow I am no longer able to edit dnsmasq settings to enable my custom settings. All custom settings are ignored.
I did read a post about setupvars.conf, but that layout is not suitable for adding my settings.
So basic :
Q1: how can I edit dnsmasq settings so I can re-enable my custom settings:
(Interface, dhcp server, wpad etc. etc. etc.) and keep pihole working also off course.
q2: is there an option to keep my settings with future updates, as pihole update destroys custom dnsmasq settings.everytime.
Perhaps an extra include in dnsmasq.conf for custom user settings?
Exactly this! Any changes made to 01-pihole.conf will be overwritten with every update. v2.9.5 / v2.10 will have a warning at the top of the file like this.
If you want to add in your own configs, then either add them into /etc/dnsmasq.d/ directory (e.g 02-custom.conf) or make your changes in /etc/dnsmasq.conf, which we do not touch on install/update.
However: your 01-pihole.conf always includes "listen address 127.0.0.1"
And that's exactly the line I need to have disabled.....I need dnsmasq to bind only to eth0 and not on 127.0.0.1
Would a second conf overrule that?
Is there a sequens of reading the conf files..So if I would name my config:
00-custom.conf would that load first?
While typing I am also making a copy of sd card and try this myself and run a pihole -up and see what happens.
In my case it is.
I have nxfilter running on eth4 on the same box.
Need to insulate dnsmasq to eth0 otherwise nxfilter can not use port 53 on eth4.
This is how you do that:
01-pihole.conf:
# If you want dnsmasq to listen for DHCP and DNS requests only on
# specified interfaces (and the loopback) give the name of the
# interface (eg eth0) here.
interface=eth0
except-interface=eth1
except-interface=eth4
except-interface=wlan0
# Or which to listen on by address (remember to include 127.0.0.1 if
# you use this.)
# listen-address=127.0.0.1
bind-interfaces
# Set the cachesize here.
cache-size=10000
# For debugging purposes, log each DNS query as it passes through
# dnsmasq.
log-queries
log-facility=/var/log/pihole.log
# Normally responses which come from /etc/hosts and the DHCP lease
# file have Time-To-Live set as zero, which conventionally means
# do not cache further. If you are happy to trade lower load on the
# server for potentially stale date, you can set a time-to-live (in
# seconds) here.
local-ttl=300
# This allows it to continue functioning without being blocked by syslog, and allows syslog to use dnsmasq for DNS queries without risking deadlock
log-async
# From here entries from Jeroen
local=/noads.local/
domain=noads.local
address=/raspberry.noads.local/192.168.1.2
address=/wpad.noads.local/192.168.1.2
address=/wpad/192.168.1.2
dhcp-authoritative
#dhcp-range=set:red,192.168.1.100,192.168.1.199,255.255.255.0,72h
dhcp-range=set:red,192.168.1.100,192.168.1.199,255.255.255.0,365d
dhcp-option=tag:red,6,192.168.1.4,192.168.1.2,208.67.222.222,8.8.8.8
dhcp-option=tag:red,option:router,192.168.1.1
# dhcp-option=tag:red,option:ntp-server,192.168.1.2
dhcp-option=19,0
dhcp-option=42,0.0.0.0
dhcp-option=44,192.168.1.2
dhcp-option=45,0.0.0.0
dhcp-option=46,8
all-servers
txt-record=wpad,"service:wpad:!http://192.168.1.2:80/wpad.dat?"
srv-host=wpad.tcp.wpad,wpad.wpad,80
srv-host=_wpad._tcp.192.168.1.2,wpad.192.168.1.2,80
dhcp-option=252,"http://192.168.1.2/wpad.dat?"
After last update of pi-hole for some reason dnsmasq totaly ignores these settings
Even if I just overwrite 01-pihole.conf.
Just as if dnsmasq is getting some other config.........
But that should not even be possible.
Weird he:)
Will try to split all my settings into 00-custom.conf and pray this overrules listen-address in 01-pihole.conf.
Time will tell if this works.
Need to make a copy of sd card first as there is no option to do a system restore:)
Then I will do a pihole -up and will let you know the outcome.
Made a 00-custom.conf with my settings and used original 01-pihole.conf and all seems fine with this version.
Making another backup and update pihole tomorrow.
So the results:
Creating 99-custon.conf in etc/dnsmasq.d solved my dnsmasq issues after the pihole update.
Rasp still nicely serving dhcp and all my settings work.
Now the bad news:(
Pihole -up also "destroys" /etc/lighttpd/lighttpd.conf
Not sure if there is a similair trick with a second conf file.
The only line I need (back) in lighttpd.conf is this:
server.bind = "192.168.1.2"
# Pi-hole: A black hole for Internet advertisements
# (c) 2015, 2016 by Jacob Salmela
# Network-wide ad blocking via your Raspberry Pi
# http://pi-hole.net
# dnsmasq config for Pi-hole
#
# Pi-hole is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# If you want dnsmasq to read another file, as well as /etc/hosts, use
# this.
# addn-hosts=/etc/pihole/gravity.list
# The following two options make you a better netizen, since they
# tell dnsmasq to filter out queries which the public DNS cannot
# answer, and which load the servers (especially the root servers)
# unnecessarily. If you have a dial-on-demand link they also stop
# these requests from bringing up the link unnecessarily.
# Never forward plain names (without a dot or domain part)
domain-needed
# Never forward addresses in the non-routed address spaces.
# bogus-priv
# If you don't want dnsmasq to read /etc/resolv.conf or any other
# file, getting its servers from this file instead (see below), then
# uncomment this.
# no-resolv
# Add other name servers here, with domain specs if they are for
# non-public domains.
# Iserver=208.67.222.222
# Iserver=208.67.220.220
# If you want dnsmasq to listen for DHCP and DNS requests only on
# specified interfaces (and the loopback) give the name of the
# interface (eg eth0) here.
interface=eth0
except-interface=eth1
except-interface=eth4
except-interface=wlan0
# Or which to listen on by address (remember to include 127.0.0.1 if
# you use this.)
# listen-address=127.0.0.1
bind-interfaces
# Set the cachesize here.
# cache-size=10000
# For debugging purposes, log each DNS query as it passes through
# dnsmasq.
# log-queries
# log-facility=/var/log/pihole.log
# Normally responses which come from /etc/hosts and the DHCP lease
# file have Time-To-Live set as zero, which conventionally means
# do not cache further. If you are happy to trade lower load on the
# server for potentially stale date, you can set a time-to-live (in
# seconds) here.
# local-ttl=300
# This allows it to continue functioning without being blocked by syslog, and allows syslog to use dnsmasq for DNS queries without risking deadlock
# log-async
# From here entries from Jeroen
local=/noads.local/
domain=noads.local
address=/raspberry.noads.local/192.168.1.2
address=/wpad.noads.local/192.168.1.2
address=/wpad/192.168.1.2
dhcp-authoritative
#dhcp-range=set:red,192.168.1.100,192.168.1.199,255.255.255.0,72h
dhcp-range=set:red,192.168.1.100,192.168.1.199,255.255.255.0,365d
dhcp-option=tag:red,6,192.168.1.4,192.168.1.2,208.67.222.222,8.8.8.8
dhcp-option=tag:red,option:router,192.168.1.1
# dhcp-option=tag:red,option:ntp-server,192.168.1.2
dhcp-option=19,0
dhcp-option=42,0.0.0.0
dhcp-option=44,192.168.1.2
dhcp-option=45,0.0.0.0
dhcp-option=46,8
all-servers
txt-record=wpad,"service:wpad:!http://192.168.1.2:80/wpad.dat?"
srv-host=wpad.tcp.wpad,wpad.wpad,80
srv-host=_wpad._tcp.192.168.1.2,wpad.192.168.1.2,80
dhcp-option=252,"http://192.168.1.2/wpad.dat?"