我正在尝试在家中设置一个 Apache 服务器,可以通过家用路由器的 80 端口访问该服务器。几个月前我能够做到这一点,然后我关闭了该网站。当我尝试再次设置端口转发时,我注意到我无法从我的公共 IP(69.162.xx)访问我的服务器。
查看路由器的设置,我发现它有一个完全不同的 IP 作为其公共 IP(100.81.xx)。从我的 LAN,端口转发通过这个地址工作(不能是私有 IP(?),我的路由器分配 192.168.xx),但在我的家庭网络之外不起作用。
在 Google 上搜索后,我发现我的路由器“认为”的地址可能在 ISP 级别用于双 NAT 目的。我尝试联系客户支持时没有收到任何回复。
我是否遭到了 ISP 的双重 NAT,还是我忽略了某个问题?
答案1
我的想法是,您的 ISP 现在正在转换到 IPv6,而到目前为止它使用的是纯 IPv4。
100.81.x.x
该服务报告的新地址whois
为:
#
# ARIN WHOIS data and services are subject to the Terms of Use
# available at: https://www.arin.net/resources/registry/whois/tou/
#
# If you see inaccuracies in the results, please report at
# https://www.arin.net/resources/registry/whois/inaccuracy_reporting/
#
# Copyright 1997-2021, American Registry for Internet Numbers, Ltd.
#
NetRange: 100.64.0.0 - 100.127.255.255
CIDR: 100.64.0.0/10
NetName: SHARED-ADDRESS-SPACE-RFCTBD-IANA-RESERVED
NetHandle: NET-100-64-0-0-1
Parent: NET100 (NET-100-0-0-0-0)
NetType: IANA Special Use
OriginAS:
Organization: Internet Assigned Numbers Authority (IANA)
RegDate: 2012-03-13
Updated: 2016-04-11
Comment: This block is used as Shared Address Space. Traffic from these addresses does not come from IANA. IANA has simply reserved these numbers in its database and does not use or operate them. We are not the source of activity you may see on logs or in e-mail records. Please refer to http://www.iana.org/abuse/
Comment: Shared Address Space can only be used in Service Provider networks or on routing equipment that is able to do address translation across router interfaces when addresses are identical on two different interfaces.
Comment: This block was assigned by the IETF in the Best Current Practice document,
Comment: RFC 6598 which can be found at:
Comment: http://tools.ietf.org/html/rfc6598
Ref: https://rdap.arin.net/registry/ip/100.64.0.0
维基百科描述了 IPv4 共享地址空间 作为:
为了确保运营商级 NAT(CGN)正常工作,并以此减轻对最后剩余的 IPv4 地址的需求,互联网号码分配机构(IANA)分配了一个 /10 大小的 IPv4 地址块作为共享地址空间。[1]
该地址块专供实施运营商级 NAT 的互联网服务提供商 (ISP) 使用,以将其客户端设备 (CPE) 连接到其核心路由器。
结论:您现在处于运营商级 NAT 之后。如果您希望拥有真正的 IPv4 地址,则应从 ISP 租用静态 IPv4 地址。否则,您找到的 IPv4 仅是 ISP 内部的。