找回密码
 注册
查看: 732|回复: 4

请教一个iptables的问题

[复制链接]
发表于 2005-9-8 10:07:36 | 显示全部楼层 |阅读模式
以下的语句是什么意思?
#iptables -A INPUT -p tcp -i eth0 -s 192.168.1.235 --syn -j DROP
这个是什么意思啊
如果说是挡到所有来自192.168.1.235的主动连接,那岂不是把192.168.1.235响应自己的包都挡掉了?

响应包是 SYN/ACK 也有syn标记啊
发表于 2005-9-8 16:25:20 | 显示全部楼层
--syn 不仅仅是--tcp-flags SYN:

请参考 manual:

       [!] --syn
              Only match TCP packets with the SYN bit set and the ACK and RST bits cleared.  Such
              packets  are  used to request TCP connection initiation; for example, blocking such
              packets coming in an interface will prevent incoming TCP connections, but outgoing
              TCP  connections  will  be unaffected.  It is equivalent to --tcp-flags SYN,RST,ACK
              SYN
.
If the "!" flag precedes the "--syn", the sense of the option is inverted.
回复

使用道具 举报

 楼主| 发表于 2005-9-8 17:54:22 | 显示全部楼层
大哥我看不懂英文啊
回复

使用道具 举报

发表于 2005-9-9 08:51:59 | 显示全部楼层
哦,这不是俺的错    
回复

使用道具 举报

 楼主| 发表于 2005-9-10 09:13:03 | 显示全部楼层
知道了,
--syn 是作用是挡掉 SYN被置位而ACK和RST没有被置位的包
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2025-2-13 21:49 , Processed in 0.023920 second(s), 16 queries .

© 2001-2025 Discuz! Team. Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表