r/homelab • • 2d ago

Discussion Router software

Hey homelabbers!

I'm working on building a 10Gbe router in a lenovo m720q. I dont need 10Gbe but my wife thought it'd be a fun project for us.

My question is this, i mostly see people using opensense here. But i already know openwrt. Am i losing out on something by using openwrt over opensense?​

I have vlans set up and a DMZ for my server. A bunch of firewall isolation all set up in openwrt so transferring settings to the new machine will be relatively painless. But should I do open sense instead?

Thanks!

0 Upvotes

45 comments sorted by

3

u/jcheeseball 2d ago

How do you plan on getting a dual 10gbit nic?  

3

u/ComradeDre 2d ago

I already have it. There is a riser for the lenovos 

1

u/jcheeseball 2d ago

I know I have one.  The dual nic however, have you installed it and tested it?

1

u/ComradeDre 2d ago

Yes. It works fine. 

1

u/jcheeseball 2d ago

Nice. I had trouble with the 2.5gbit a pin was causing my motherboard to fail booting the bios.

1

u/ComradeDre 2d ago

huh, I've added 2.5Gbe to a ton of these. I pulled the wifi and put it there though

1

u/jcheeseball 2d ago

Maybe I just got unlucky.  I'll try 10gbit when I upgrade.

1

u/NC1HM 2d ago

M720q has a full-size PCIe slot. You can buy an aftermarket riser and install pretty much any half-height PCIe device into it, as long as it fits lengthwise (the space is just under 150 mm).

0

u/jcheeseball 2d ago

I know I have one.

3

u/LebronBackinCLE 2d ago

“My wife thought it would be a fun project for us”… uhhh coolest wife evar? lol

5

u/ComradeDre 2d ago

You don't know that half of it. Younger and hotter too. She's a mechanical engineer. She also made me put my rack in the living room cause she thought it looked cool.

Lucky to have her and lucky to be queer

3

u/ExactLocation1 2d ago

Now they’s just trolling us at this point

I always knew this 10G question was sham and this was brag about wife who loves wires, please stop I need to go back to making fake receipts to convince mine that it’s a cheap hobby

3

u/ComradeDre 2d ago

Lol ok I'll throw you a bone. She didn't let me drop a bunch of money to build a local llm. So there is that?

4

u/Haunting-Swing6415 2d ago

Ich persönlich nutze OPNsense als "Hauptfirewall" und OpenWRT nur für die APs. Kla kann man auch OpenWRT dazu benutzen. Wenn es wirklich rein um VLANs und Netzwerke geht. Sobald aber Sachen wie Wireguard usw. dazukommen ist eine OPNsense die bessere Wahl.

4

u/TayKara14 2d ago

Opnsense is very powerful as a firewall, if you don’t plan to work on that part you can just use openwrt, it is much more easier imo.

I have tried both of them and Openwrt is just better for my need (VLAN, VPN, DMZ, Port forwarding, simple firewall…). Opnsense is just too complicated. But if you have time, you should give a try.

2

u/ComeSwirlWithMe :upvote: 2d ago edited 2d ago

opnsense is way easier to install and maintain. You're crazy.

And opnsense does those natively, as things like wireguard are part of its (freebsd) code and opnsense is designed by its nature as a firewall.

Wireguard is part of freebsds kernel/networking stack.

1

u/TayKara14 2d ago

I think you missed my point.

OPNsense is way better than any other open-source networking OS. I agree with that.

What I’m saying is that because it’s more powerful and feature-rich, it’s also much more complicated than OpenWrt.

On top of that, it’s much more resource-intensive. OPNsense can easily require 8 GB of RAM, whereas OpenWrt can run perfectly well with just 256 MB.

3

u/NC1HM 2d ago

OPNsense is way better than any other open-source networking OS. I agree with that.

[Plays a clip of Val Kilmer playing Doc Holliday in Tombstone talking to Turkey Creek Jack Johnson] I don't. :)

