![使用来自 /64 子网的随机 IP v6 进行卷曲:ndppd、ip 邻居或路由不起作用](https://linux22.com/image/218565/%E4%BD%BF%E7%94%A8%E6%9D%A5%E8%87%AA%20%2F64%20%E5%AD%90%E7%BD%91%E7%9A%84%E9%9A%8F%E6%9C%BA%20IP%20v6%20%E8%BF%9B%E8%A1%8C%E5%8D%B7%E6%9B%B2%EF%BC%9Andppd%E3%80%81ip%20%E9%82%BB%E5%B1%85%E6%88%96%E8%B7%AF%E7%94%B1%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8.png)
我正在尝试在我的服务器 /64 子网上设置随机 IPv6 代理池,如下所示:https://github.com/zu1k/http-proxy-ipv6-pool,但curl --interface 2a05:541:108:26::2 google.com
不工作(无限加载)。在标准地址上一切正常:curl --interface 2a05:541:108:26::1 google.com
返回有效内容。
Linux 发行版:Ubuntu 22
ip -6 a
输出:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,ALLMULTI,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 2a05:541:108:26::1/48 scope global
valid_lft forever preferred_lft forever
inet6 fe80::5054:ff:fe1f:7217/64 scope link
valid_lft forever preferred_lft forever
cat /etc/network/interfaces
输出:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 81.19.139.62
netmask 255.255.255.0
gateway 81.19.139.1
hwaddress ether 52:54:00:1F:72:17
dns-nameservers 8.8.8.8 1.1.1.1
iface eth0 inet6 static
address 2a05:541:108:26::1
netmask 48
gateway 2a05:541:108::1
dns-nameservers 8.8.8.8 1.1.1.1
inet6路由表:
2a05:541:108::/48 dev eth0 proto kernel metric 256 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
default via 2a05:541:108::1 dev eth0 metric 1024 onlink pref medium
local ::1 dev lo table local proto kernel metric 0 pref medium
anycast 2a05:541:108:: dev eth0 table local proto kernel metric 0 pref medium
local 2a05:541:108:26::1 dev eth0 table local proto kernel metric 0 pref medium
local 2a05:541:108:26::/64 dev eth0 table local metric 1024 pref medium
anycast fe80:: dev eth0 table local pr`oto kernel metric 0 pref medium
local fe80::5054:ff:fe1f:7217 dev eth0 table local proto kernel metric 0 pref medium
ff00::/8 dev eth0 table local metric 256 pref medium
sysctl.conf 结尾:
net.ipv6.conf.all.forwarding=1
net.ipv6.conf.eth0.forwarding=1
net.ipv6.conf.all.proxy_ndp=1
net.ipv6.conf.eth0.proxy_ndp=1
ndppd配置:
proxy eth0 {
rule 2a05:541:108:26::/64 {
static
}
}
我尝试通过命令直接添加邻居ip neigh add proxy 2a05:541:108:26::2 dev eth0
,但它也不起作用。