Struggling with pihole-FTL

Above one tells me you havent changed listening behaviour yet or you've edited the 01-pihole.conf manually.

Here is mine with listening behaviour set to "Listen on all interfaces, permit all origins" set via the admin web GUI:

pi@noads:~ $ sudo grep -v '^#\|^$' -R /etc/dnsmasq.* | sort
/etc/dnsmasq.conf:conf-dir=/etc/dnsmasq.d
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/black.list
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/gravity.list
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/local.list
/etc/dnsmasq.d/01-pihole.conf:bogus-priv
/etc/dnsmasq.d/01-pihole.conf:cache-size=10000
/etc/dnsmasq.d/01-pihole.conf:dhcp-ignore-names=tag:wpad-ignore
/etc/dnsmasq.d/01-pihole.conf:dhcp-name-match=set:wpad-ignore,wpad
/etc/dnsmasq.d/01-pihole.conf:domain-needed
/etc/dnsmasq.d/01-pihole.conf:except-interface=nonexisting
/etc/dnsmasq.d/01-pihole.conf:localise-queries
/etc/dnsmasq.d/01-pihole.conf:local-ttl=2
/etc/dnsmasq.d/01-pihole.conf:log-async
/etc/dnsmasq.d/01-pihole.conf:log-facility=/var/log/pihole.log
/etc/dnsmasq.d/01-pihole.conf:log-queries
/etc/dnsmasq.d/01-pihole.conf:no-resolv
/etc/dnsmasq.d/01-pihole.conf:server=149.112.112.10
/etc/dnsmasq.d/01-pihole.conf:server=9.9.9.10

Notice the interface= line being replaced by except-interface=nonexisting

I don't remember editing 01-pihole.conf directly but its certainly possible. Especially building dnsmasq2.80 and getting it working.

I also set all those admin options and tested, and none worked.

Looking at the GUI I left it set to eth0 after testing.

I've set it back to "Listen on all interfaces, permit all origins"

netadmin@namepi:/etc/dnsmasq.d $ sudo grep -v '^#\|^$' -R /etc/dnsmasq.* | sort
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/black.list
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/gravity.list
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/local.list
/etc/dnsmasq.d/01-pihole.conf:bogus-priv
/etc/dnsmasq.d/01-pihole.conf:cache-size=10000
/etc/dnsmasq.d/01-pihole.conf:domain-needed
/etc/dnsmasq.d/01-pihole.conf:except-interface=nonexisting
/etc/dnsmasq.d/01-pihole.conf:localise-queries
/etc/dnsmasq.d/01-pihole.conf:local-ttl=2
/etc/dnsmasq.d/01-pihole.conf:log-async
/etc/dnsmasq.d/01-pihole.conf:log-facility=/var/log/pihole.log
/etc/dnsmasq.d/01-pihole.conf:log-queries
/etc/dnsmasq.d/01-pihole.conf:no-resolv
/etc/dnsmasq.d/01-pihole.conf:server=192.168.55.9#53
/etc/dnsmasq.d/01-pihole.conf:server=192.168.55.9#53
/etc/dnsmasq.d/10-mypiholesetup.conf:bind-dynamic
/etc/dnsmasq.d/10-mypiholesetup.conf:except-interface=dummy*
/etc/dnsmasq.d/10-mypiholesetup.conf:listen-address=172.25.25.146,127.0.0.1
/etc/dnsmasq.d/10-mypiholesetup.conf:no-dhcp-interface=dummy0
/etc/dnsmasq.d/10-mypiholesetup.conf:no-dhcp-interface=dummy1
/etc/dnsmasq.d/10-mypiholesetup.conf:no-dhcp-interface=eth0
netadmin@namepi:/etc/dnsmasq.d $

unfortunately

netadmin@namepi:/etc/dnsmasq.d $ sudo service pihole-FTL status
● pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled)
   Active: active (exited) since Fri 2020-01-03 21:39:01 GMT; 7min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 377 ExecStop=/etc/init.d/pihole-FTL stop (code=exited, status=0/SUCCESS)
  Process: 754 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/pihole-FTL.service

