zoukankan      html  css  js  c++  java
  • iptables-过滤61开头的ip数据包

    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 #
  • 相关阅读:
    聊聊ASP.NET Core默认提供的这个跨平台的服务器——KestrelServer[转]
    java的war包和jar包的区别
    shell编程中的表达式(-d, -f, -L 等)
    nginx 403 forbidden
    docker删除镜像
    TCP的拥塞控制
    文件从暂存区撤销
    charles修改返回结果的4种方法
    LED 正负极区分
    病毒传播模拟游戏制作日志(三)
  • 原文地址:https://www.cnblogs.com/xunbu7/p/4528535.html
Copyright © 2011-2022 走看看