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
时间: 2024-10-02 23:20:33