I have pihole installed in an old laptop that runs on ubuntu 18.04. The laptop currently sees ads and I can't seem to find the reason why. I haven't tried using pihole on other devices yet because I can't seem to get it running on its dedicated device.
WEBPASSWORD=not sure if I should share this
PIHOLE_INTERFACE=wlo1
IPV4_ADDRESS=192.168.2.151/24
IPV6_ADDRESS=
PIHOLE_DNS_1=8.8.8.8
PIHOLE_DNS_2=8.8.4.4
QUERY_LOGGING=true
INSTALL_WEB_SERVER=true
INSTALL_WEB_INTERFACE=true
LIGHTTPD_ENABLED=true
CACHE_SIZE=10000
DNS_FQDN_REQUIRED=true
DNS_BOGUS_PRIV=true
DNSMASQ_LISTENING=local
Most likely another DNS stub resolver is already running on your Ubuntu release.
You can see which one with below:
sudo netstat -nltup | grep 'Proto\|:53 '
If the netstat command is not available because its depreciated, you can try run below one:
sudo ss -nltup | grep 'Netid\|:53 '
If above ones dont show the pihole-FTL daemon listening on ports 53 TCP & UDP, you would need to find a way to kill the daemon thats listening now so pihole-FTL can take its place.
*** [ DIAGNOSING ]: Ports in use
[â] udp:0.0.0.0:53 is in use by pihole-FTL
udp:0.0.0.0:631 is in use by cups-browsed
udp:0.0.0.0:5353 is in use by avahi-daemon
udp:0.0.0.0:52682 is in use by avahi-daemon
[â] udp:[::]:53 is in use by pihole-FTL
udp:[::]:47815 is in use by avahi-daemon
udp:[::]:5353 is in use by avahi-daemon
[â] tcp:127.0.0.1:4711 is in use by pihole-FTL
[â] tcp:0.0.0.0:80 is in use by lighttpd
[â] tcp:0.0.0.0:53 is in use by pihole-FTL
tcp:127.0.0.1:631 is in use by cupsd
[â] tcp:[::1]:4711 is in use by pihole-FTL
[â] tcp:[::]:80 is in use by lighttpd
[â] tcp:[::]:53 is in use by pihole-FTL
tcp:[::1]:631 is in use by cupsd
[2022-07-06 13:26:03.743 20717M] Imported 16594 queries from the long-term database
[2022-07-06 13:26:03.743 20717M] -> Total DNS queries: 16594
[2022-07-06 13:26:03.743 20717M] -> Cached DNS queries: 8121
[2022-07-06 13:26:03.743 20717M] -> Forwarded DNS queries: 4260
[2022-07-06 13:26:03.743 20717M] -> Blocked DNS queries: 2644
[2022-07-06 13:26:03.743 20717M] -> Unknown DNS queries: 1265
[2022-07-06 13:26:03.743 20717M] -> Unique domains: 471
[2022-07-06 13:26:03.743 20717M] -> Unique clients: 10
thanks for your replies. I finally managed to get it working on its dedicated device.
Here's the new token : https://tricorder.pi-hole.net/04JRR8hN/
Unfortunately, I am not able to get my PC connected to the pi.
nslookup pihole
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 192.168.2.151
I can't even ping it
Pinging 192.168.2.151 with 32 bytes of data:
Reply from 192.168.2.2: Destination host unreachable.
Reply from 192.168.2.2: Destination host unreachable.
Reply from 192.168.2.2: Destination host unreachable.
Reply from 192.168.2.2: Destination host unreachable.
Ping statistics for 192.168.2.151:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
I should probably mention that both my pihole device and my PC are connected to the router via wifi.
Also, I've just checked my router settings and there is no AP isolation selected. That seems strange though, because I cannot ping any devices connected to the router at all.
@yubiuser , thats weird if the resolv.conf symlink is still active provided by systemd-resolved:
pi@ph5b:~ $ man systemd-resolved
[..]
âą Additionally, systemd-resolved provides a local DNS stub listener
on IP address 127.0.0.53 on the local loopback interface. Programs
issuing DNS requests directly, bypassing any local API may be
directed to this stub, in order to connect them to
systemd-resolved. Note however that it is strongly recommended that
local programs use the glibc NSS or bus APIs instead (as described
above), as various network resolution concepts (such as link-local
addressing, or LLMNR Unicode domains) cannot be mapped to the
unicast DNS protocol.
[..]
To improve compatibility,
/etc/resolv.conf is read in order to discover configured system DNS
servers, but only if it is not a symlink to
/run/systemd/resolve/stub-resolv.conf, /usr/lib/systemd/resolv.conf or
/run/systemd/resolve/resolv.conf (see below).
[..]
âą systemd-resolved maintains the
/run/systemd/resolve/stub-resolv.conf file for compatibility with
traditional Linux programs. This file may be symlinked from
/etc/resolv.conf. This file lists the 127.0.0.53 DNS stub (see
above) as the only DNS server. It also contains a list of search
domains that are in use by systemd-resolved. The list of search
domains is always kept up-to-date. Note that
/run/systemd/resolve/stub-resolv.conf should not be used directly
by applications, but only through a symlink from /etc/resolv.conf.
This file may be symlinked from /etc/resolv.conf in order to
connect all local clients that bypass local DNS APIs to
systemd-resolved with correct search domains settings. This mode of
operation is recommended.
And the systemd-resolved daemon isn't listed in the ss/ports list output.
Shouldnt the installer have taken care of that?
pi@ph5b:~ $ curl -sSL install.pi-hole.net | grep systemd-resolved -B3 -A10
# Systemd-resolved's DNSStubListener and dnsmasq can't share port 53.
disable_resolved_stublistener() {
printf " %b Testing if systemd-resolved is enabled\\n" "${INFO}"
# Check if Systemd-resolved's DNSStubListener is enabled and active on port 53
if check_service_active "systemd-resolved"; then
# Check if DNSStubListener is enabled
printf " %b %b Testing if systemd-resolved DNSStub-Listener is active" "${OVER}" "${INFO}"
if ( grep -E '#?DNSStubListener=yes' /etc/systemd/resolved.conf &> /dev/null ); then
# Disable the DNSStubListener to unbind it from port 53
# Note that this breaks dns functionality on host until dnsmasq/ftl are up and running
printf "%b %b Disabling systemd-resolved DNSStubListener" "${OVER}" "${TICK}"
# Make a backup of the original /etc/systemd/resolved.conf
# (This will need to be restored on uninstallation)
sed -r -i.orig 's/#?DNSStubListener=yes/DNSStubListener=no/g' /etc/systemd/resolved.conf
printf " and restarting systemd-resolved\\n"
systemctl reload-or-restart systemd-resolved
else
printf "%b %b Systemd-resolved does not need to be restarted\\n" "${OVER}" "${INFO}"
fi
else
printf "%b %b Systemd-resolved is not enabled\\n" "${OVER}" "${INFO}"
fi
}
@gk2803 , what does below one output after you restore connectivity?