You are not logged in.

#1 2015-12-06 22:47:14

NotNotLogical
Member
Registered: 2015-12-06
Posts: 6

Can't connect to port 80 on any of my servers

Hello,

I am attempting to set up an Apache server on my arch linux installation. This machine has an ethernet connection with a public IP address. I have tried repeatedly to connect from outside computers but it never works, and then I set up SSL in Apache and was able to connect just fine.

For testing, when I spin up a simple http server with

 $ sudo python3 -m http.server <port_here> --bind <public_ip_here> 

I can connect from other computers just fine, for all ports *except* 80. Then it doesn't work. It even works for port 443.

I am wondering why port 80 is being blocked and how I can fix this.

Offline

#2 2015-12-06 23:13:34

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: Can't connect to port 80 on any of my servers

I have no idea what that python command does nor what it is for.  But if/when you are running apache, what does and nmap of your server (from an outside computer) tell you?

Are you running iptables or any firewalls?  Are any being run on any intervening routers?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2015-12-06 23:53:01

NotNotLogical
Member
Registered: 2015-12-06
Posts: 6

Re: Can't connect to port 80 on any of my servers

When running nmap from another computer I get

Not shown: 998 closed ports
PORT   STATE    SERVICE
25/tcp filtered smtp
80/tcp filtered http

I'm not sure what the smtp is about. Nor what "filtered" means. When running on this computer (nmap localhost) I get

Not shown: 999 closed ports
PORT   STATE SERVICE
80/tcp open  http

(I no longer have port 443 open, that is intentional.)

Running

iptables -I INPUT -p TCP --dport 80 -j ACCEPT

outputs nothing.

I should note that I have been able to set up http servers on port 80 before from machines connected to the same ethernet cable, with the same ip address. That was running Ubuntu. So I'm sure it must be something specific to this arch linux system.

Last edited by NotNotLogical (2015-12-06 23:56:18)

Offline

#4 2015-12-07 00:15:45

NotNotLogical
Member
Registered: 2015-12-06
Posts: 6

Re: Can't connect to port 80 on any of my servers

Update: Running nmap from another computer outputs the same thing, even when my apache server is down.

It says

Not shown: 998 closed ports
PORT   STATE    SERVICE
25/tcp filtered smtp
80/tcp filtered http

regardless. So it looks like port 80 is already being used somehow. I am confused because this worked fine when I was on Ubuntu.

Offline

#5 2015-12-07 00:46:17

oliver
Member
Registered: 2007-12-12
Posts: 448

Re: Can't connect to port 80 on any of my servers

From the nmap manual:
Filtered means that a firewall, filter, or other network obstacle is blocking the port so that Nmap cannot tell whether it is open or closed

Try connecting while tcpdumping the interface (assuming it works locally beforehand)

Last edited by oliver (2015-12-07 00:46:59)

Offline

Board footer

Powered by FluxBB