0

When trying to ssh or ping my Raspberry Pi server on my LAN I get a "No route to host":

$ ping 192.168.50.249
                                                                                                         SIGINT(2) ↵  10146  16:43:15
PING 192.168.50.249 (192.168.50.249): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
ping: sendto: No route to host
Request timeout for icmp_seq 4
ping: sendto: Host is down
Request timeout for icmp_seq 5

This isn't an issue over ethernet and I can connect successfully.

The netstat command looks okay

$ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.50.1    0.0.0.0         UG        0 0          0 wlan0
192.168.50.0    0.0.0.0         255.255.255.0   U         0 0          0 wlan0

Port 22 is listening:

$ netstat -lpn | grep :22
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -
tcp6       0      0 :::22                   :::*                    LISTEN      -

And it looks like my firewall is appropriately configured:

$ sudo iptables-save | grep 22
-A ufw-before-input -d 224.0.0.251/32 -p udp -m udp --dport 5353 -j ACCEPT
-A ufw-user-input -p tcp -m tcp --dport 22 -j ACCEPT

The above commands are generally for ssh but I also can't ping.

I have an ASUS router and checked to see if AP Isolation is off - which it is.

The server itself can ping outside connections over Wi-Fi:

$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=58 time=20.5 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=58 time=26.8 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=58 time=18.8 ms

My best guess is the router is blocking connections but I can't find anything on there that would suggest so.

As a last resort, I've also tried reinstalling the OS but I'm getting the same issues.

Interestingly, I can access my server over Wi-Fi if the server itself is connected via ethernet.

Any help would be appreciated thanks.

Edit

A network scan on the server seems to only detect devices that are connected via ethernet

$ arp -a
? (192.168.50.1) at a0:36:bc:14:75:f0 [ether] on wlan0
? (192.168.50.203) at 00:1c:2b:52:a2:0d [ether] on wlan0
? (192.168.50.10) at 70:85:c2:d3:25:ec [ether] on wlan0
2
  • Do you detect others devices with a network scan?
    – JoelCrypto
    Commented Mar 8, 2023 at 20:00
  • @JoelCrypto $ arp -a ? (192.168.50.1) at a0:36:bc:14:75:f0 [ether] on wlan0 ? (192.168.50.203) at 00:1c:2b:52:a2:0d [ether] on wlan0 ? (192.168.50.10) at 70:85:c2:d3:25:ec [ether] on wlan0 It seems to only detect devices that are connected via ethernet
    – Sneek
    Commented Mar 8, 2023 at 20:51

1 Answer 1

0

No idea what the actual issue was but I resorted to backing up router settings, factory resetting it and testing - it worked.

I then restored the settings and it still worked so couldn't pinpoint the problem. Either way, the problem is solved now

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .