Unable to get the Internet in VM's

Jun 5, 2016
2
0
1
40


  1. Hi,
  2. I'm new to the Proxmox, Installed Proxmox VE 4.2
    --
    my network setting in Proxmox server
    --
    cat /etc/network/interfaces | less

    auto lo
    iface lo inet loopback

    iface eth0 inet manual

    iface eth1 inet manual

    iface eth2 inet manual

    iface eth3 inet manual

    auto vmbr0
    iface vmbr0 inet static
    address 10.0.1.X
    netmask 255.255.252.0
    gateway 10.0.0.X
    bridge_ports eth0
    bridge_stp off
    bridge_fd 0

    auto vmbr1
    iface vmbr1 inet static
    address 172.16.1.X
    netmask 255.255.0.0
    bridge_ports eth1
    bridge_stp off
    bridge_fd 0
    --
    I assigned an IP to the VM's using bridge. in my PVE server i'm getting internet. but I'm unable to connect to internet in my VM's, what should i do
 
Your server settings indicate that you have 2 different networks.

Are your VMs using VMBR1? If so, and you don't actually have a 172.16.1.x subnet on your network, that's the problem.
 
Hi,


I'm using VMBR0 for my VM's.

...a and vmbr0/eth0 is connected to internet via NAT router? In that case you must define a NAT in Proxmox host too, e.g.:


Code:
iptables -t nat -A POSTROUTING -o vmbr1 -s 10.0.1.0/24  -j MASQUERADE

and of course the default routing to your router

Code:
route add -net default gw 172.16.1.1