PiHole Noob Confusion

Expected Behaviour:

PiHole to work and be accessable from network

Actual Behaviour:

PiHole /works/ with blocking ads on ALL network devices, but pi does not see the internet, although blocking and forwarding IS working correctly through several DNS uplinks including Unbound on same device.

Everything appears to be setup correctly because blocks are happening. Pi is set as DHCP, router correctly forwards the requests from networked devices, including secondary router set in AP mode only which is currently running Open.WRT.

I'd like to be able to access the internet from the Pi as my Windows machine has a broken install and I would need internet to repair it.

If I have missed anything, I apologize, as mentioned, total Pi/Linux noob.

Debug Token:

Unable to upload debug as Pi cannot see the internet.

Hi,
It seems complicated to help you with the information you provided...
From my Windows computer, I can ssh using putty to my pi-hole device which has 192.168.2.3 ip address.
Once there, I can simply ping www.google.com for example, showing I am connected to the internet from that pi-hole device.
If you need a web browser, then there are tutorials like this one:
pi gui

The Router has an IP of 192.168.1.1 (yes I know this is insecure but my ISP said I can't have a 10.0.x.x)

Network Switch is on 192.168.1.2

WiFi AP is at 192.168.1.111

PiHole is on 192.168.1.222 LAN
PiHole 192.168.1.221 WiFi
PiHole 192.168.1.201 USB LAN

I cannot connect to any of them to the pi at all! SSH and CLI are active, I can sometimes ping the .222 from my phone but not from the pi itself. It is actively blocking, the request show on the log, and my Roku device is skipping right past 95% of ads.

The pi itself is a 3b if it makes any difference, with a 32GB SDHC. I used the app from official website to install... I'm just miffed I cannot see the internet from the pi but everything else is working as it should.

Why is this insecure? This is a private IP range and normal for use on a LAN.

Note this is different than the public IP on the WAN side of the router. The router hides all your IP's that are on the LAN side.

Run a debug log and inspect the contents. At the top, you should see the IP and interface in use by the Pi. A bit below that is a test to see if ad blocking is working and if the Pi responds to internal and external queries. All of these should be checked. An example output of these sections are below. The router is at IP 1, the Pi is at IP 100 on eth0 interface. Pi-hole responds to queries on that IP.

*** [ DIAGNOSING ]: Networking
[✓] IPv4 address(es) bound to the eth0 interface:
    192.168.0.100/24

[✓] IPv6 address(es) bound to the eth0 interface:
    fe80::e524:d832:de6f:eafe/64

[i] Default IPv4 gateway: 192.168.0.1
   * Pinging 192.168.0.1...
[✓] Gateway responded.

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] alphahaul.com is 0.0.0.0 on lo (127.0.0.1)
[✓] alphahaul.com is 0.0.0.0 on eth0 (192.168.0.100)
[✓] doubleclick.com is 142.250.190.78 via a remote, public DNS server (8.8.8.8)

If you prefer, you can copy your debug log to your clipboard and PM it to me.