Jan 03 21:39:00 namepi systemd[1]: Starting LSB: pihole-FTL daemon...
Jan 03 21:39:00 namepi pihole-FTL[754]: Not running
Jan 03 21:39:00 namepi su[784]: Successful su for pihole by root
Jan 03 21:39:00 namepi su[784]: + ??? root:pihole
Jan 03 21:39:00 namepi su[784]: pam_unix(su:session): session opened for user pihole by (uid=0)
Jan 03 21:39:01 namepi pihole-FTL[754]: dnsmasq: failed to create listening socket for port 53: Address already in use
Jan 03 21:39:01 namepi systemd[1]: Started LSB: pihole-FTL daemon.
netadmin@namepi:/etc/dnsmasq.d $ sudo netstat -ltunp | grep :53
tcp        0      0 192.168.55.9:53         0.0.0.0:*               LISTEN      26553/unbound       
tcp        0      0 192.168.55.1:53         0.0.0.0:*               LISTEN      498/nsd             
tcp        0      0 0.0.0.0:5355            0.0.0.0:*               LISTEN      31052/systemd-resol 
udp        0      0 192.168.55.9:53         0.0.0.0:*                           26553/unbound       
udp        0      0 127.0.0.53:53           0.0.0.0:*                           31052/systemd-resol 
udp        0      0 192.168.55.1:53         0.0.0.0:*                           498/nsd             
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           344/avahi-daemon: r 
udp        0      0 0.0.0.0:5355            0.0.0.0:*                           31052/systemd-resol 
netadmin@namepi:

Harry

With troubleshooting, try to minimize eg put below in the 10-mypiholesetup.conf file:

bind-dynamic
listen-address=172.25.25.146,127.0.0.1

Or try bind to 172.25.25.146 only:

bind-dynamic
listen-address=172.25.25.146
netadmin@namepi:/etc/dnsmasq.d $ cat 10-mypiholesetup.conf 
bind-dynamic
listen-address=172.25.25.146,127.0.0.1
netadmin@namepi:
netadmin@namepi:/etc/dnsmasq.d $ sudo service dnsmasq restart
netadmin@namepi:/etc/dnsmasq.d $ sudo service dnsmasq status
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
   Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2020-01-03 21:44:38 GMT; 12s ago
  Process: 862 ExecStop=/etc/init.d/dnsmasq systemd-stop-resolvconf (code=exited, status=0/SUCCESS)
  Process: 909 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf (code=exited, status=0/SUCCESS)
  Process: 900 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=0/SUCCESS)
  Process: 897 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
 Main PID: 908 (dnsmasq)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/dnsmasq.service
           └─908 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -r /run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new

Jan 03 21:44:37 namepi systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Jan 03 21:44:37 namepi dnsmasq[897]: dnsmasq: syntax check OK.
Jan 03 21:44:38 namepi systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
netadmin@namepi:/etc/dnsmasq.d $ sudo netstat -ltunp | grep :53
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      908/dnsmasq         
tcp        0      0 172.25.25.146:53        0.0.0.0:*               LISTEN      908/dnsmasq         
tcp        0      0 192.168.55.9:53         0.0.0.0:*               LISTEN      26553/unbound       
tcp        0      0 192.168.55.1:53         0.0.0.0:*               LISTEN      498/nsd             
tcp        0      0 0.0.0.0:5355            0.0.0.0:*               LISTEN      31052/systemd-resol 
udp        0      0 127.0.0.1:53            0.0.0.0:*                           908/dnsmasq         
udp        0      0 172.25.25.146:53        0.0.0.0:*                           908/dnsmasq         
udp        0      0 192.168.55.9:53         0.0.0.0:*                           26553/unbound       
udp        0      0 127.0.0.53:53           0.0.0.0:*                           31052/systemd-resol 
udp        0      0 192.168.55.1:53         0.0.0.0:*                           498/nsd             
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           344/avahi-daemon: r 
udp        0      0 0.0.0.0:5355            0.0.0.0:*                           31052/systemd-resol 
netadmin@namepi:/etc/dnsmasq.d $ sudo service dnsmasq stop
netadmin@namepi:/etc/dnsmasq.d $ sudo service pihole-FTL start
netadmin@namepi:/etc/dnsmasq.d $ sudo service pihole-FTL status
● pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled)
   Active: active (exited) since Fri 2020-01-03 21:39:01 GMT; 7min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 377 ExecStop=/etc/init.d/pihole-FTL stop (code=exited, status=0/SUCCESS)
  Process: 754 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/pihole-FTL.service

