我正在尝试在我的服务器 /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
,但它也不起作用。