歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> centos系統iptables使用幫助

centos系統iptables使用幫助

日期:2017/3/1 12:24:16   编辑:關於Linux
#如果只是想屏蔽IP的話“開放指定的端口”可以直接跳過。 #屏蔽單個IP的命令是 iptables -I INPUT -s 123.45.6.7 -j DROP #封整個段即從123.0.0.1到123.255.255.254的命令 iptables -I INPUT -s 123.0.0.0/8 -j DROP #封IP段即從123.45.0.1到123.45.255.254的命令 iptables -I INPUT -s 124.45.0.0/16 -j DROP #封IP段即從123.45.6.1到123.45.6.254的命令是 iptables -I INPUT -s 123.45.6.0/24 -j DROP
Copyright © Linux教程網 All Rights Reserved