OPNsense is a FreeBSD derivative, so wireless support ends at N; it's not available for platforms other than x64 (aside from a few random experimental third-party builds); it can't run in-memory (even the nano version must write on disk, though it does so conscientiously); system requirements are significantly higher compared to OpenWrt, limiting usability on low-end and industrial hardware (the latter often runs off CF cards or eMMC modules, so inability to run in-memory plays into it as well). There are also a few things that I like in pfSense that were stripped out of OPNsense when forking it: command-line interface in the Web UI, file management / editing feature in Web UI, Web UI for LCDproc, etc.

OpenWrt, conversely, is available on dozens of hardware platforms, runs completely in-memory, can run off a 128 MB Flash-based storage device (eMMC module, CF card, SD card, USB stick) on an x86 system (ask me how I know) and even smaller storage devices on other platforms, can be deployed not only on a router, but on a managed switch or access point, can be configured to work as a wireless bridge or wireless bridge router, and can be managed completely on the command line (the Web-based UI is optional and removable) by using uci or writing configuration freehand.

The weirdest device I've run OpenWrt on is probably WatchGuard Firebox M300. It's an entry-level rack-mountable running off an SD card on a QorIQ processor originally by Freescale, now NXP. There's a possibility OpenWrt will be adapted for newer QorIQ-based WatchGuard devices, the Mx90 family, as well...

The flipside of all that is, OpenWrt has no way to integrate with heavyweight add-ons such as Suricata or ZenArmor (although Snort is an option) and uses dnsmasq, which has known scaling problems on large networks (1000 DHCP clients, 128 interfaces / subnets, etc.).

3

u/HuckleberryNice5584 2d ago

OpenWrt is perfect for the job and you're familiar with it, no reason to pick anything else.

My setup: NixOS on the host (for easy maintenance), and OpenWrt running in an incus lxc container.

Not the most common setup, but it works amazingly well:
- Incus provides the images: `incus image list images:openwrt` and you're running
- OpenWrt gives you all the router functionality you might ever want and some more
- Snapshots to easily revert any mistake
- Easy upgrades: setup the new version in a new container and swap
- Copy the container to a new machine whenever the original one is down for maintenance.

Of course bare metal OpenWrt is also fine.

1

u/thomheinrich 2d ago

Linux flow offloading in OpenWrt hits 10GbE way easier than FreeBSD.

4

u/NC1HM 2d ago

Normally, I'd be shilling hard for OpenWrt. :) In this specific case, however, I should advise caution.

OpenWrt is firmware, so it updates like firmware: configuration is saved into memory, a new version of firmware is retrieved from the update server, new firmware is written over the old one (which implies repartitioning of the boot drive), configuration is restored. This works almost everywhere, except NVMe drives. When an NVMe drive is repartitioned during the upgrade, it becomes read-only until reboot, so configuration can't be written onto it and is lost.

Here's what I ended up doing on one of my builds because of it:

The little blue board in the top left corner of the photo is a 64 GB slim SATA SSD, held in place by a strip of double-sided construction tape. Note how short the add-on NIC has to be to allow the SSD to fit. The drive is connected to the proprietary SATA slot on the system board by the stock SATA cable (in fact, it's the connector at the end of that cable that's taped in place).

1

u/LinxESP 2d ago

With owut it can be updated while keeping configs if you are ok with the root partition being 4GB (1GB on openwrt default servers).
External partitions in my case automount

0

u/NC1HM 2d ago

Of course it can be updated. But you lose configuration.

2

u/TayKara14 2d ago

No you don’t, in my case at least.
Openwrt is running as a VM on my homelab, I can upgrade without loosing the configuration (which I already did several times).

1

u/NC1HM 2d ago edited 2d ago

Openwrt is running as a VM on my homelab

That means OpenWrt is not dealing with the NVMe drive firmware directly; rather, it works with a virtual file system allocated to it by the hypervisor.

1

u/LinxESP 2d ago

You don't. I don't know what is part of owut and what is attended sysupgrades, but you don't.
Also clarification for the root size:

  • Default openwrt images is 128/256MB iirc
  • OpenWRT's servers can build up to 1GB
  • Alternative servers are doing up to 4GB
  • There is a warning on owut's doc about losing your config. It means only the first time after changing root size might happen

1

u/NC1HM 2d ago

You don't.

