码迷,mamicode.com
首页 > 其他好文 > 详细

iptables-过滤61开头的ip数据包

时间:2015-05-25 19:58:44      阅读:251      评论:0      收藏:0      [点我收藏+]

标签:

iptables -F
root@android:/system/bin # iptables -L -n
iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
root@android:/system/bin # iptables -A INPUT -p tcp --sport 80 -s 61.0.0.0/8 -j
DROP
-sport 80 -s 61.0.0.0/8 -j DROP                                               <
protoent* getprotobyname(char const*)(3) is not implemented on Android
root@android:/system/bin # iptables -L -n
iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
DROP       tcp  --  61.0.0.0/8           0.0.0.0/0            tcp spt:80

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
root@android:/system/bin # iptables -A OUTPUT -p tcp --dport 80 -s 61.0.0.0/8 -j
 DROP
--dport 80 -s 61.0.0.0/8 -j DROP                                              <
protoent* getprotobyname(char const*)(3) is not implemented on Android
root@android:/system/bin # iptables -L -n
iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
DROP       tcp  --  61.0.0.0/8           0.0.0.0/0            tcp spt:80

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
DROP       tcp  --  61.0.0.0/8           0.0.0.0/0            tcp dpt:80
root@android:/system/bin #

 

iptables-过滤61开头的ip数据包

标签:

原文地址:http://www.cnblogs.com/xunbu7/p/4528535.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!