PfSense – WireGuard Returns as Experimental Package
netgate.com
netgate.com
And indeed just three days ago the work was announced on the wireguard list https://lists.zx2c4.com/pipermail/wireguard/2021-May/006711....
https://www.netgate.com/blog/painful-lessons-learned-in-secu...
[1] https://arstechnica.com/gadgets/2021/03/buffer-overruns-lice...
[2] https://www.phoronix.com/scan.php?page=news_item&px=Netgate-...
"you either have a commit bit (enabling you to commit code to FreeBSD's repositories) or you don't. It's hard to find code reviews, and there generally isn't a fixed process ensuring that vitally important code gets reviewed prior to inclusion"
Doesn't sound very professional!I find myself in the same boat. What do you use/recommend instead?
https://www.cjross.net/dns-security-and-adblock-with-opnsens...
Aside from community and WireGuard issues, any reason to abandon a working pfsense install?
My favorite thing about OpenWrt is SQM CAKE, state of the art traffic shaping. A panacea for slow links
OpenBSD's history is impeccable and I really don't want to have to think about my router after initial setup other than installing updates once in a while.
But I'm pretty sure I've seen wireguard settings on pfsense a few months ago (non-commercial version)? So what is new here?
Btw, I'm wondering what HN folks think but I'm leaning to basically go full wireguard. I don't see why I wouldn't want it basically everywhere. It simplifies network management, makes things more explicit. There don't see to be any performance issues (running production database through it right now), and when running it at home it can even make my Internet seem faster when tunneling through it (probably because of some suboptimal TCP settings somewhere along the way, which seems common).
Wireguard in kernel gives great performance while just working if your kernel is already working on the hardware. Wireguard is so small it is considered easy to audit so is a prime candidate for kernel implementation.
DPDK is listed as an "Exotic" todo for Wireguard:
1. It is faster if you make it so, i.e., you need to invest quite some work to get to a point where it's faster than kernel - but yea, with that you can make it go brrrrrrrt in quite a few use cases, it's more like an SDK.
2. Some NICs support loading a smaller program to operate directly on the NIC, e.g., through eBPF - nothing gets faster than that as it avoids that (some) traffic hits the CPU at all. But again, it's work to create and maintain and only feasible for specialized stuff.
3. Note that with Linux[0] a lot of the context switch overhead can be avoided by leveraging the state of the art async framework IO-uring, BSD may already have or get something similarily[0]. I recommend reading the paper of the original author[0], it's fascinating IMO.
[0]: I know this is about BSD, so somewhat off-topic, but still shows that most of the context switch complexity can be avoided while not re-inventing the wheels in user-space.
TCP is a beast with opportunity for countless subtle bugs. The Linux kernel is perhaps the best implementation there is. Many userspace implementations are simplified and missing features.
Even giants like Cloudflare use Linux kernel for routing when they need to operate above layer 3. They only use DPDK for very low level features.
DPDK has its place but for most use cases you need to man handle TCP and you're better off using kernel packet handling for that
What could you possibly mean by this?
Their line rate stuff for flood mitigation uses DPDK or similar
The Wireguard implementation in VPP runs at about 5Gbps in a simple single-stream iperf test.
Kernel Wireguard is almost 3gbps.
But Wireguard is mostly held back by the slow crypto implementation, which is CPU-bound.
AES-GCM IPsec on the same hardware is 19.5gbps, limited by the 25gbps NIC, using again, single-stream iperf with ipsec in VPP.
DPDK only needs dedicated cores for the poll mode drivers, and these days the Intel and mellanox NICs can be run in interrupt mode.
Good numbers either way, but you again much more limited hardware support since the drivers need to be DPDK specific.
But Wireguard is still crypto-limited, the AES-GCM result proves it.
Also looks like AF_PACKET and AF_XDP are basically an alternative to DPDK with similar functionality but built into the kernel using kernel drivers, new to me.
I keep trying to get people to try it out :) . I left pfSense community years ago when drama started and it became clear somebody was commercializing it.
Linux based distros have better features and hardware compatibility these days anyways. BSD is slowly dying (at risk of downvotes here)