Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two network interfaces in my CentOS 5.8 machine, one with a local IP and one with an external, publicly available, IP. I'm running SSH and some other services. I can access these if I connect to the local IP of the machine from some other machine in the same local network. But if I connect from another machine to the external, public IP of the machine, I can't get in.

Even though I disabled the IPtables firewall with service iptables stop, it won't work. Any suggestions? I have tried with SELinux disabled (setenforce 0) and also by adding ports to the setup firewall configuration. I did check with netstat and both the SSH service and other services are listening to

share|improve this question
What did you get on the client when connecting via public IP? Also post the /var/log/secure on the server. – quanta Sep 20 '12 at 4:48
[root@xxx ~]# ssh ssh: connect to host port 22: Connection timed out Nothing is added to /var/log/secure – dataviruset Sep 20 '12 at 7:24
netstat -nlp | grep :22? – quanta Sep 20 '12 at 7:35
up vote 2 down vote accepted

Check that the router is forwarding the inbound traffic. Additionally, verify that there are no odd rules in /etc/hosts.deny.

share|improve this answer
Apparently there was some hardware firewall I didn't know of, so the problem wasn't in CentOS nor IPtables. Thanks for helping! – dataviruset Sep 20 '12 at 7:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.