Jan 03 21:39:00 namepi systemd[1]: Starting LSB: pihole-FTL daemon...
Jan 03 21:39:00 namepi pihole-FTL[754]: Not running
Jan 03 21:39:00 namepi su[784]: Successful su for pihole by root
Jan 03 21:39:00 namepi su[784]: + ??? root:pihole
Jan 03 21:39:00 namepi su[784]: pam_unix(su:session): session opened for user pihole by (uid=0)
Jan 03 21:39:01 namepi pihole-FTL[754]: dnsmasq: failed to create listening socket for port 53: Address already in use
Jan 03 21:39:01 namepi systemd[1]: Started LSB: pihole-FTL daemon.
netadmin@namepi:/etc/dnsmasq.d $ sudo netstat -ltunp | grep :53
tcp        0      0 192.168.55.9:53         0.0.0.0:*               LISTEN      26553/unbound       
tcp        0      0 192.168.55.1:53         0.0.0.0:*               LISTEN      498/nsd             
tcp        0      0 0.0.0.0:5355            0.0.0.0:*               LISTEN      31052/systemd-resol 
udp        0      0 192.168.55.9:53         0.0.0.0:*                           26553/unbound       
udp        0      0 127.0.0.53:53           0.0.0.0:*                           31052/systemd-resol 
udp        0      0 192.168.55.1:53         0.0.0.0:*                           498/nsd             
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           344/avahi-daemon: r 
udp        0      0 0.0.0.0:5355            0.0.0.0:*                           31052/systemd-resol 
netadmin@namepi:/etc/dnsmasq.d $

Nope sorry

Ps, I'm missing below file from that grep:

pi@noads:~ $ cat /etc/dnsmasq.conf
conf-dir=/etc/dnsmasq.d

EDIT: Hahahaha, all the configs in the world dont matter if dont have that one :wink:

yep, I moved everything matching /etc/dnsmasq.* out.
Does not seem to matter, but I'll put a minimal dnsmasq.conf back

No!
Put in exact default:

conf-dir=/etc/dnsmasq.d

EDIT:

pi@noads:~ $ man dnsmasq
[..]
CONFIG FILE
       At startup, dnsmasq reads /etc/dnsmasq.conf, if it exists.  (On
       FreeBSD, the file is /usr/local/etc/dnsmasq.conf ) (but see the
       -C and -7 options.) The format of this  file  consists  of  one
       option  per  line,  exactly as the long options detailed in the
       OPTIONS section but without the leading  "--".  Lines  starting
       with  # are comments and ignored. For options which may only be
       specified once, the configuration file  overrides  the  command
       line.   Quoting  is  allowed in a config file: between " quotes
       the special meanings of ,:. and # are removed and the following
       escapes are allowed: \\ \" \t \e \b \r and \n. The later corre‐
       sponding to tab, escape, backspace, return and newline.
[..]
       -7, --conf-dir=<directory>[,<file-extension>......],
              Read  all the files in the given directory as configura‐
              tion files. If extension(s) are given, any  files  which
              end  in  those  extensions  are skipped. Any files whose
              names end in ~ or start with . or start and end  with  #
              are  always skipped. If the extension starts with * then
              only files which have  that  extension  are  loaded.  So
              --conf-dir=/path/to/dir,*.conf  loads all files with the
              suffix .conf in /path/to/dir. This flag may be given  on
              the  command  line or in a configuration file. If giving
              it on the command line, be sure to escape * characters.
[..]

The line is commented out in the original config file, which has all the default options in as comments. I'll make double sure and add it explicitly.

-conf-dir=/dnsmasq.d/,*.conf to load only files end .conf

netadmin@namepi:~/dnsmasq_rubbish $ sudo grep -v '^#\|^$' -R /etc/dnsmasq.* | sort
/etc/dnsmasq.conf:conf-dir=/etc/dnsmasq.d/,*.conf
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/black.list
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/gravity.list
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/local.list
/etc/dnsmasq.d/01-pihole.conf:bogus-priv
/etc/dnsmasq.d/01-pihole.conf:cache-size=10000
/etc/dnsmasq.d/01-pihole.conf:domain-needed
/etc/dnsmasq.d/01-pihole.conf:except-interface=nonexisting
/etc/dnsmasq.d/01-pihole.conf:localise-queries
/etc/dnsmasq.d/01-pihole.conf:local-ttl=2
/etc/dnsmasq.d/01-pihole.conf:log-async
/etc/dnsmasq.d/01-pihole.conf:log-facility=/var/log/pihole.log
/etc/dnsmasq.d/01-pihole.conf:log-queries
/etc/dnsmasq.d/01-pihole.conf:no-resolv
/etc/dnsmasq.d/01-pihole.conf:server=192.168.55.9#53
/etc/dnsmasq.d/10-mypiholesetup.conf:bind-dynamic
/etc/dnsmasq.d/10-mypiholesetup.conf:listen-address=172.25.25.146,127.0.0.1

