我需要帮助解决我的 PROXMOX / VM 网络问题:S 这个问题类似但仅类似: Hetzner 服务器上的 Proxmox 路由网络配置
我与我的 VM debian/11 没有 inet 连接,Hetzner 给了我 2 个 IP:
49.12.XXX.31/26 第一个:D4:5D:XX:BC:E9:9B 49.12.XXX.25/26 第二个 mac:00:50:XX:00:19:A3
两者都有相同的网关和brcst 49.12.XXX.1 49.12.XXX.69
这是我的服务器/proxmox 配置:
source /etc/network/interfaces.d/*
# Loopback device:
auto lo
iface lo inet loopback
# device: enx12905253282a (second networkadapter gbic = not in use)
iface enx12905253282a inet manual
# device: enp195s0
auto enp195s0
iface enp195s0 inet static
address 49.12.XXX.31
netmask 255.255.255.255
# hwaddress D4:5D:XX:BC:E9:9B ###i tested twice with hw and without
pointopoint 49.12.XXX.1
gateway 49.12.XXX.1
up sysctl -p
iface enp195s0 inet6 static
address 2a01:4f8:XXX:5b6c::2
netmask 128
gateway fe80::1
up sysctl -p
# einzelIP
auto vmbr0
iface vmbr0 inet static
address 49.12.XXX.31
netmask 255.255.255.255
# hwaddress 00:50:XX:00:19:A3 ###i tested twice with hw and without
bridge_ports none
bridge_stp off
bridge_fd 0
bridge-disable-mac-learning 1
up ip route add 49.12.XXX.25/32 dev vmbr0
iface vmbr0 inet6 static
address 2a01:4f8:XXX:5b6c::3
netmask 64
up ip -6 route add 2a01:4f8:XXX:5b6c::/64 dev vmbr0
我曾经 120% 遵循过德国人 Hetzner 的指南。
虚拟机配置:
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto ens18
iface ens18 inet static
address 49.12.XXX.25
netmask 255.255.255.255
pointopoint 49.12.XXX.31
gateway 49.12.XXX.31
dns-nameserver 1.1.1.1
hwadress 00:50:XX:00:19:a3
iface ens18 inet6 static
address 2a01:4f8:XXX:5b6c::4
netmask 64
gateway 2a01:4f8:XXX:5b6c::3
hwadress 00:50:XX:00:19:a3
我可以从 VM ping 到 49.12.XXX.31,也可以从 PROXMOX ping 到 VM 49.12.XXX.25
我的系统控制:
net.ipv4.ip_forward = 1
net.ipv4.conf.enp195s0.proxy_arp = 1
#net.ipv4.conf.all.rp_filter=1
#net.ipv4.conf.default.rp_filter=1
#net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv6.conf.all.forwarding = 1
net.ipv6.conf.all.accept_ra = 2
net.ipv6.conf.all.accept_redirects = 1
net.ipv6.conf.all.accept_source_route = 1
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.all.disable_ipv6 = 0
也许有点拼写错误?我将非常感激您的帮助!!
克里斯