1. 程式人生 > >[Firewall] iptables Configuration

[Firewall] iptables Configuration

code nvl stat delete line cnblogs rul tcp fig

iptables usage:

Add Rules:
iptables -I INPUT -p tcp --dport 22 -j ACCEPT
iptables -I INPUT -p tcp --dport 1521 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp -s 192.168.1.0/24 --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT

Save Rules:
service iptables save
OR  /etc/rc.d/init.d/iptables save

Read Status
service iptables status
OR 
/etc/rc.d/init.d/iptables status iptables -nvL --line-number Delete Rules iptables -D INPUT 8 Update Rules iptables -R INPUT 3 -j ACCEPT

[Firewall] iptables Configuration