阻止评论垃圾邮件的 IP 地址

Blocking IP addresses for comment spam

我一直收到来自一系列 IP 地址的垃圾邮件,下面是一个示例:

XX.XX.XX.123
XX.XX.XX.217
XX.XX.XX.179

是否可以查找 IP 地址范围的所有者,或者当前 3 个块相同时我是否可以安全地阻止范围:

XX.XX.XX.100 - XX.XX.XX.255

有五个Regional Internet Registrars (RIRs) that are delegated control over the IP space. Each of them hosts information on owners via whois,您可以查询。在命令行中,这将是:

$ whois 55.55.55.100
#
# ARIN WHOIS data and services are subject to the Terms of Use
# available at: https://www.arin.net/whois_tou.html
#
# If you see inaccuracies in the results, please report at
# http://www.arin.net/public/whoisinaccuracy/index.xhtml
#


#
# The following results may also be obtained via:
# http://whois.arin.net/rest/nets;q=55.55.55.100?showDetails=true&showARIN=false&ext=netref2
#

NetRange:       55.0.0.0 - 55.255.255.255
CIDR:           55.0.0.0/8
NetName:        CONUS-RCAS
NetHandle:      NET-55-0-0-0-1
Parent:          ()
NetType:        Direct Allocation
OriginAS:       
Organization:   Headquarters, USAISC (HEADQU-3)
RegDate:        1996-10-26
Updated:        2011-02-23
Ref:            http://whois.arin.net/rest/net/NET-55-0-0-0-1


OrgName:        Headquarters, USAISC
OrgId:          HEADQU-3
Address:        NETC-ANC CONUS TNOSC
City:           Fort Huachuca
StateProv:      AZ
PostalCode:     85613
Country:        US
RegDate:        1990-03-26
Updated:        2011-08-17
Ref:            http://whois.arin.net/rest/org/HEADQU-3

OrgAbuseHandle: REGIS10-ARIN
OrgAbuseName:   Registration
OrgAbusePhone:  +1-800-365-3642 
OrgAbuseEmail:  disa.columbus.ns.mbx.arin-registrations@mail.mil
OrgAbuseRef:    http://whois.arin.net/rest/poc/REGIS10-ARIN

OrgTechHandle: REGIS10-ARIN
OrgTechName:   Registration
OrgTechPhone:  +1-800-365-3642 
OrgTechEmail:  disa.columbus.ns.mbx.arin-registrations@mail.mil
OrgTechRef:    http://whois.arin.net/rest/poc/REGIS10-ARIN


#
# ARIN WHOIS data and services are subject to the Terms of Use
# available at: https://www.arin.net/whois_tou.html
#
# If you see inaccuracies in the results, please report at
# http://www.arin.net/public/whoisinaccuracy/index.xhtml
#

没有以编程方式查询此信息的最佳方法,因为大多数 ISP 会因潜在的滥用而限制您的查询量。还有几个网站可以提供有关 IP 所有者的更多信息,例如 Robtex or SenderBase.

从上面发布的whois信息可以看出,那里没有有用的内容。您想要阻止/8 CIDR(224 个地址,1 /256 IPv4 space).

这就是垃圾邮件特定查找(如 SenderBase)可以提供帮助的原因,因为它们可以告诉您邮件量和邮件发件人的信誉。 (不过,如果您提供的示例是真实的,则 SenderBase 不知道它们。)

底线:不,在 IPv4 space 中阻止大范围的 IP 安全命名。