Virtual IP/NAT/Virtual Machine

Started by dsnyc, October 12, 2026, 12:20:29 AM

Previous topic - Next topic
I am running OPNsense on a physical appliance. My HYPER-V Server NIC connect to the OPNsense firewall. Running on HYPER-V is 1 virtual machine also running OPNSense. I need to assign a static WAN IP to the WAN interface of the OPNsense virtual machine. I cannot figure out how to get this working. I have setup Virtual IP and NAT and firewall rules, but cannot reach the WAN IP of the OPNsense virtual machine.

Quote from: dsnyc on October 12, 2026, 12:20:29 AMI need to assign a static WAN IP to the WAN interface of the OPNsense virtual machine.

I have setup Virtual IP and NAT and firewall rules, but cannot reach the WAN IP of the OPNsense virtual machine.
Why use the Virtual IP for WAN ?!

You can simply configure the WAN IP Address in the WAN Interface Settings ?!
Weird guy who likes everything Linux and *BSD on PC/Laptop/Tablet/Mobile and funny little ARM based boards :)

The HYPER-V NIC that connects to the physical opensense firewall is assigned a LAN IP of 192.168.251.1 for example. This gives the HYPER-V host access to the Internet. The HYPER-V Opensense VM has the same HYPER-V NIC connected as it's WAN interface. I need to be able to have traffic to the Virtual IP to go to the WAN IP of the HYPER-V Virtual Machine Opensense. Not sure how to do this.

Quote from: dsnyc on Today at 01:03:06 AMNot sure how to do this.
I noticed that in my previous reply ;)

What you are doing is basically the same stuff a lot of people do in Proxmox :
- It has one Main Interface which is also Bridged with the network of the VMs and Containers : vmbr0
- Usually also VLAN aware.
- Let's say it has the IP Address you mentioned : 192.168.251.1/24
- When your OPNsense VM has the WAN Interface attached to vmbr0 it should automatically get for example IP Address 192.168.251.2/24 or you can configure whatever IP Address you need ofcourse in the WAN Interface Settings in OPNsense.

So I guess the question here is : Do you have something similar configured on the Hyper-V Host ?!
Weird guy who likes everything Linux and *BSD on PC/Laptop/Tablet/Mobile and funny little ARM based boards :)