Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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 a server with Centos 6 on it and I have installed XAMPP on it. I have this server on static IP address.

But I can't access this server's IP address from other PCs. I tried to access XAMPP on another PC with a static IP address with Windows OS, and it works perfectly. Even accessing it from the server itself and it's open.

But I can't access the server IP from any other PC. I can ping the server. I can access SSH using Putty on the server and login. But I can't open the localhost of the server from any other computer on the network.

share|improve this question
up vote 0 down vote accepted

Maybe it could be your firewall. The default firewall of CentOS permits ssh input(tcp 22) and icmp(ping)

[root@ ~]# cat /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited

Try at first stopping your firewall issuing the following command:

[root@ ~]# /etc/init.d/iptables stop

Now, test if you can access your XAMPP server

After that, it could be a good catch to enable just the ports you need to access(80 or 443, or both):


iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT


iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT


iptables -A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports 80,443 -j ACCEPT
share|improve this answer

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.