在过去的几天里,我的服务器遭受了这种攻击:(带宽> 60MBit / s,XXX.XXX.XXX.XXX是多个IP)
tcpdump -n proto ICMP 17:15:19.267464 IP XXX.XXX.XXX.XXX > my_ip: ICMP time exceeded in-transit, length 36 17:15:19.325217 IP XXX.XXX.XXX.XXX > my_ip: ICMP time exceeded in-transit, length 36 17:15:19.345561 IP XXX.XXX.XXX.XXX > my_ip: ICMP time exceeded in-transit, length 56 17:15:19.484865 IP XXX.XXX.XXX.XXX > my_ip: ICMP time exceeded in-transit, length 36 17:15:19.529616 IP XXX.XXX.XXX.XXX > my_ip: ICMP time exceeded in-transit, length 36 17:15:19.957058 IP XXX.XXX.XXX.XXX > my_ip: ICMP YYY.YYY.YYY.YYY tcp port 39692 unreachable, length 36 17:15:19.968957 IP XXX.XXX.XXX.XXX > my_ip: ICMP host YYY.YYY.YYY.YYY unreachable, length 56 17:15:20.112520 IP XXX.XXX.XXX.XXX > my_ip: ICMP host YYY.YYY.YYY.YYY unreachable, length 56 17:15:20.203199 IP XXX.XXX.XXX.XXX > my_ip: ICMP host YYY.YYY.YYY.YYY unreachable, length 36 17:15:20.204803 IP XXX.XXX.XXX.XXX > my_ip: ICMP host YYY.YYY.YYY.YYY unreachable, length 36
我有FreeBSD 9.1,我的pf.conf是
ext_if="em0" table <blockedips> persist file "/etc/pf-blocked-ips.conf" set skip on lo0 block drop in log (all) quick on $ext_if from <blockedips> to any block in pass out flags S/SA keep state pass in on $ext_if proto tcp to port 80 flags S/SA keep state pass in on $ext_if proto tcp to port ssh flags S/SA synproxy state
有什么我可以做的?
你实际上看不到超过60Mbit / sec的除了ICMP回复指示丢弃的数据包。 如果是的话,你有可能是在DoS下,或者有一些失控的进程从你的主机发送虚假的stream量。
一个好的第一步是捕获一个交通样本(使用pcap或wireshark或tcpdump或其他),并分析它; 看看你是否真的发送与ICMP应答相对应的数据包。 您需要捕获的不仅仅是ICMPstream量。 如果你发送与之有关的东西,有两件事要做:
-p选项) 如果您没有发送生成这些回复的stream量,并且ICMPstream量压倒了您的链接,则需要与您的ISP取得联系,并要求他们帮助您缓解这一问题。