-The installation program creates a single bridge named `vmbr0`, which
-is connected to the first ethernet card `eth0`. The corresponding
-configuration in '/etc/network/interfaces' looks like this:
-
-----
-auto lo
-iface lo inet loopback
-
-iface eth0 inet manual
-
-auto vmbr0
-iface vmbr0 inet static
- address 192.168.10.2
- netmask 255.255.255.0
- gateway 192.168.10.1
- bridge_ports eth0
- bridge_stp off
- bridge_fd 0
-----
-
-Virtual machines behave as if they were directly connected to the
-physical network. The network, in turn, sees each virtual machine as
-having its own MAC, even though there is only one network cable
-connecting all of these VMs to the network.
-
-
-Routed Configuration
-~~~~~~~~~~~~~~~~~~~~
-
-Most hosting providers do not support the above setup. For security
-reasons, they disable networking as soon as they detect multiple MAC
-addresses on a single interface.
-
-TIP: Some providers allows you to register additional MACs on there
-management interface. This avoids the problem, but is clumsy to
-configure because you need to register a MAC for each of your VMs.
-
-You can avoid the problem by "routing" all traffic via a single
-interface. This makes sure that all network packets use the same MAC
-address.
-
-A common scenario is that you have a public IP (assume 192.168.10.2
-for this example), and an additional IP block for your VMs
-(10.10.10.1/255.255.255.0). We recommend the following setup for such
-situations:
-
-----
-auto lo
-iface lo inet loopback
-
-auto eth0
-iface eth0 inet static
- address 192.168.10.2
- netmask 255.255.255.0
- gateway 192.168.10.1
- post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
-
-
-auto vmbr0
-iface vmbr0 inet static
- address 10.10.10.1
- netmask 255.255.255.0
- bridge_ports none
- bridge_stp off
- bridge_fd 0
-----
-
-
-Masquerading (NAT) with iptables
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-In some cases you may want to use private IPs behind your Proxmox
-host's true IP, and masquerade the traffic using NAT:
-
-----
-auto lo
-iface lo inet loopback
-
-auto eth0
-#real IP adress
-iface eth0 inet static
- address 192.168.10.2
- netmask 255.255.255.0
- gateway 192.168.10.1
-
-auto vmbr0
-#private sub network
-iface vmbr0 inet static
- address 10.10.10.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 '10.10.10.0/24' -o eth0 -j MASQUERADE
- post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eth0 -j MASQUERADE
-----