I meant Pi-hole default.

Not sure what your doing now.
Why not default ?
Why not try first whats proven to work ?

netadmin@namepi:~/dnsmasq_rubbish $ sudo service dnsmasq stop
netadmin@namepi:~/dnsmasq_rubbish $ sudo service pihole-FTL start
netadmin@namepi:~/dnsmasq_rubbish $ sudo service pihole-FTL status
● pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled)
   Active: active (exited) since Fri 2020-01-03 22:28:42 GMT; 7s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2557 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)

Jan 03 22:28:42 namepi systemd[1]: Starting LSB: pihole-FTL daemon...
Jan 03 22:28:42 namepi pihole-FTL[2557]: Not running
Jan 03 22:28:42 namepi su[2586]: Successful su for pihole by root
Jan 03 22:28:42 namepi su[2586]: + ??? root:pihole
Jan 03 22:28:42 namepi su[2586]: pam_unix(su:session): session opened for user pihole by (uid=0)
Jan 03 22:28:42 namepi pihole-FTL[2557]: FTL started!
Jan 03 22:28:42 namepi systemd[1]: Started LSB: pihole-FTL daemon.
netadmin@namepi:~/dnsmasq_rubbish $ sudo netstat -ltunp | grep ":53 "
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      2601/pihole-FTL     
tcp        0      0 172.25.25.146:53        0.0.0.0:*               LISTEN      2601/pihole-FTL     
tcp        0      0 192.168.55.9:53         0.0.0.0:*               LISTEN      26553/unbound       
tcp        0      0 192.168.55.1:53         0.0.0.0:*               LISTEN      498/nsd             
udp        0      0 127.0.0.1:53            0.0.0.0:*                           2601/pihole-FTL     
udp        0      0 172.25.25.146:53        0.0.0.0:*                           2601/pihole-FTL     
udp        0      0 192.168.55.9:53         0.0.0.0:*                           26553/unbound       
udp        0      0 127.0.0.53:53           0.0.0.0:*                           31052/systemd-resol 
udp        0      0 192.168.55.1:53         0.0.0.0:*                           498/nsd             
netadmin@namepi:~/dnsmasq_rubbish $
1 Like

Cheers!

:grinning::grinning::grinning::grinning::grinning:

Now go add cherries!

:cherries::cherries::cherries::cherries::cherries:

The admin gui is working properly.

I'll do some more testing, some of the commands we deleted are needed to stop it issuing dhcp offers to the dummy interfaces etc. Need to work on the blocklist as well, its empty at the moment.

But thanks for the help and the systematic guidance.

Goodnight.

PS the only thing I did differently before that last test was to issue a systemctl daemon-reload.

No warning it was required, just a feeling.
Dont you just love systemd

Harry

netadmin@namepi:~/dnsmasq_rubbish $ sudo systemctl  daemon-reload
netadmin@namepi:~/dnsmasq_rubbish $ sudo grep -v '^#\|^$' -R /etc/dnsmasq.* | sort
/etc/dnsmasq.conf:conf-dir=/etc/dnsmasq.d/,*.conf
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/black.list
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/gravity.list
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/local.list
/etc/dnsmasq.d/01-pihole.conf:bogus-priv
/etc/dnsmasq.d/01-pihole.conf:cache-size=10000
/etc/dnsmasq.d/01-pihole.conf:domain-needed
/etc/dnsmasq.d/01-pihole.conf:except-interface=nonexisting
/etc/dnsmasq.d/01-pihole.conf:localise-queries
/etc/dnsmasq.d/01-pihole.conf:local-ttl=2
/etc/dnsmasq.d/01-pihole.conf:log-async
/etc/dnsmasq.d/01-pihole.conf:log-facility=/var/log/pihole.log
/etc/dnsmasq.d/01-pihole.conf:log-queries
/etc/dnsmasq.d/01-pihole.conf:no-resolv
/etc/dnsmasq.d/01-pihole.conf:server=192.168.55.9#53
/etc/dnsmasq.d/10-mypiholesetup.conf:bind-dynamic
/etc/dnsmasq.d/10-mypiholesetup.conf:listen-address=172.25.25.146,127.0.0.1
netadmin@namepi:~/dnsmasq_rubbish $ sudo service dnsmasq stop
netadmin@namepi:~/dnsmasq_rubbish $ sudo service pihole-FTL start
netadmin@namepi:~/dnsmasq_rubbish $ sudo service pihole-FTL status
● pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled)
   Active: active (exited) since Fri 2020-01-03 22:28:42 GMT; 7s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2557 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)

