87

Moving from OpenBSD to FreeBSD for firewalls

I once wrote a similar post to an DVD industry centric mailing list (remember those?) regarding switching to FCP7 from Adobe Premiere with a huge difference in how FCP7 would allow capturing of discrete audio channels vs Premiere forcing an interleaved audio stream. Eventually, a rep from Adobe contacted me through my company's PR team (a first for me) to go over the list of complaints. At the end, he agreed these were all valid complaints, and then asked "if Premiere added these changes would I be willing to switch back"? At that point, I said probably not as we'd now be fully switched to FCP7 in all departments. So I understand that sentiment as well. Honestly, I was shocked that someone actually read my missive and actually paid any mind to it. So maybe someone at OpenBSD will be as receptive if not equally unable to do anything about it.

an hour agodylan604

As noted, recent changes to OpenBSD TCP handling[1] may improve performance.

On a 4 core machine I see between 12% to 22% improvement with 10 parallel TCP streams. When testing only with a single TCP stream, throughput increases between 38% to 100%.

I'm not sure that directly translates to better pf performance, and four cores is hardly remarkable these days but might be typical on a small low-power router?

Would be interesting if someone had a recent benchmark comparison of OpenBSD 7.8 PF vs. FreeBSD's latest.

[1] https://undeadly.org/cgi?action=article;sid=20250508122430

an hour agoSoftTalker

That particular change improves throughput received locally. Though over the past few years there's been a ton of work on unlocking the network layer generally to support more parallelism.

For a firewall I guess the critical question is the degree of parallelism supported by OpenBSD's PF stack, especially as it relates to common features like connection statefulness, NAT, etc.

22 minutes agowahern

Thanks. Yes after I posted that I started wondering if it was really relevant to pf.

3 minutes agoSoftTalker

So you don't like OpenBSD, but you do like Ubuntu?

This person seems like they know wht they are talking about and given it serious thought, but I cannot fathom how you could make such a conclusion today.

28 minutes agoY_Y

What's wrong with Linux for firewalls? Either openwrt, or any distro really.

Why would any BSD perform better?

(edit: genuinely curious why BSDs are such popular firewalls)

an hour agoyuvadam

I assume in this case they already had a bunch of firewall rules for PF and switching from OpenBSD -> FreeBSD is a much easier lift then going to linux because both the BSDs are using PF, although IIRC there are some differences between both implementations.

an hour ago2trill2spill

We migrated to a linux nftables based firewall.

I never liked iptables, but nftables is pretty nice to write and use.

And with one "flowtable" line added to your nftables.conf you can even in theory have faster routing when conntrack is active

https://thermalcircle.de/doku.php?id=blog:linux:flowtables_1...

44 minutes agoguerby

Let me extend the question to what’s wrong with NFTables on Linux? It’s a different way to manage Netfilter, out of IPTables

an hour agorfmoz

What's wrong with using any BSD? Can't people use whatever suits their needs?

an hour agonesarkvechnep

Of course, I'm genuinely curious why BSDs are more popular as firewalls.

an hour agoyuvadam

Because of pf[1]. It's just a very capable firewall with a pleasurable configuration language.

[1] https://www.openbsd.org/faq/pf/

3 minutes agonesarkvechnep

PF is really nice. (Source: me. Cissp and a couple decades of professional experience with open source and proprietary firewalls).

And if they are already using it on openbsd, it’s almost certainly an easier lift to move from one BSD PF implementation to another versus migrating everything to Linux and iptables.

an hour agoelectric_mayhem

Agreed. Once you've gone pf you'll pine for it when working with anything else.

an hour agotheideaofcoffee

I've gotta me-too this. I've written any number of firewall rulesets on various OSes and appliances over the years, and pf is delightful. It was the first and only time I've seen a configuration file that was clearly The Way It Should Be.

an hour agokstrauser

I don't understand why this has 29 points and no comments. What's so amazing about this?

an hour ago0xWTF

Discussion threads about performance?

an hour agowslh

For me, the only drawback for corporations is the 6 month upgrade. There is no LTS on OpenBSD.

I use OpenBSD as a workstation and it works great, but in a production environment I doubt I would use OpenBSD for critical items, mainly because no LTS.

It is a sad state of affairs because Companies do not want nor will want a system you need to upgrade so often even if its security very good.

an hour agojmclnx

Yet companies insist on enabling unattended upgrades at least for "security" patches, which have introduced breakage or even their own vulnerabilities in the past (Crowdstrike was a recent dramatic example).

OpenBSD will just tell you that maintaining an LTS release is not one of their goals and if that's what you need you'll be better served by running another OS.

an hour agoSoftTalker

On the other hand though, updates on OpenBSD are the most painless updates I have ever done. I am more concerned about it's usage of UFS instead of something more robust for drives.

an hour agorootnod3

I'm grossly generalizing here, but it seems like OpenBSD boxes seem to be commonly used for the sorts of things that don't write a lot of data to local drives, except maybe logfiles. You can obviously use it for fileservers and such but I don't recall ever seeing that in the wild. So in that situation, UFS is fine.

(IMO it's fine for heavier-write cases, too. It's just especially alright for the common deployment case where it's practically read-only anyway.)

an hour agokstrauser

I've used it as a mail server, a web server, and a database (postgres) server. It's also my main desktop OS. Did/does fine, but I never really stressed it. I would certainly welcome a more capable filesystem option, as well as something like logical volumes, but I can't say that ufs has ever failed me.

You'll definitely want to have it on a UPS to avoid some potentially long and sometimes manual intervention on fscks after a power failure. And of course, backups for anything important.

23 minutes agoSoftTalker

> There are some things about FreeBSD that we're not entirely enthused about.

Damn I wish that they had expanded on this a bit (not to start a flame war, but to give readers a fuller picture, or even to prod the FreeBSD community into "fixing" those things)

edit: typo fix

an hour agoawesome_dude

It does seem like a weird omission doesn’t it?

an hour agolloydatkinson

I just like the reference to 10G ethernet. It can't become normal soon enough.

an hour agoj45

Just more navel-gazing from UTCC. I still don't understand why all of these submissions get upvoted so often. 10G performance just really isn't that interesting anymore, maybe around 2005 when it was the new kid on the block. If they were talking about squeezing firewall performance out of a box with a couple of 200g or 400g adapters and on run-of-the-mill CPUs and no offloading or something like Netflix publishes with their BSD work, I'd be more interested.

an hour agotheideaofcoffee

I imagine a near future where TCP/IP stacks, and device drivers are interchangeable between operating systems. In Linux, NDISWrapper [1] enables to use Windows drivers in Linux but it's a wrapper (with all due respect to this project).

[1] https://en.wikipedia.org/wiki/NDISwrapper

an hour agowslh

Sorta, but only with ancient windows XP drivers. It was a useful stopgap of it's era but linux networking drivers have more than caught up in the meantime.

26 minutes agomiladyincontrol

You mean like DPDK?