QEMU NAT with Opnsense

Started by August8828, January 14, 2026, 07:33:07 PM

Previous topic - Next topic
Hello,

unfortunately I have problems get the NAT option with QEMU on my Linux host running. I use Linux as my main OS and it seems like I can not establish a connection over my VMs which use the NAT option.

For NAT, I got assigned the 192.168.122.0/24 network. I can ping it from my Linux host. Unfortunately, when creating either a Linux or Windows VM, the network can not get established and I do not get why. Regarding the routing table, it should use the 192.168.100.1/24 as gateway.

I also use VLANs in my network. X.X100.0/24 is my management VLAN.

Do you have an idea why this is not working?

Not clear, how did you set up your virtual network.

Do you run OPNsense with a single NIC?

Quote from: August8828 on January 14, 2026, 07:33:07 PMFor NAT, I got assigned the 192.168.122.0/24 network. I can ping it from my Linux host.
What?
OPNsense, the virtual router or any other IP?

Quote from: August8828 on January 14, 2026, 07:33:07 PMUnfortunately, when creating either a Linux or Windows VM
To what?
To the OPNsense WAN, LAN???

Quote from: August8828 on January 14, 2026, 07:33:07 PMRegarding the routing table,
Which device?

Quote from: August8828 on January 14, 2026, 07:33:07 PMDo you have an idea why this is not working?
Give more details.