NAT masquerade difficulties

survot

New Member
Jun 30, 2014
2
0
1
Hi,

The hosts are in an OVH data center, but I do not think this has anything to do with their hardware.


I am using proxmox to host some VMs. I have two nodes clustered together using tinc as a VPN. This all seems to be working great. The problem I am having is using a PRIVATE IP address on a VM and getting that VM to have an internet connection (not port forwarding to the VM, a internet connection to download packages etc).


I can set up a VM using the failover technique mentioned in the OVH bridge guide, that is working. What I want is a private IP (192.168.15.10) to have internet accesss (e.g able to ping google.com).


On node1 (where the VM is) I have the following interface settings:


Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).


# The loopback network interface
auto lo
iface lo inet loopback


# for Routing
auto vmbr1
iface vmbr1 inet static
        address 192.168.15.1
        netmask 255.255.255.0
        network 192.168.15.0
        broadcast 192.168.15.255
        bridge_ports dummy0
        bridge_stp off
        bridge_fd 0
        echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up   iptables -t nat -A POSTROUTING -s '192.168.15.0/24' -o vmbr0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '192.168.15.0/24' -o vmbr0 -j MASQUERADE




# vmbr0: Bridging. Make sure to use only MAC adresses that were assigned to you.
auto vmbr0
iface vmbr0 inet static
        address 188.xx.xx.xx
        netmask 255.255.255.0
        network 188.xx.xx.0
        broadcast 188.xx.xx.255
        gateway 188.xx.xx.254
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0
       # up ip addr add xx.xx.xx.xx/32 dev vmbr0 (I also tried adding a spare FOIP, though currently have it left out)
        #down ip addr del xx.xx.xx.xx/32 dev vmbr0


(NOTE: eddited out IPV6 stuff)


On the VM I give it a NIC on vmbr1 and assign the IP (example 192.168.15.10). I can ping both Proxmox hosts, but cannot access the internet. I cannot work out why this is not working and need some help debugging.


Thanks!
 
Can anyone offer any advice? Is there more information that I can provide for someone to point me in the right direction on how to debug this?