this post was submitted on 19 Oct 2024
44 points (89.3% liked)

Selfhosted

39739 readers
899 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 1 year ago
MODERATORS
 

Any recommendation for a cheap, small #firewall for my #homelab ? I realized I can’t control easily what goes out of my network only via DNS block lists

Cc @[email protected] @[email protected]

all 35 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 13 hours ago

MikroTik is very affordable and can be configured quite extensively.

[–] [email protected] 20 points 3 days ago (3 children)

pfsense running on whatever hardware that doesn’t use too much power

[–] [email protected] 15 points 2 days ago

Or opnSense

[–] [email protected] 7 points 3 days ago

Or OpenWRT on a thrift store Linksys

[–] [email protected] 3 points 3 days ago

I can’t recommend pfSense enough.

[–] [email protected] 11 points 2 days ago

OPNsense on any small scale dual LAN box, either a used mini PC or a purpose made one.

[–] [email protected] 11 points 3 days ago* (last edited 3 days ago)

I bought a refurbished SFF PC and put a PCIe NIC in it. Installed opnSense.

Cheap as chips. Supremely powerful.

[–] [email protected] 2 points 2 days ago

I'm doing opnsense on a protectli

[–] [email protected] 5 points 3 days ago* (last edited 3 days ago) (1 children)

I bought this Protectli Vault FW2B , and installed OPNSense strictly for firewall since I don't control the router in my town home.

I used this guide to set up a transparent bridge so I can filter out traffic before it gets to the subnet my property manager assigned to me.

Setting it up was a great learning experience. One thing that was odd for me though, was that I had to change the label of the interfaces in the ui to match the label on the hardware.

[–] [email protected] 1 points 3 days ago

@[email protected] this is great, thank you!

[–] [email protected] 5 points 3 days ago (1 children)

I don't know what kind of specs you're looking for for your system, but I've been very happy with my netgate.

Though it's still close to $200 for the lowest model, but comes with support if your not really sure what your doing.

Netgate 1100 $189

No link posted because I didn't look at the rules for this community.

[–] [email protected] 1 points 3 days ago

Seconded. Not the cheapest solution, but worth the price.

[–] [email protected] 5 points 3 days ago (2 children)

Any pc with two network ports and Ipfire will do. Easy to set up and configure.

[–] [email protected] 1 points 3 days ago

Go on ebay and look for refurbished PCs, it'll probably be cheaper than buying a wireless router. It'll take some setup but you will get the configurability you need, in spades.

[–] possiblylinux127 0 points 2 days ago

Not necessarily the most performant setup depending on hardware. You want something that has a enough bandwidth.

[–] [email protected] 1 points 2 days ago

Dlwrx36 flashed to openwrt should serve you nicely on gigabit ethernet

[–] [email protected] 2 points 2 days ago (1 children)

If you're considering building your own firewall, you've started down a long path of homelabbing. I'd encourage you to start with a proper setup and allow yourself plenty of room to grow. You want your setup to be extensible, and the firewall is just the beginning.

I'd grab at least a 15U rack and a Dell poweredge R210. Throw in a gigabit nic and install OPNsense. You'll have room for your switches, NAS, UPS, etc... later.

[–] [email protected] 2 points 2 days ago

I basically did the same, picked up a 12U rack and a Dell R220 as my PfSense box.

Been so stable and can handle anything.

[–] [email protected] 2 points 2 days ago (1 children)
[–] [email protected] 2 points 2 days ago* (last edited 2 days ago) (1 children)

In that case OPNsense does the exact same thing but with a more intuative GUI. It originally was a fork of pfSense.

[–] [email protected] 1 points 2 days ago (1 children)

Which is why I said that I'm a purist. But whatever works, they're both worth exploring. I got dug-in on my solution a decade ago and haven't really had a reason to change once I learned it.

[–] [email protected] 1 points 1 day ago

Cus there isnt a reason to change if you are already super familiar with pfSense. They basically do the same stuff.

[–] [email protected] 3 points 3 days ago

We probably need more details as to what exactly you're attempting to accomplish and how you're attempting to accomplish it.

The main issue is that each rule you add to a firewall has a performance penalty: each packet is checked against each rule before it's passed.

Ten rules require 10x more cpu than 1 rule, 100 rules need 10x more than 10 rules, and so on.

Depending on how much traffic and how many rules we're talking about and what kind of expectation you have for performance as well as anything else (eg. vpn endpoint), "small and cheap" may not be fast enough, and you might have to lean into higher performance hardware.

[–] [email protected] 3 points 3 days ago (1 children)
[–] [email protected] 2 points 3 days ago

Pfsense is built on this, but it has some free software issues.

OpnSense was a pfsense fork from some of them original creators, that is free software.

Both are fantastic.

[–] [email protected] 3 points 3 days ago (1 children)

Look up some mini n100 boxes. More than enough to do what you need. I think Minisforum is selling refurb units now.

[–] [email protected] 3 points 3 days ago (1 children)

This. N100 box with Opnsense will serve you well for a decade+ until you want to upgrade to 10gbps.

[–] [email protected] 1 points 2 days ago

I have an N100 box for my router and it's great for singe gigabit or less. But > 1gbit and you really quickly need some serious hardware.

At work I was using a VM with 2 cores from a xeon 4215 and it struggled to get anything more than 2 gbit. As soon as I bumped it up to 4 cores I was able to get the full 4gbit speeds. If I wanted to do any traffic shaping or packet inspection speeds would tank. Also my OpenVPN speeds kinda suck on this N100 device. They're never great, but I can definitely tell I'm getting CPU bound vs when I ran it on my server. So if you plan on running extra services don't expect the greatest performance.

A lot of networking traffic is single core dependent so I've been trying to find one of those weird 5 core machines with 1 P core and 4 E cores which I think would be the perfect fit.

[–] possiblylinux127 1 points 2 days ago

What are you wanting?

[–] [email protected] 1 points 3 days ago

I can recommend the nanopi r4s, supported by openwrt, ipfire and I think opnsense. Ive been using it as my main router for almost a year now on a symmetric 1Gb connection. Best part is it's super cheap and tiny