Dual NICs and NAT

pvenub

Member
Mar 17, 2014
38
0
6
Hello,

Server running PVE 4.0 and have two network cards, one for internal network and other want to use for connecting VMs to external network.

I have bonded eth0 to vmbr0 and VMs get IP via router no problem. Issue I don't quite understand is that I have bonded eth1 to vmbr1 but there is no router for that NIC, just connected straight to ISP modem gateway. Can I use NAT as a sort of router for VMs on eth1/vmbr1. If I select NAT mode under the network device I receive error net0 device not found on PVE. I cannot choose which NIC the NAT is going to? Any help is greatly appreciated!
 
This is interesting. you would have to give vmbr1 your static outside global IP address. The one you got from ISP. also confirm correct subnet mask. You will need to define the next-hop gateway in the /etc/network/interfaces configuration for vmbr1. I suspect you will need a default route defined that only handles traffic destined for eth1. If you just define a default route with the 'route' command, all traffic from your proxmox OS, including stuff intended to go out eth0 will be redirected out eth1.
 
So no easy way to just use the built in PVE NAT and dedicate this to particular NIC?
 
Yeah it's going to be difficult. I don't know why you would want to. This arrangement limits scalability.
 
I would like to have one NIC dedicated to VMs on LAN and one NIC dedicated for VMs used outside network... Any easy way to do this?
 
Create two VLANs on your switch. Trunk both to the PVE server. you can create vlan-aware bridges in PVE networking tab. Put the LAN VMs on the internal VLAN, and the outside internet VMs on the routable VLAN.