![使用一个 ip proxmox 转发流量](https://linux22.com/image/714974/%E4%BD%BF%E7%94%A8%E4%B8%80%E4%B8%AA%20ip%20proxmox%20%E8%BD%AC%E5%8F%91%E6%B5%81%E9%87%8F.png)
我有一台 hetzner 专用服务器,并且安装了 proxmox。我只有一个 IP,我需要将流量和端口转发到虚拟机。我按照 proxmox 网络教程操作,但没有成功:无法从互联网访问虚拟机,也无法使用虚拟机上网。这是我的网络配置和内核日志
### Hetzner Online GmbH installimage
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
iface lo inet6 loopback
auto enp2s0
iface enp2s0 inet static
address 1.2.3.4
netmask 255.255.255.224
gateway 2.3.4.5
up route add -net 1.2.3.4 netmask 255.255.255.224
iface enp2s0 inet6 static
address indirizzo ipv6
netmask 64
gateway fe80::1
auto vmbr2
iface vmbr2 inet static
address 10.10.10.254
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 '10.10.10.0/24' -o enp2s0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o enp2s0 -j MASQUERADE
dmesg:
[359074.849541] device tap100i0 entered promiscuous mode
[359074.855293] vmbr2: port 1(tap100i0) entered blocking state
[359074.855347] vmbr2: port 1(tap100i0) entered disabled state
[359074.855486] vmbr2: port 1(tap100i0) entered blocking state
[359074.855539] vmbr2: port 1(tap100i0) entered forwarding state
[359417.355699] vmbr2: port 1(tap100i0) entered disabled state
[359417.358959] vmbr2: port 1(tap100i0) entered disabled state
谢谢