V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
unboy
V2EX  ›  Linux

iptables 如何阻止特定大小的包?

  •  
  •   unboy · 2016-05-21 16:57:35 +08:00 · 2962 次点击
    这是一个创建于 2922 天前的主题,其中的信息可能已经有所发展或是发生改变。
    例如阻止所有等于 70bytes 的包(不是小于,也不是大于)进入服务器。
    我写了个貌似不对,能给我修改下吗?
    iptables -I INPUT -p length – length 70:70 -j DROP
    1 条回复    2016-05-21 17:23:35 +08:00
    unboy
        1
    unboy  
    OP
       2016-05-21 17:23:35 +08:00
    改成 iptables -A INPUT -p tcp -m length --length 70:70 -j DROP 了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   4899 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 09:17 · PVG 17:17 · LAX 02:17 · JFK 05:17
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.