设置端口只对本机开放
查看规则列表
iptables --line -nvL INPUT
根据id删除规则
iptables -t filter -D INPUT 3
更多命令示例:http://www.zsythink.net/archives/1517
端口只对本机开放 — 具体操作
iptables -F #清除预设表filter中的所有规则链的规则
iptables -I INPUT -p tcp --dport 9000 -j DROP
iptables -I INPUT -s <本机IP> -ptcp --dport 9000 -j ACCEPT
service iptables save
service iptables restart
© 版权声明
文章版权归作者所有,未经允许请勿转载。如内容涉嫌侵权,请在本页底部进入<联系我们>进行举报投诉!
THE END


















暂无评论内容