I ran the debug script and copied the log over to another device and I'll PM it, as a new user, it sees most of it as links. Cannot PM so Ill copy some parts here.

 * Received 300 bytes from eth0:192.168.1.201
     Offered IP address: 192.168.1.54
     Server IP address: 192.168.1.201
     Relay-agent IP address: N/A
     BOOTP server: (empty)
     BOOTP file: (empty)
     DHCP options:
      Message type: DHCPOFFER (2)
      server-identifier: 192.168.1.201
      lease-time: 31536000 ( 365d )
      renewal-time: 15768000 ( 182d 12h )
      rebinding-time: 27594000 ( 319d 9h )
      netmask: 255.255.255.0
      broadcast: 192.168.1.255
      dns-server: 192.168.1.201
      domain-name: "lan"
      router: 192.168.1.1
      * Received 300 bytes from eth1:192.168.1.222
   --- end of options ---
    
     Offered IP address: 192.168.1.201
     Server IP address: 192.168.1.222
     Relay-agent IP address: N/A
     BOOTP server: (empty)
     BOOTP file: (empty)
     DHCP options:
      Message type: DHCPOFFER (2)
      server-identifier: 192.168.1.222
      lease-time: 31536000 ( 365d )
      renewal-time: 15768000 ( 182d 12h )
      rebinding-time: 27594000 ( 319d 9h )
      netmask: 255.255.255.0
      broadcast: 192.168.1.255
      dns-server: 192.168.1.222
      domain-name: "lan"
      router: 192.168.1.1
      --- end of options ---
    
   * Received 300 bytes from wlan0:192.168.1.221
     Offered IP address: 192.168.1.15
     Server IP address: 192.168.1.221
     Relay-agent IP address: N/A
     BOOTP server: (empty)
     BOOTP file: (empty)
     DHCP options:
      Message type: DHCPOFFER (2)
      server-identifier: 192.168.1.221
      lease-time: 31536000 ( 365d )
      renewal-time: 15768000 ( 182d 12h )
      rebinding-time: 27594000 ( 319d 9h )
      netmask: 255.255.255.0
      broadcast: 192.168.1.255
      dns-server: 192.168.1.221
      domain-name: "lan"
      router: 192.168.1.1
      --- end of options ---
    
   DHCP packets received on interface wlan0: 1
   DHCP packets received on interface lo: 0
   DHCP packets received on interface eth0: 1
   DHCP packets received on interface eth1: 1
