Letting the VM access internet through the Masquerading configuration (OVH)


New Member
Nov 5, 2019

One OVH dedicated server, 1 public IP.
I tried to configure a NAT for my VM to share the same public IP.

I do try to install a ubuntu light image on a VM.
However I am not able to reach the outside internet from the VM and:
- Automatic DHCP configuration wont work.
- Setting a manual IP Gateway) wont work.

# The loopback network interface
auto lo
iface lo inet loopback

# vmbr0: Bridging. Make sure to use only MAC adresses that were assigned to you.
auto vmbr0
iface vmbr0 inet static
    address xxxxxxxx/24 # Public ip
    gateway xxxxxx.254
    bridge_ports eth0
    bridge_stp off
    bridge_fd 0

# added

auto vmbr1
#private sub network
iface vmbr1 inet static
        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 '' -o vmbr0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '' -o vmbr0 -j MASQUERADE

Could you please advice ? I am not sure how to investigate this issue.
hey you're having the same issue I have. Feel free to follow this thread that I started so in case I find a solution (meaning that the setup fully works, with firewall setup, multiple natted subnets, etc...) I will post a followup reply there ^-^

(edit1) - added link to the mentioned thread. Forgot to do that before posting the reply.


The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!