Dnsmasq inactive, falling back to fallback DNS


#1

Currently, none of my traffic goes through the filtering, it seems to fallback to the fallback DNS.

I ran the debugger and saw that dnsmasq isn’t working.

I’ve run this as well:

sudo netstat -nltup | grep ‘Proto|:53 |:67 |:80 |:471’

And saw that FTL is running:

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:4711 0.0.0.0:* LISTEN 11602/pihole-FTL
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 7067/lighttpd
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 11602/pihole-FTL
tcp6 0 0 ::1:4711 :::* LISTEN 11602/pihole-FTL
tcp6 0 0 :::80 :::* LISTEN 7067/lighttpd
tcp6 0 0 :::53 :::* LISTEN 11602/pihole-FTL
udp 0 0 0.0.0.0:53 0.0.0.0:* 11602/pihole-FTL
udp6 0 0 :::53 :::* 11602/pihole-FTL

Debug Token:

ame8qfp7ug


#2

What “fallback” DNS do you have set and where?


#3

@jfb in this file:

/etc/systemd/resolved.conf

I had to do this manually because during the install Pi had no access to the outside world and setup didn’t finish properly.


#4

Why did you edit that file. Better is to edit /etc/resolve.conf because that will reverted once Pi-hole is running or rebooted.

Now you have petmantly overwritten you settings.


#5

@msatter I don’t know why. I went over 30 posts here and tried different stuff to make it work.
What should I put in /etc/resolve.conf then?


#6

I asked the developers to automate it when DNS resolution does not work. I lost count of users helped by this solution and it is often mentioned in the past weeks.

If pinhole don’t want to repair or update put 8.8.8.8 in resolve…can also a be an other working DNS upstream server as long it is listening on port 53. My unbound was running on 5353 so that was a death duck to pihole. As soon as pinole was running it would receive that duck.


#7

@msatter can you post me the exact input for /etc/resolv.conf? is it the same as resolver.conf?
Currently my resolv.conf has only the nameserver.

Thank you!


#9

Before you wanted to upgrade:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1 

If an update or repair does not have a working DNS server to answer the DNS requests you change it in:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8

After completion it is changed back to:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1

This because I don’t have changed any config files that configurate resolv.conf.


#10

@msatter thanks, but I don’t understand.
What upgrade?
I have a fresh install of Pihole that just doesn’t work.


#11

You went over 30 post over here and there must be have been one in them changing resolv.conf to obtain access to a DNS server.

It does not work because you have changed the the wrong file and now you are stuck with it until you change it back to what it was.

My resolved.con in systemd reads:

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# See resolved.conf(5) for details

[Resolve]
#DNS=

If you install Pihole or/and Unbound they all look at this data and know how to set things to have it working together and especially working for you.

My /etc/resolv.conf is a link to /etc/resolvconf/run/resolv.conf and the word “run” implies that it is dynamic and and formed by interaction of the programs that provide DNS services.

So make you resolv.conf in systemd default again. Try run pihole -r and if it does not find DNS servers then change /etc/resolv.conf as indicated before and rerun pihole -r.

This almost, fixed all non running pi-hole setups till now.


#12

@msatter ok, I’ve done it, issue still remains the same.

After further checking I saw that dnsmasq isn’t even installed on my Pi. When I do install it then FTL can’t start (I assume they listen to the same port).

Also, dnsmasq.conf wasn’t including 01-pihole.conf file, I fixed that too (I assume its supposed to include it).

Now, when running debug, I see this:

*** [ DIAGNOSING ]: Networking
[✗] No IPv4 address(es) found on the wlan0 interface.

[✗] No IPv6 address(es) found on the wlan0 interface.

[i] Default IPv4 gateway: 192.168.0.1

*** [ DIAGNOSING ]: Ports in use
*:22 sshd (IPv4)
*:22 sshd (IPv6)
*:53 dnsmasq (IPv4)
*:53 dnsmasq (IPv6)
*:80 lighttpd (IPv4)
*:80 lighttpd (IPv6)

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] wrxviatrhzoists.review is 162.255.119.155 via localhost (127.0.0.1)
[✗] Failed to resolve wrxviatrhzoists.review via Pi-hole (192.168.0.100)
[✓] doubleclick.com is 216.58.210.14 via a remote, public DNS server (8.8.8.8)

*** [ DIAGNOSING ]: Pi-hole processes
[✓] dnsmasq daemon is active
[✓] lighttpd daemon is active
[✓] pihole-FTL daemon is active

So…

  1. Installing DNSMasq manually was a good idea? if so, what I do about FTL?
  2. Should I give up on life now? :frowning:

Thanks


#13

Pihole-FTL contains DNSmasq and installing DNSmasq next to it is not good, think Bitchfight.

No need for drastic measures, there is still hope for you!

Remove DNSmasq by using apt remove dnsmasq dnsmasq-base dnsmast-utils
Remove the added dnsmasq.conf in your 01-pihole.conf

Then rerun pihole debug

remarks: I notice that you are on a WiFi connection wlan0 and you get ping: Warning: source address might be selected on device other than wlan0.

[✓] wrxviatrhzoists.review is 162.255.119.155 via localhost (127.0.0.1)
[✗] Failed to resolve wrxviatrhzoists.review via Pi-hole (192.168.0.100)
[✓] doubleclick.com is 216.58.210.14 via a remote, public DNS server (8.8.8.8)

So 127.0.0.1 is resolving but probably through the wrong requester. DNSmasq and not Pihole.
8.8.8.8 is still working so after removing DNSmasq run pihole -r


#14

Ok, so I figured what the issue was.

I used Ethernet and not WiFi to connect my Pi. Completely forgot about it, usually my Pies connected via WiF.

I re-installed, and it all works now.

SOORRRYYYY for wasting your time,
@msatter thank you!!


#15

You didn’t wasted my time and I am also still learning and I like to help other users like I me.