WAN2 assignment to VMs while using pfsense

Boyd911

Member
Apr 8, 2023
38
2
8
I’m running a PVE host with 2 NICs. The intent is to run host management via the LAN/WAN1 (192.168.2.100) and have the VM’s using WAN2. Basically my VMs should have a different public ip has the host But they should be reachable via the LAN so i can ssh into them.

The host is managed via the LAN with enp4s0 and vmbr0. It‘s public ip looks like x.x.198.121. This is also the public gateway.
On enp5s0 and vmbr1 is the WAN2 connected, it’s ip i= x.x.198.122

I’ve installed pfsense with 2 interfaces WAN and LAN. WAN has interface vtnet1, LAN has interface vtnet0. IP’s are assigned - WAN static, LAN DHCP. Ping in pfsense works.

But when I create a VM it gets IP via DHCP (192.168.2.x) but when I query it’s public ip via
Code:
dig +short myip.opendns.com @resolver1.opendns.com
it gives x.x.198.121 instead of x.x.198.122.

How to solve? How do I assign WAN2 to the VMs?
 

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!