这是我自己的笔记,如果你用的上也可以用用,如果看不懂就别看了,也别问,因为我这个是隔壁老王大哥手把手耐心的教我配置的,至于什么原理,中间出什么问题我也无法给你解决的回答,这也是kimsufi母鸡配置ipv6的用Proxmox VE开ipv6的vps网络配置
proxmox web界面,IPIPV6::3/64,网关gatewayIPV6::2,etc
proxmox webui不能访问的时候,尝试添加个文件/etc/default/pveproxy
文件加入以下内容并执行systemctl restart pveproxy
LISTEN_IP=192.99.44.33
设置ipv6网络,用PVE开纯ipv6的VPS,
编辑/etc/network/interfaces
修改配置
对照改下就行了,注意物理网卡是不是 eno1,bridge_ports eno1 不是的话 重启网络就挂了
之后给小鸡
设置IP 2001:41d0:2:237b::3
网关2001:41d0:2:237b::2
按照自己IP前段替换下
auto lo
iface lo inet loopback
iface eno1 inet manual
auto vmbr0
iface vmbr0 inet static
address 实际地址
netmask 255.255.255.0
gateway 网关地址 #route -n 看下网关
pointopoint 网关地址
bridge_ports eno1
bridge_stp off
bridge_fd 0
bridge_maxwait 0
#2607:5300:60:4f21::1 这是ks后台给的IP地址用 IPV6:1表示
#如果IP是上面那样
#那么网关一般是
#2001:41d0:2:23ff:ff:ff:ff:ff
#/64的2001:41d0:2:4fff:ff:ff:ff:ff
#自行更改
iface vmbr0 inet6 static
address 2607:5300:60:4f21::1 #这是ks后台给的IP地址
netmask 64
gateway 2607:5300:60:23ff:ff:ff:ff:ff # 网关
bridge_ports eno1
bridge_stp off
bridge_fd 0
auto vmbr1
iface vmbr1 inet static
address 192.168.1.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '192.168.1.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o vmbr0 -j MASQUERADE
# 端口转发
#post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 5022 -j DNAT --to 192.168.1.50:22
#post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 5022 -j DNAT --to 192.168.1.50:22
#post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 80 -j DNAT --to 192.168.1.50:80
#post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 80 -j DNAT --to 192.168.1.50:80
auto vmbr1
iface vmbr1 inet6 static
address 2607:5300:60:4f21::2/64
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv6/conf/all/proxy_ndp
post-up echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
post-up echo 1 > /proc/sys/net/ipv6/conf/default/forwarding
post-up /sbin/ip -f inet6 neigh add proxy 2607:5300:60:4f21::2 dev vmbr1
post-up /sbin/ip -f inet6 neigh add proxy 2607:5300:60:4f21::3 dev vmbr0
post-up /sbin/ip -f inet6 route add 2607:5300:60:4f21::3 dev vmbr1
再/etc/sysctl.conf
底部添加
net.ipv6.conf.all.forwarding = 1
net.ipv6.conf.all.proxy_ndp = 1
net.ipv6.bindv6only = 1
最后执行下service networking restart
然后ping下ipv6,ping6 google.com
下面随便开台小鸡
PVE界面 小鸡网卡要设置桥接 vmbr1
IPV4 192.168.1.50 加个/24
网关 192.168.1.1 dns 8.8.8.8
IPV6 IPV6::3 加个/64
网关 IPV6::2
可能涉及到的\
yum install net-tools
apt install net-tools
ip addr