You are not logged in.

#1 2021-03-24 19:33:04

abhivis
Member
Registered: 2021-03-24
Posts: 2

[CLOSED] All ports except 22 closed

Hi there!

I'm trying to listen on any port >1024 on my arch machine. Firstly, here's the output of iptables -n

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

I setup a server using the python -m http.server. This by default listens on all interfaces (0.0.0.0) and port 8000. I then run wget 192.168.18.6:8000 from my Rpi. The command failed with Connecting to 192.168.18.6:8000... failed: No route to host.

However, listening on port 22 by running python -m http.server 22 (obviously, as root and once again listening on all interfaces) and then running wget from the rpi works. I tried port 80 (as well as port 8000, listening as root), but none of those works. Running tcpdump for the port 8000 cases results in the following output:

01:00:23.495915 IP 192.168.18.139.36588 > archlinux.irdmi: Flags [S], seq 2381854528, win 64240, options [mss 1460,sackOK,TS val 1563787591 ecr 0

I port forwarded on my router and when listening on port 22, I can connect to the web server. However, port 8000 does not work.
If it helps, the arch machine is connected to my router over Wifi. While the rpi is connected to the same network over WiFi as well as Ethernet.
I'm running the linux-zen kernel. I haven't tried it with linux, though I don't think that would make a difference.

I'm really not sure what the issue here is. Thanks in advance for the help!

Last edited by abhivis (2021-03-25 16:07:19)

Offline

#2 2021-03-25 15:42:04

goro9922
Member
Registered: 2019-04-12
Posts: 28

Re: [CLOSED] All ports except 22 closed

Could it be SELinux? What is the output of sudo semanage port -l | grep http_port_t?

Offline

#3 2021-03-25 16:07:05

abhivis
Member
Registered: 2021-03-24
Posts: 2

Re: [CLOSED] All ports except 22 closed

Unless SELinux comes baked into one of those kernels, then it's unlikely SELinux is the problem.

Also, I "solved" the problem by simply reinstalling Arch. My best guess is that one of the many packages I had installed (and later removed) had left remnants in the table. (some of the packages were mininet and ufw and possibly firewalld).

Thanks for the help.

Offline

#4 2021-03-25 22:25:50

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

Re: [CLOSED] All ports except 22 closed

Please do not mark a thread [CLOSED] -- that is used by staff when a thread is not open for further replies. If you would like a thread closed or deleted, please use the Report link. If you consider your problem solved (even if you don't know exactly how reinstalling "solved" the problem), mark it [SOLVED].


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

Board footer

Powered by FluxBB