
我有一台 Netgear Nighthawk R7000 路由器,我將其設定為使用 IPv6。這是輸出ifconfig-a用於我的 Linux 機器上的無線卡介面。
wlp2s0b1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.8 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 2601:81:c300:12f0:10c3:18be:20ef:b62c prefixlen 64 scopeid 0x0<global>
inet6 2601:81:c300:12f0:78ca:626a:14b3:c8a prefixlen 64 scopeid 0x0<global>
inet6 fe80::216d:afa5:e46e:6920 prefixlen 64 scopeid 0x20<link>
ether a4:d1:8c:65:4c:a4 txqueuelen 1000 (Ethernet)
RX packets 1147508 bytes 762515013 (762.5 MB)
RX errors 0 dropped 2 overruns 0 frame 0
TX packets 3752018 bytes 944468619 (944.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
我能夠存取我所託管的本機網路伺服器端口500透過訪問兩個連結之一
http://[2601:81:c300:12f0:10c3:18be:20ef:b62c]:500
http://[2601:81:c300:12f0:78ca:626a:14b3:c8a]:500
但現在我嘗試從外部網路存取該網路伺服器。如果這是 IPv4,我必須進行連接埠轉送並將路由器的 WAN IP 和連接埠對應到我的電腦 LAN IP 和連接埠。如何從另一個使用 IPv6 的網路存取我的 Web 伺服器?
編輯: 以下是我的 Linux 機器上可能存在的一些防火牆和調試資訊:
檢查以確保 IPv6 已啟用
# cat /sys/module/ipv6/parameters/disable
0
檢查並確保所有 IPv6 裝置均已啟用。
# sysctl -a 2>/dev/null | grep disable_ipv6
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.docker0.disable_ipv6 = 0
net.ipv6.conf.enp1s0f0.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0
net.ipv6.conf.wlp2s0b1.disable_ipv6 = 0
使用 iptable 顯示所有防火牆。
# sudo iptables -L -n
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy DROP)
target prot opt source destination
DOCKER-USER all -- 0.0.0.0/0 0.0.0.0/0
DOCKER-ISOLATION-STAGE-1 all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate
RELATED,ESTABLISHED
DOCKER all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain DOCKER (1 references)
target prot opt source destination
Chain DOCKER-ISOLATION-STAGE-1 (1 references)
target prot opt source destination
DOCKER-ISOLATION-STAGE-2 all -- 0.0.0.0/0 0.0.0.0/0
RETURN all -- 0.0.0.0/0 0.0.0.0/0
Chain DOCKER-ISOLATION-STAGE-2 (1 references)
target prot opt source destination
DROP all -- 0.0.0.0/0 0.0.0.0/0
RETURN all -- 0.0.0.0/0 0.0.0.0/0
Chain DOCKER-USER (1 references)
target prot opt source destination
RETURN all -- 0.0.0.0/0 0.0.0.0/0
我也看不到任何相關的路由器防火牆規則。