I recently re-arranged my home office, which required unplugging my router and Raspberry Pi 3 (among other things). Despite changing nothing besides the ethernet cable, I am now encountering the following problem.
I am able to SSH into my Raspbery Pi 3 (running Raspbian Buster) from my Windows machine. However, from inside the RPi, I am not able to ping/curl/wget/SSH any network resources:
- Remote domain names (
ping google.com
sends packages but receives none) - Remote IPs (
ping 1.1.1.1
) - LAN IPS (
ping 192.168.0.120
, my Windows box) - The LAN router (
ping 192.168.0.1
)
Each of these operations time out.
Configuration
/etc/network/interfaces
source-directory /etc/network/interfaces.d
/etc/dhcpcd.conf
hostname
clientid
persistent
option rapid_commit
option interface_mtu
require dhcp_server_identifier
slaac private
interface eth0
static ip_address=192.168.0.64/24
static routers=192.168.0.1
static domain_name_servers=127.0.0.1
Example ping
to LAN router
root@rpi3:~# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
^C
--- 192.168.0.1 ping statistics ---
6 packets transmitted, 0 received, 100% packet loss, time 190ms
ifconfig -a eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.64 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::ba27:ebff:fe9a:d30f prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:9a:d3:0f txqueuelen 1000 (Ethernet)
RX packets 1598 bytes 173011 (168.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4178 bytes 434471 (424.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
iptables -L
root@rpi3:~# sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
iptables --table nat --list --verbose
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
routes -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 202 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 202 0 0 eth0
Router information
MAC Address: E4:6F:13:FA:CC:C3
IP Address: 172.103.149.21
Subnet Mask: 255.255.255.192
Default Gateway: 172.103.149.1
Primary DNS Server: 192.168.0.64
Secondary DNS Server: 1.1.1.1
Other information
- I am using this RPi to run PiHole. It was working happily before I re-arranged the office. PiHole is still running but does not function properly, because it cannot send network requests.
- I have the following
crontab
:
0 0 * * Sun apt update && apt-upgrade -y
0 0 * * Sun pihole -up
Things I have tried
- Power cycle router and RPi (obviously)
- Remove reserved IP for RPi on the router
- Various configuration changes to
/etc/network/interfaces
, as described here.
My question
How is it possible that I am able to SSH into the RPi and execute all the above commands, but the RPi isn't even able to access hosts on the LAN?
UPDATE with info from a comment:
I re-installed Raspberry Pi OS, and verified that everything was working again. After installing PiHole, the problem reproduced. It seems that PiHole has either changed some configuration or one of its dependencies is causing the issue.
auto lo eth0 iface lo inet loopback iface eth0 inet manual
in it and my interfaces.d directory is empty. My dhcpcd.conf has the selected external dns servers in it. I have no firewall enabled - almost reads you have. Check withsudo iptables -L
– Jun 20 '20 at 21:45iptables -L
androutes -n
.My
– Colin Strong Jun 20 '20 at 22:05interfaces.d
directory is also empty. Is your interfaces file just empty?source-directory /etc/network/interfaces.d
NOTHING ELSE. – Dougie Jun 20 '20 at 22:37interfaces
file to have only the one line. No effect. Still can't even ping the router. – Colin Strong Jun 21 '20 at 00:53sudo iptables --table nat --list --verbose
. Attach the RasPi direct to the MS Windows box and ssh into the RasPi. Can youping 192.168.0.120
from the RasPi? – Ingo Jun 21 '20 at 09:02