e[95m*** [ DIAGNOSING ]:e[0m Pi-hole processes
[e[32m✓e[0m] e[32mlighttpde[0m daemon is e[32mactivee[0m
[e[32m✓e[0m] e[32mpihole-FTLe[0m daemon is e[32mactivee[0m

e[95m*** [ DIAGNOSING ]:e[0m Pi-hole-FTL full status
   ● pihole-FTL.service - LSB: pihole-FTL daemon
     Loaded: loaded (/etc/init.d/pihole-FTL; generated)
     Active: active (exited) since Wed 2021-12-01 08:11:48 GMT; 10h ago
       Docs: man:systemd-sysv-generator(8)
    Process: 7922 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)
        CPU: 153ms

Full log can be found on my GDrive: Link removed by moderator

Format the text as preformatted text and the links won't be generated.

This is done with the </> icon in the format window.

I retrieved your debug log and removed the link from your reply. You don't want to post the log publicly - it may contain private information.

Thanks! :slight_smile: Reposted log.

Don't do this.

Like I said, complete pi noob here... I thought the log was needed to work out what's wrong? Or should I just reimage?

I have your log, and it's privately shared among the developers, not with the public.

Sorry, just pulling out my hair here lol

You have an odd configuration on this Pi - multiple IP's assigned to the same interface, multiple DHCP servers running (which appears to be the same Pi-hole on different IP's on the interface).

*** [ DIAGNOSING ]: Networking
[✓] IPv4 address(es) bound to the eth0 interface:
    192.168.1.201/24
    192.168.1.222/24

*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
   Scanning all your interfaces for DHCP servers
   Timeout: 10 seconds
   
   * Received 300 bytes from eth0:192.168.1.201
     Offered IP address: 192.168.1.54
     Server IP address: 192.168.1.201
     Relay-agent IP address: N/A
     BOOTP server: (empty)
     BOOTP file: (empty)
     DHCP options:
      Message type: DHCPOFFER (2)
      server-identifier: 192.168.1.201
      lease-time: 31536000 ( 365d )
      renewal-time: 15768000 ( 182d 12h )
      rebinding-time: 27594000 ( 319d 9h )
      netmask: 255.255.255.0
      broadcast: 192.168.1.255
      dns-server: 192.168.1.201
      domain-name: "lan"
      router: 192.168.1.1
      * Received 300 bytes from eth1:192.168.1.222
   --- end of options ---
    
     Offered IP address: 192.168.1.201
     Server IP address: 192.168.1.222
     Relay-agent IP address: N/A
     BOOTP server: (empty)
     BOOTP file: (empty)
     DHCP options:
      Message type: DHCPOFFER (2)
      server-identifier: 192.168.1.222
      lease-time: 31536000 ( 365d )
      renewal-time: 15768000 ( 182d 12h )
      rebinding-time: 27594000 ( 319d 9h )
      netmask: 255.255.255.0
      broadcast: 192.168.1.255
      dns-server: 192.168.1.222
      domain-name: "lan"
      router: 192.168.1.1
      --- end of options ---
    
   * Received 300 bytes from wlan0:192.168.1.221
     Offered IP address: 192.168.1.15
     Server IP address: 192.168.1.221
     Relay-agent IP address: N/A
     BOOTP server: (empty)
     BOOTP file: (empty)
     DHCP options:
      Message type: DHCPOFFER (2)
      server-identifier: 192.168.1.221
      lease-time: 31536000 ( 365d )
      renewal-time: 15768000 ( 182d 12h )
      rebinding-time: 27594000 ( 319d 9h )
      netmask: 255.255.255.0
      broadcast: 192.168.1.255
      dns-server: 192.168.1.221
      domain-name: "lan"
      router: 192.168.1.1
      --- end of options ---
    
   DHCP packets received on interface wlan0: 1
   DHCP packets received on interface lo: 0
   DHCP packets received on interface eth0: 1
   DHCP packets received on interface eth1: 1

From the Pi terminal, what is the output of the following:

ip addr

I first tried the pihole -r before coming here, is that why? How do I fix this?

pi@raspberrypi:~ $ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:2d:af:ec brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.222/24 brd 192.168.1.255 scope global deprecated noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet6 fd01:2ca2:5fa3::158/128 scope global dynamic noprefixroute 
       valid_lft 2923sec preferred_lft 2923sec
    inet6 fd01:2ca2:5fa3:0:93e3:3c1a:158c:5513/64 scope global mngtmpaddr noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::7dd2:d26e:d00c:bff7/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0e:c6:a8:1d:4a brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.201/24 brd 192.168.1.255 scope global deprecated noprefixroute eth1
       valid_lft forever preferred_lft forever
    inet6 fd01:2ca2:5fa3::1b6/128 scope global dynamic noprefixroute 
       valid_lft 2921sec preferred_lft 2921sec
    inet6 fd01:2ca2:5fa3:0:5fa7:22d8:5729:a5d8/64 scope global mngtmpaddr noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::e9da:f18e:68a4:c5ee/64 scope link 
       valid_lft forever preferred_lft forever
4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:78:fa:b9 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.221/24 brd 192.168.1.255 scope global deprecated noprefixroute wlan0
       valid_lft forever preferred_lft forever
    inet6 fd01:2ca2:5fa3::1a5/128 scope global dynamic noprefixroute 
       valid_lft 3406sec preferred_lft 3406sec
    inet6 fd01:2ca2:5fa3:0:f848:f48b:f666:ba9a/64 scope global mngtmpaddr noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::f685:88aa:5c09:3bcf/64 scope link 
       valid_lft forever preferred_lft forever
pi@raspberrypi:~ $

How is this device connected to your network? By ethernet cable, WiFi or both?

It is connected through wlan0, eth0, and eth1... I was attempting to diagnose myself and had a USB LAN adapter from an old pc to hand. I have them all plugged in and both ethernets go directly to the router gateway at 1.1 and not the AP at 1.111...

I can disconnect them all and leave just wlan0 and eth0 if required

Pick one and eliminate the other two.

I disconnected both Eth wires, only wlan0 is connected and still no internet

Run pihole -r and select the reconfigure option to set up Pi-hole on the wlan0 interface and IP.

It tries to update local package cache, then fails for some reason and tells me to sudo update. When I run that command, it scrolls by with a ton of urls, and under each it says Network Unreachable, and then falls back to the pi@ line.

Please post the complete output of

sudo apt update