Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8621

Networking and servers • Re: Can only ping & SSH, despite no firewall (Bookworm)

$
0
0
Do you see anything more with sudo tcpdump -v -n port 5000 or icmp ?
Ok, that was enough to crack the case. Here's the output:

Code:

pi4@raspberrypi:~ $ sudo tcpdump -v -n port 5000 or icmptcpdump: listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes21:47:24.072290 IP (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 64)    192.168.50.186.65353 > 192.168.50.37.5000: Flags [S], cksum 0x6637 (correct), seq 2540104521, win 65535, options [mss 1460,nop,wscale 6,nop,nop,TS val 1298728873 ecr 0,sackOK,eol], length 021:47:24.072378 IP (tos 0xc0, ttl 64, id 20269, offset 0, flags [none], proto ICMP (1), length 92)    192.168.50.37 > 192.168.50.186: ICMP host 192.168.50.37 unreachable - admin prohibited filter, length 72IP (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 64)    192.168.50.186.65353 > 192.168.50.37.5000: Flags [S], cksum 0x6637 (correct), seq 2540104521, win 65535, options [mss 1460,nop,wscale 6,nop,nop,TS val 1298728873 ecr 0,sackOK,eol], length 0^C2 packets captured2 packets received by filter0 packets dropped by kernel
That portion, "unreachable - admin prohibited filter", seemed to confirm there was some kind of firewall. That led me to https://unix.stackexchange.com/a/552871, which explained the firewall management mechanisms might have changed in the OS.

I'd seen a reference to check iptables, which showed all traffic as accepted:

Code:

pi4@raspberrypi:~ $ sudo iptables -LChain INPUT (policy ACCEPT)target     prot opt source               destinationChain FORWARD (policy ACCEPT)...
Also ufw was not active (described in the OS docs):

Code:

pi4@raspberrypi:~ $ sudo ufw statusStatus: inactive
But reading that answer got me looking at nftables and firewalld. I did find firewalld running:

Code:

pi4@raspberrypi:~ $ systemctl status firewalld.service● firewalld.service - firewalld - dynamic firewall daemon     Loaded: loaded (/lib/systemd/system/firewalld.service; enabled; preset: enabled)     Active: active (running) since Sun 2025-05-25 20:06:30 EDT; 2h 6min ago       Docs: man:firewalld(1)   Main PID: 983 (firewalld)      Tasks: 2 (limit: 3892)        CPU: 2.169s     CGroup: /system.slice/firewalld.service             └─983 /usr/bin/python3 /usr/sbin/firewalld --nofork --nopid
The log output from that service shows various failures. I shut that down:

Code:

pi4@raspberrypi:~ $ sudo systemctl stop firewalld.service
And at that point, the curl worked.

Code:

❯ curl -v 192.168.50.37:5000*   Trying 192.168.50.37:5000...* Connected to 192.168.50.37 (192.168.50.37) port 5000> GET / HTTP/1.1...
I have a lot more to learn about all this, and I'm not sure how I got into this state (I did not intentionally touch firewalls at all), but wanted to respond promptly to share the progress. Thank you for all the help.

Statistics: Posted by more_of_a_tart_guy — Mon May 26, 2025 2:38 am



Viewing all articles
Browse latest Browse all 8621

Trending Articles