Can't access web pages from outside?

Issues related to configuring your network
Post Reply
bristr
Posts: 32
Joined: 2014/05/22 19:07:03

Can't access web pages from outside?

Post by bristr » 2014/09/19 15:10:14

Hello, I'm dealing with a strange networking issue. I can't tell if it's Apache or my firewall.
I have a particular server I need to access from outside via web browser. I set up apache to listen on 6571 and I set up port forwarding so when I type domain.com:6571 it should go right to the page. I've done this before without any problems. However, I have a new server that this is not working for. The firewall rule is set up correctly, as I switched the destination to a known good server which worked without any problems. Apache itself is set up to listen on 6571 and I can even access the website internally via that port. This just makes no sense to me.

Thanks in advance.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Can't access web pages from outside?

Post by gerald_clark » 2014/09/19 15:18:40

What does "I can even access the website internally via that port" mean.
Show us the exact URL you are using.

emmet
Posts: 14
Joined: 2014/09/18 12:45:42

Re: Can't access web pages from outside?

Post by emmet » 2014/09/23 03:07:58

why not start troubleshooting it first internally.

Centos7 uses firewalld (and not iptables - thanks to gerald-clark in recommending firewalld).
First allow port 80 be open in your host machine by:

Code: Select all

firewall-cmd --add-port=80/tcp --permanent
once port 80 is open try to check it using curl or telnet from another machine.

for details see this topic > viewtopic.php?f=51&t=48595#p206437

Opening your webserver to the world would be a quick and easy part.

Have a nice day and happy sharing.

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Can't access web pages from outside?

Post by aks » 2014/09/23 19:42:25

Although the port would be 6571 (not 80)

bristr
Posts: 32
Joined: 2014/05/22 19:07:03

Re: Can't access web pages from outside?

Post by bristr » 2014/10/20 12:52:58

It turns out the default gateway had not been set up and the server wasn't able to access outside networks. I added the gateway to ifcfg-eth0 and it works now.
Thanks everyone.

Post Reply