opnsense in a vm with primary ip (hetzner)

Mar 6, 2024
26
2
3
Has anyone managed to spin up an opnsense VM and assign a primary ip into it from hetzner?
For example consider the primary IP is 100.100.100.50:

You create a bridge like so:
Code:
auto enp7s0
iface enp7s0 inet manual

auto vmbr0
iface vmbr0 inet static
        bridge-ports enp7s0
        bridge-stp off
        bridge-fd 0

Then you create a VM and install opnsense on it, whilst configuring it's WAN interface (which is vmbr0) you assign:
ip 100.100.100.50/26 gateway 100.100.100.65.

I personally thought this would work but I ended up with a box I could no longer reach.
And perhaps my knowledge of networking is not good so this scenario might never work at all...

What I also tried is to assign the IP on vmbr0 and create another bridge vmbr1 to act as WAN for the opnsense.
This does work but this means you have to route all your LAN traffic through vmbr1 so opnsense can process it.

I would love to hear some success stories if any ^_^
 

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!