我的(Linux)服务器有一些相当简单的iptables规则。
iptables -A INPUT -p icmp -j ACCEPT iptables -A INPUT -m state --state ESTABLISHED -j ACCEPT iptables -A INPUT -m tcp -p tcp --dport ssh -j ACCEPT iptables -A INPUT -m tcp -p tcp --dport https -j ACCEPT iptables -A INPUT -j LOG iptables -A INPUT -j NFLOG iptables -A INPUT -j DROP
ICMP没有被过滤,但是没有任何其他不确定的连接被允许。 NFLOG规则只是将数据包存储到数据包捕获文件(pcap)中。 由于系统日志得到了相当的垃圾邮件,我查看了数据包的细节。
tshark -V -a filesize:1 -r /scooby/doo.pcap [replaced] )
Frame 1: 52 bytes on wire (416 bits), 52 bytes captured (416 bits) Encapsulation type: Raw IP (7) [Protocols in frame: raw:ip:gre:ip:udp:data] Internet Protocol Version 4, Src: [incoming IP] ([incoming IP]), Dst: [my server IP] ([my server IP]) Version: 4 Header length: 20 bytes Total Length: 52 Identification: 0x0000 (0) Flags: 0x02 (Don't Fragment) Time to live: 52 Protocol: GRE (47) Generic Routing Encapsulation (IP) Flags and Version: 0x0000 Protocol Type: IP (0x0800) Internet Protocol Version 4, Src: [not my IP1] ([not my IP1]), Dst: [not my IP2] ([not my IP2]) Version: 4 Header length: 20 bytes Total Length: 28 Time to live: 64 Protocol: UDP (17) User Datagram Protocol, Src Port: [random port1] ([random port1]), Dst Port: [random port2] ([random port2]) Length: 8
未经请求的数据包主要是ip:gre:ip:udp数据包。 GRE数据包的数量 – 通常是每分钟多less – 大大超过了其他未经请求的数据包(漏洞扫描/垃圾邮件发送者/端口扫描器)。 GRE封装内部的IP都没有任何特别的含义,只是属于(完全)美国公司的各种常规IP(所以不是完全随机的地址)。
为什么有人发送这些GRE数据包?
是否存在与GRE数据包相关的DoS漏洞? 这是一个企图欺骗misonfigured路由器/服务器转发封装的数据包到他们明显的目的地? 发送者是否尝试收集我可能已经设置的潜在GRE隧道的性质信息?
奖励:最合理的反应是“-j DROP” – 他们呢?