vi /etc/sysconfig iptables
# 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]
:RH-Firewall-1-INPUT - [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 //add this for ssh
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT //add this for mysql
-A INPUT -m state --state NEW -m tcp -p tcp --dport 2048 -j ACCEPT //add this for domain administration
-A INPUT -m state --state NEW -m tcp -p tcp --dport 2080 -j ACCEPT //add this for http
-A INPUT -m state --state NEW -m tcp -p tcp --dport 2081 -j ACCEPT //add this for https
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT
#-A RH-Firewall-1-INPUT -p tcp -m state -m tcp --dport 3306 --state NEW -j ACCEPT
#-A RH-Firewall-1-INPUT -p udp -m state -m udp --dport 3306 --state NEW -j ACCEPT
#-A RH-Firewall-1-INPUT -p tcp -m state -m tcp --dport 2048:2081 --state NEW -j ACCEPT
#-A RH-Firewall-1-INPUT -p udp -m state -m udp --dport 2048:2081 --state NEW -j ACCEPT
COMMIT
References:
http://www.yolinux.com/TUTORIALS/LinuxTutorialInitProcess.html
Friday, April 10, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment