Nginx works on my linux machine but is not accessible from other computers in my local network

Posted by crooveck on Super User See other posts from Super User or by crooveck
Published on 2013-07-01T09:37:27Z Indexed on 2013/07/01 10:23 UTC
Read the original article Hit count: 150

In my LAN network I have a server with Scientific Linux (RedHat or Fedora based distro), I've done yum install nginx but the welcome page is not accessible from other computers in my network.

When I do telnet open localhost 80 and then GET / HTTP/1.0 I get some html code from nginx, so it's running for sure. But when I want to connect remotly, doing telnet open 192.168.3.130 80 I get:

Trying 192.168.3.130...
telnet: Unable to connect to remote host: No route to host

So I assume that there is something wrong with my network settings, maybe iptables or something else?

Next step, I turned off iptables: service iptables stop and it helped, now I can connect remotely using telnet.

So I think, I need to fix my iptables rules. I did some googling and found this rule -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT but it still didn't allow me to connect remotely when iptables is up.

Can someone please help me setting a proper iptables configuration?

© Super User or respective owner

Related posts about fedora

Related posts about redhat