本文共 1232 字,大约阅读时间需要 4 分钟。
[root@HZ-CDN-100 tempuser]# [root@HZ-CDN-100 tempuser]# [root@HZ-CDN-100 tempuser]# iptables -F[root@HZ-CDN-100 tempuser]# iptables -X[root@HZ-CDN-100 tempuser]# iptables -Z[root@HZ-CDN-100 tempuser]# iptables -A INPUT -p tcp --dport 654 -j ACCEPT[root@HZ-CDN-100 tempuser]# iptables -A INPUT -p tcp --dport 80 -j ACCEPT [root@HZ-CDN-100 tempuser]# iptables -A INPUT -p tcp --sport 53 -j ACCEPT [root@HZ-CDN-100 tempuser]# iptables -A INPUT -p udp --sport 53 -j ACCEPT [root@HZ-CDN-100 tempuser]# iptables -A INPUT -m state --state ESTABLISHED -j ACCEPT[root@HZ-CDN-100 tempuser]# iptables -P INPUT DROP[root@HZ-CDN-100 tempuser]# iptables -P FORWARD DROP[root@HZ-CDN-100 tempuser]# iptables -P OUTPUT ACCEPT[root@HZ-CDN-100 tempuser]# /etc/init.d/iptables saveiptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ][root@HZ-CDN-100 tempuser]# /etc/init.d/iptables restartiptables: Setting chains to policy ACCEPT: filter [ OK ]iptables: Flushing firewall rules: [ OK ]iptables: Unloading modules: [ OK ]iptables: Applying firewall rules: [ OK ][root@HZ-CDN-100 tempuser]#
转载于:https://blog.51cto.com/fangwenjun/1691046