¿´ÎÒ½âÊ͵Ϲ¶Ô£¿
[left]:confused: [/left][left]/sbin/iptables -A INPUT -i eth0 -p tcp --tcp-flags ALL FIN,URG,PSH -j DROP[/left]
[left]#ËùÓнøÈëeth0µÄtcp°ü£¬±êÖ¾FIN£¬URG,PSHΪ1µÄ¶¼DROP£»
/sbin/iptables -A INPUT -i eth0 -p tcp --tcp-flags SYN,RST SYN,RST -j DROP[/left]
[left]#ËùÓнøÈëeth0µÄtcp°ü´øÓбêÖ¾SYN,RSTµÄ£¬ÇÒÉèÖÃΪ1µÄ¶¼DROP£»[/left]
[left]/sbin/iptables -A INPUT -i eth0 -p tcp --tcp-flags SYN,FIN SYN,FIN - j DROP [/left]
[left]#ËùÓнøÈëeth0µÄtcp°ü´øÓбêÖ¾SYN,FIN µÄ£¬ÇÒÉèÖÃΪ1µÄ¶¼DROP£»
/sbin/iptables -A INPUT -i eth0 -p tcp --tcp-flags ALL FIN -j DROP[/left]
[left]#ËùÓнøÈëeth0µÄtcp°ü£¬FIN±êÖ¾ÉèÖÃΪ1µÄ¶¼DROP£»
/sbin/iptables -A INPUT -i eth0 -p tcp --tcp-flags ALL ALL -j DROP[/left]
[left]#ËùÓнøÈëeth0µÄtcp°ü£¬ÇÒ±êÖ¾ÉèÖÃΪ1µÄ¶¼DROP£»
/sbin/iptables -A INPUT -i eth0 -p tcp --tcp-flags ALL NONE -j DROP[/left]
[left]#·ÀÖ¹NONEɨÃ裻
/sbin/iptables -P INPUT DROP[/left]
[left] [/left]
[left]·ÖÎöÍêÁË£¬¾ÍÊDz»ÖªµÀ£¬Ã¿¸ö¶ÔÓ¦ÁËʲôɨÃè~~~[/left]
[left] [/left]
[left]Çë´óϺָµ¼~~~[/left] [code]
--tcp-flags [!] mask comp
Match when the TCP flags are as specified. The first argument
is the flags which we should examine, written as a comma-sepa-
rated list, and the second argument is a comma-separated list of
flags which must be set. Flags are: SYN ACK FIN RST URG PSH ALL
NONE. Hence the command
iptables -A FORWARD -p tcp --tcp-flags SYN,ACK,FIN,RST SYN
will only match packets with the SYN flag set, and the ACK, FIN
and RST flags unset.
[/code]
ËùÒÔ ALL Àí½âΪTCPµÄËùÓбê־λ¸üλ׼ȷ£¬±íʾÎÒÃÇÐèÒª¼ì²éËùÓеıê־룬Ï൱ÓÚÒ»¸öÑÚÂ룻µÚ¶þ¸ö²ÎÊýÖ¸³öµÄ±ê־λÊÇÓÃÀ´Æ¥ÅäµÄ
/sbin/iptables -A INPUT -i eth0 -p tcp --tcp-flags SYN,RST SYN,RST -j DROP
¼ì²é±êÖ¾ S,R £»Èç¹ûÉèÖÃÁ˾Ídrop
/sbin/iptables -A INPUT -i eth0 -p tcp --tcp-flags ALL NONE -j DROP
¼ì²éËùÓеıê־룬Èç¹û¶¼Ã»ÉèÖþÍdrop лл¥ÉÏ
Ò³:
[1]