Create a second isolated virtual network

  • Thread starter Thread starter jeremyb1
  • Start date Start date
J

jeremyb1

Guest
I want to do a test migration from Windows 2008 SBS to Windows 2011 SBS, I want to create a second "virtual" network on a different subnet that has internet access but isn't accessable by our primary production network.

I'm thinking NAT is the way to go..

Primary Network: 192.168.0.0/24
Secondary Network: 10.10.11.0/24

My SBS2008 Install on the second network has the following config
IP: 10.10.11.2/24
GW:10.10.11.1

I can ping 10.10.11.1 from the SBS2K8 install on the second network but I can't get any internet traffic through, what am I doing wrong?

/etc/network/interfaces
Code:
# network interface settings
auto lo
iface lo inet loopback
iface eth0 inet manual
iface eth1 inet manual
auto vmbr0
iface vmbr0 inet static
        address  192.168.0.150
        netmask  255.255.255.0
        gateway  192.168.0.1
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0
auto vmbr1
iface vmbr1 inet static
        address  10.10.11.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.11.0/24' -o eth0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '10.10.11.0/24' -o eth0 -j MASQUERADE

Code:
proxmox:~# pveversion -v
pve-manager: 1.7-11 (pve-manager/1.7/5470)
running kernel: 2.6.32-4-pve
proxmox-ve-2.6.32: 1.7-30
pve-kernel-2.6.32-4-pve: 2.6.32-30
qemu-server: 1.1-28
pve-firmware: 1.0-10
libpve-storage-perl: 1.0-16
vncterm: 0.9-2
vzctl: 3.0.24-1pve4
vzdump: 1.2-10
vzprocps: 2.0.11-1dso2
vzquota: 3.0.11-1
pve-qemu-kvm: 0.13.0-3
ksm-control-daemon: 1.0-4
 
Last edited by a moderator:
Thanks, replacing '-o eth0' with '-o vmbr0' fixed it :)
Code:
        post-up iptables -t nat -A POSTROUTING -s '10.10.11.0/24' -o vmbr0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '10.10.11.0/24' -o vmbr0 -j MASQUERADE