07-10-2012, 02:21 AM
Alright I'm a complete novice when it comes to iptables on linux centos. I've been working with Windows all this time and decided to switch to linux recently. I've learned how to set up games server, startup scripts, web servers, and all the other goodies. The only thing I'm confused on now is the iptables and how to forward ports, block ports, and other types of stuff.
My current problem is that people are unable to connect to my website and game servers. They can connect if I run the command "service iptables stop" but I want iptables to be running at all times.
This is my current iptables configuration. Could anyone configure it to work for game servers and a website? It would really be appreciated.
My current problem is that people are unable to connect to my website and game servers. They can connect if I run the command "service iptables stop" but I want iptables to be running at all times.
This is my current iptables configuration. Could anyone configure it to work for game servers and a website? It would really be appreciated.
Code:
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-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
COMMIT