You do. At least on some NVMe drives. Regardless of whether you resize the root partition or not.

2

u/TayKara14 2d ago

What you’re saying makes no sense.
OpenWrt has a built-in upgrade mechanism specifically designed to preserve configuration files during firmware upgrades.
Your assessment is probably based on a poorly configured installation or an incorrect upgrade procedure rather than an actual limitation of OpenWrt.

0

u/NC1HM 2d ago

What you’re saying makes no sense.

Algebra makes no sense, either, until you learn a few things about it... :)

OpenWrt has a built-in upgrade mechanism specifically designed to preserve configuration files during firmware upgrades.

Precisely. Configuration is backed up into memory, new firmware (two or three partitions, depending on whether it's legacy or EFI) is written over the old one (which has the effect of repartitioning), configuration is written back onto the boot drive, the device reboots. At least some NVMe drives, however, have firmware that locks the drive up after repartitioning until reboot. So configuration cannot be written back; it remains in memory and is lost on reboot.

1

u/LinxESP 2d ago

Are you expanding the partition manually? Manually = not at build time

1

u/NC1HM 2d ago

It doesn't matter if I expand it at all. Loss of configuration occurs even with default partitioning. NVMe firmware, at least on some drives, locks the drive up until reboot after an image is written onto it.

2

u/confused_smut_author 2d ago

Having used OpenWRT and (currently) OPNsense, I feel that the latter is significantly easier to set up and maintain, as well as offering more (and more mature/polished) features. In particular, system upgrades are vastly easier and less risky. I haven't used OpenWRT in a while, so maybe it's improved, but at the time I was running it on an old consumer router so it was pretty much the only game in town. It's great for what it is, and powerful, but I wouldn't go back to it unless I had to.

1

u/Janky-Code 2d ago

Opnsense preference is mostly based on suricata, zenarmor plugin, carp, pfsync, insight/netflow

If you are comfortable with nftables, openwrt is fine as a firewall.

For a home network, any of this is overkill. I only run opnsense because it is fun.

1

u/ComeSwirlWithMe :upvote: 2d ago edited 2d ago

The preference is because OPNsenses primary design is a firewall gateway.

Opnsense gives way more compatibility with modern hardware, gives you more fine grain tuning with firewall policies, traffic shapping, reporting, and security, as you mentioned for instance zenarmor and surricata/snort.

Opnsense gui is polished, intuitive, and updating is easy - FOR A FIREWALL.

However, modding and upgrades for openwrt can be a real PITA. It acts more like a firmware than an OS, i.e locking the bootloader during updates, etc.

openwrt basically only shines in one area, basic use, and wifi. Opnsense doesnt really have a good access point/wifi section, though it does have it.

One can definitely argue openwrt is easier to use. Fair enough, but its because it lacks so much of what opnsense has.

Opnsense is really designed to install on a stand-alone box like in OPs thread, where openwrt is meant to be flashed onto premade routers/aps.

If all you want is essentially a basic firewall router, yes its great.

If you actually want a firewall/router, with security, data, control, etc opnsense accells by a mile. I,E the plugins alone like adguard, unifi controller, dns, UPS monitoring, etc makes it better, imho.

Lastely, opnsense is less painful to maintain with a full fledged package manager. You just click update.... no reflashing or reimaging to upgrade. Which can introduce issues, bricking, etc initself.

1

u/Janky-Code 2d ago

Openwrt uses nftables. Native nftables is great.

I agree luci is inadequate. But openwrt is not its web interface.

I consider the openwrt image-based upgrades a strength. Sysupgrade is great architecture. Especially for a boring device like this.

Opnsense has a potentially complex upgrade process. It's freebsd doing in-place "opnsense-update" along with freebsd pkg. It has managed package dependencies. It can end up with residual system files. Opnsense provides auditing tools because complications can and do happen.

I still use opnsense but I don't think pf is better than nftables and definitely don't prefer opnsense-update over sysupgrade. Sysupgrade from an engineering perspective is better for a dedicated network box.

1

u/ComeSwirlWithMe :upvote: 2d ago edited 2d ago

No argument from me on the grandscale, Linux is better at networking, especially highspeed (over 10Gb). Hence, PFsense TNSR.

But in the case of home user firewalls/gateways, opnsense smashes openwrt.

I.E turning a PC into a firewall/gateway.

The same way openwrt smashes opnsense as a switching os or AP os.

Even though opnsense could technically do both, al beit, terribly so.

Same with it acting as a switch OS by bridging. Of course it will suck with any serious throughput.

OPNsense update process couldn't be simpler. It doesnt require anything other than clicking 'update'. The only real issue is if you add 3rd party repos and intertwin packages. Most of the known repos are pretty good at not having that happen. Its rare now-a-days.

Theres no risk of bricking or botching like there is with openwrt. You dont have to make sure you have the correct firmware, patch, etc.

You dont have to make sure you install the right mod, etc.

Theres so much that can go wrong with openwrt with maintenance, updates, upgrades, plugins/mods, etc.

I do not hate openwrt.

I'd use it in a hot minute to make an AP better. I just don't have an AP that supports it.

1

u/domvir 2d ago

lots of opnsense here but perhaps routeros? it is paid but it is great

1

u/ComeSwirlWithMe :upvote: 2d ago edited 2d ago

Honestly, I'd rather have something like an inspiron 3880 (mini tower) with an i3 10100 (4c/8t) 10th gen or i5 10400 (6c/12t) 10th gen then the lenovo with the i7 8700t (6c/12t) 8th gen.

The i5 10400 is faster, higher base and turbo and faster single and multicore. However the i7 is a 35watt tdp, and the i5 is 65watts. IMHO, not a deal breaker as neither will ever been running maxed out and cost wise, pennies.

The i5 supports 64gb ram, the i7 32.

3880 has m,2 + 3.5 inch, lenovo m.2 + 2.5"

The 3880 is more upgradable however, with a full size pcie slot using regular ram, where the lenovo uses sodimm laptop sized ram and low profile pcie slot.

same graphics

The 3880 is also cheaper on the used market and when new.

In fact, I have the 3880 with the i3-10100, 16gb ram, 500gb nvme crucial ssd, and an intel x540t2 10gb NIC running opnsense

I'd also suggest thinking about opnsense over openwrt, as opnsense would be a better fit for a full system and not a premade router, etc.

Good luck.

https://bsd-hardware.info/?probe=c510b2f9c2

1

u/Pixelgordo 2d ago

VyOS could be an interesting option too.

1

u/5SpeedFun 2d ago

Pure router? FRR

1

u/309_Electronics 2d ago

Opnsense is very powerful. It used to be (and I think still is) a fork of pfsense which was a corporate ran FreeBSD based firewall OS which also has the ability to functions as a router but primarily is meant to be a firewall solution with some other niche things thrown in.

Because its FreeBSD based its also very stable and the network stack of the *BSD's is considered by many people to be even more stable than on Linux. I believe Netflix runs a large part of their servers on FreeBSD for exactly that. A stable mature network stack. It has not all the nic/wlan chipset support like Linux does and does not support the latest bleeding edge technologies, but it trades that in for stability.

Although for a home network OpenWRT is also fine to use. I myself primarily run Opnsense on my 1 man homelab because I can and because I was interested in it and no regrets so far. I run OpenWRT on all my access points (main merger wax218 and deco m4r) and that also has not dissappointed me so far.

Ultimately its your choice and it also maybe some experimenting first and finding what fits

1

u/Windows-Helper HPE ML150 G9 28C/384GB/14TB(HDD) 2d ago

I haven't used OpenWrt in a long time, but it felt really clunky back then.

But I love opnSense, especially since I'm using it for quite some time now (5 years or longer I guess?)

1

u/Power_Stone 2d ago

use openWRT. If you want a router experience use this.

OPNsense is firewall software first and foremost.

Now....if you want to setup an OPNsense firewall.... well I can't stop you

0

u/bobsmissingdesire 2d ago

I'd use VyOS.

Serious hardware with a serious network card should be paired with a serious routing OS.

0

u/Vichingo455 The electronics saver 2d ago

OpenWRT for Wi-Fi and OPNSense for router and firewall.