Jan 03 22:28:42 namepi systemd[1]: Starting LSB: pihole-FTL daemon...
Jan 03 22:28:42 namepi pihole-FTL[2557]: Not running
Jan 03 22:28:42 namepi su[2586]: Successful su for pihole by root
Jan 03 22:28:42 namepi su[2586]: + ??? root:pihole
Jan 03 22:28:42 namepi su[2586]: pam_unix(su:session): session opened for user pihole by (uid=0)
Jan 03 22:28:42 namepi pihole-FTL[2557]: FTL started!
Jan 03 22:28:42 namepi systemd[1]: Started LSB: pihole-FTL daemon.
netadmin@namepi:~/dnsmasq_rubbish $ sudo netstat -ltunp | grep ":53 "
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      2601/pihole-FTL     
tcp        0      0 172.25.25.146:53        0.0.0.0:*               LISTEN      2601/pihole-FTL     
tcp        0      0 192.168.55.9:53         0.0.0.0:*               LISTEN      26553/unbound       
tcp        0      0 192.168.55.1:53         0.0.0.0:*               LISTEN      498/nsd             
udp        0      0 127.0.0.1:53            0.0.0.0:*                           2601/pihole-FTL     
udp        0      0 172.25.25.146:53        0.0.0.0:*                           2601/pihole-FTL     
udp        0      0 192.168.55.9:53         0.0.0.0:*                           26553/unbound       
udp        0      0 127.0.0.53:53           0.0.0.0:*                           31052/systemd-resol 
udp        0      0 192.168.55.1:53         0.0.0.0:*                           498/nsd             
netadmin@namepi:~/dnsmasq_rubbish $

pihole-FTL(dnsmasq) is no network manager or dhcp client.
For Raspbian + Pi-hole default, dhcpcd5 does the assigning of IP addresses to interfaces:

pi@noads:~ $ apt policy dhcpcd5
dhcpcd5:
  Installed: 1:6.11.5-1+rpt7

pi@noads:~ $ man dhcpcd5
[..]
DESCRIPTION
     dhcpcd is an implementation of the DHCP client specified in RFC
     2131.  dhcpcd gets the host information (IP address, routes, etc)
     from a DHCP server and configures the network interface of the
     machine on which it is running.  dhcpcd then runs the configura‐
     tion script which writes DNS information to resolvconf(8), if
     available, otherwise directly to /etc/resolv.conf.  If the host‐
     name is currently blank, (null) or localhost, or force_hostname
     is YES or TRUE or 1 then dhcpcd sets the hostname to the one sup‐
     plied by the DHCP server.  dhcpcd then daemonises and waits for
     the lease renewal time to lapse.  It will then attempt to renew
     its lease and reconfigure if the new lease changes when the lease
     beings to expire or the DHCP server sends message to renew early.

     If any interface reports a working carrier then dhcpcd will try
     and obtain a lease before forking to the background, otherwise it
     will fork right away.  This behaviour can be modified with the
     -b, --background and -w, --waitip options.
[..]

pi@noads:~ $ tail /etc/dhcpcd.conf
interface eth0
  static ip_address=10.0.0.2/24
  static routers=10.0.0.1
  static domain_name_servers=127.0.0.1

pi@noads:~ $ service dhcpcd status
[..]
   Active: active (running) since Tue 2019-12-03 23:04:20 CET; 1 months
[..]

EDIT: Or do you mean its running its own DHCP service ?
Currently, pihole-FTL is not configured to serve DHCP.

@shoka. This has been quite a long thread, and it appears that your problem is resolved? If so, can you post a short summary of the problem you originally noted and what steps fixed the problem?