21
submitted 9 months ago by poVoq@slrpnk.net to c/selfhosted@lemmy.world

I am not overly happy with my current firewall setup and looking into alternatives.

I previously was somewhat OK with OPNsense running on a small APU4, but I would like to upgrade from that and OPNsense feels like it is holding me back with it's convoluted web-ui and (for me at least) FreeBSD strangeness.

I tried setting up IPfire, but I can't get it to work reliably on hardware that runs OPNsense fine.

I thought about doing something custom but I don't really trust myself sufficiently to get the firewall stuff right on first try. Also for things like DHCP and port forwarding a nice easy web GUI is convenient.

So one idea came up to run a normal Linux distro on the firewall hardware and set up OPNsense in a VM on it. That way I guess I could keep a barebones OPNsense around for convenience, but be more flexible on how to use the hardware otherwise.

Am I assuming correctly that if I bind the VM to hardware network interfaces for WAN and LAN respectively it should behave and be similarly secure to a bare metal firewall?

you are viewing a single comment's thread
view the rest of the comments
[-] Illecors@lemmy.cafe 9 points 9 months ago

I'd been running OPNsense in a VM for some time. I used xen as a hypervisor, but that shouldn't really be a requirement. Passed the nics through and it was golden! All the benefits of a VM - quick boot-up, snapshots on the hypervisor - it's truly glorious :)

[-] poVoq@slrpnk.net 1 points 9 months ago

Sounds great. What about hardware acceleration features of the NIC? I read somewhere that its better to disable the support for that in OPNsense when running it in a VM?

[-] Illecors@lemmy.cafe 2 points 9 months ago

Dunno, worked well for me. Give it a shot and see if anything needs to be disabled.

[-] umbrella@lemmy.ml 1 points 9 months ago* (last edited 9 months ago)

in my case the driver had a bug with power management, so i had to disable that on the hypervisor.

other than that everything worked well, passing the nics through also passes all the features.

[-] wildbus8979@sh.itjust.works 0 points 9 months ago* (last edited 9 months ago)

Another option is to pass through the PCIe devices to the VM.

[-] poVoq@slrpnk.net 2 points 9 months ago* (last edited 9 months ago)

I just saw that option. What would be the advantages and disadvantages of this?

I guess when I pass the actual NIC device the hardware acceleration should work?

Edit: Looks like my host system does not support this, at least that is the error I get when trying ;)

[-] wildbus8979@sh.itjust.works 0 points 9 months ago* (last edited 9 months ago)

For one you offload the entire processing and driver handling to the VM, so if the OS wants to do something funky, it can.

this post was submitted on 28 Mar 2024
21 points (88.9% liked)

Selfhosted

40734 readers
442 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS