Could someone give me a example

mitron

New Member
May 24, 2018
13
0
1
44
I want to know if this is possible and if so please supply an example.

on single host interface config I want to do two things.

Allow guests to have their own public ip.
Allow local network and internet via nat

There are guides on how to do each separately but not together.

Surely this is quite a common scenario?
 
By default if you use vmbr0 then all guest can have dedicated IP public.

Thats fine so far. This works if thats the only thing you are doing

For "Allow local network and internet via nat" which local network do you mean? The node or guest?

I mean set additional vmbr1 for guests in private network to connect via nat.

I have come to the conclusion that vmbr0 and vmbr1 in the setup described cannot be assigned together

I would like some to test this because I belive its not possible
all guest with private ip via one bridge
on a second bridge all guests have private ip and connect via nat
 
Right, you need to have 2 vmbr:
vmbr0 = for guest with Public IP
vmbr1 = for guset with Private IP

Just edit your /etc/network/interfaces to add new vmbr1.
Code:
auto vmbr1
iface vmbr1 inet static
        address  192.168.0.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 '192.168.0.0/24' -o vmbr1 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.0.0/24' -o vmbr1 -j MASQUERADE

Then reboot. Don't forget set your Private Guest to vmbr1.
 
I have tried exactly that.

I have my node with ovh.
If you are sure that is a working config then that means the issue is with my provider ovh.

Question have anyone successfuly done this on ovh?
 

About

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!