I have installed PVE, I received three public Ip address two of them are in the same range, the third one is in different range. I wanted to give PVE host one pub IP to be reachable externally, and the other two to VMs I also wanted to created two VMs with private IP address and make port forwarding. below is my configuration:
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address x.x.203.141 netmask 255.255.255.128 pointopoint x.x.203.137 gateway x.x.203.137 broadcast x.x.203.255 #post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp iface eth1 inet manual auto vmbr0 iface vmbr0 inet static address x.x.203.141 netmask 255.255.255.128 #gateway x.x.203.137 bridge_ports none bridge_stp on bridge_fd 0 bridge_maxwait 0 iface vmbr1 inet manual bridge_ports none bridge_stp on bridge_fd 0 up ip route add x.x.203.142/32 dev vmbr0 ##IP of the first VM up ip route add x.x.220.37/32 dev vmbr1 ## IP of the second VMS auto vmbr2 iface vmbr2 inet static address 192.168.0.254 netmask 255.255.255.0 bridge_ports none bridge_stp on bridge_fd 0 post-up echo 1 > /proc/sys/net/ipv4/ip_forward post-up iptables -t nat -A POSTROUTING -s '192.168.0.0/24' -o eth0 -j MASQUERADE post-down iptables -t nat -D POSTROUTING -s '192.168.0.0/24' -o eth0 -j MASQUERADE
yet I am losing ping externally to the host machine. and also with the second VMs which has Public IP with a different range I have a very slow internet? another thing is that I am not able to ssh to the VM with private IP address externally.
Thanks for your help in advance!