-A INPUT -j RH-Firewall-1-INPUT -A FORWARD -j RH-Firewall-1-INPUT -A RH-Firewall-1-INPUT -i lo -j ACCEPT -A RH-Firewall-1-INPUT -p icmp –icmp-type any -j ACCEPT -A RH-Firewall-1-INPUT -p 50 -j ACCEPT -A RH-Firewall-1-INPUT -p 51 -j ACCEPT -A RH-Firewall-1-INPUT -p udp –dport 5353 -d 224.0.0.251 -j ACCEPT -A RH-Firewall-1-INPUT -p udp -m udp –dport 631 -j ACCEPT -A RH-Firewall-1-INPUT -p tcp -m tcp –dport 631 -j ACCEPT -A RH-Firewall-1-INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT
# SSH, HTTP, FTP1, FTP2, MySQL -A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 10022 -j ACCEPT -A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT -A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 20 -j ACCEPT -A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 21 -j ACCEPT -A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 3306 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT –reject-with icmp-host-prohibited
COMMIT
/etc/rc.d/init.d/iptables restart /sbin/chkconfig auditd off /sbin/chkconfig autofs off /sbin/chkconfig avahi-daemon off /sbin/chkconfig bluetooth off /sbin/chkconfig cups off /sbin/chkconfig firstboot off /sbin/chkconfig gpm off /sbin/chkconfig haldaemon off /sbin/chkconfig hidd off /sbin/chkconfig isdn off /sbin/chkconfig kudzu off /sbin/chkconfig lvm2-monitor off /sbin/chkconfig mcstrans off /sbin/chkconfig mdmonitor off /sbin/chkconfig messagebus off /sbin/chkconfig netfs off /sbin/chkconfig nfslock off /sbin/chkconfig pcscd off /sbin/chkconfig portmap off /sbin/chkconfig rawdevices off /sbin/chkconfig restorecond off /sbin/chkconfig rpcgssd off /sbin/chkconfig rpcidmapd off /sbin/chkconfig smartd off /sbin/chkconfig xfs off /sbin/chkconfig yum-updatesd off reboot
ssh -p 10022 user@xxx.xxx.xxx.xxx su /usr/sbin/visudo
コメント