this post was submitted on 11 Aug 2023
103 points (97.2% liked)

Selfhosted

40394 readers
382 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
103
Best router for home use? (self.selfhosted)
submitted 1 year ago* (last edited 1 year ago) by gabe to c/selfhosted@lemmy.world
 

I am planning to eventually build my own home server, and when I do I will hook it up via ethernet. But I do want to switch away from the generic FIOS router and use my own for more control over my data and security. Any recommendations?

you are viewing a single comment's thread
view the rest of the comments
[–] Semi-Hemi-Demigod@kbin.social 6 points 1 year ago (1 children)

I did mine by just adding some iptables rules to set up NAT. It's all of four commands:

echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf

iptables –t nat -s 192.168.0.0/16 –A POSTROUTING –o $wan0 -j MASQUERADE

iptables –A FORWARD –i $wan0 –o $lan0 –m state --state RELATED, ESTABLISHED -j ACCEPT

iptables –A FORWARD –i $lan0 –o $wan0 –j ACCEPT

Just set $lan0 and $wan0 to your LAN and WAN interfaces. For wifi I've got a couple Unifi access points around the house for good coverage.

Yes, I know IPv6 is better and yadda yadda yadda but I can't remember the addresses let alone type them so I'm not changing anything.

[–] d13@programming.dev 2 points 1 year ago (1 children)

I did this as well, but I'm wondering if it was the wrong call. It's harder to work with firewalls (particularly if docker is involved), and I've struggled with stuff like SyncThing.

Most likely more learning could solve it, but I wonder if I should switch to a dedicated router OS where more support resources are available.

[–] Semi-Hemi-Demigod@kbin.social 1 points 1 year ago (1 children)

I've got almost all of my services running on a separate, bigger system and only have a couple ports open on this one. Iptables isn't too hard once you understand the shorthand.

[–] d13@programming.dev 1 points 1 year ago (1 children)

I think my problem is trying to run docker at the same time. Docker messes heavily with iptables and makes it a real pain.

[–] Semi-Hemi-Demigod@kbin.social 2 points 1 year ago

The only docker containers I run on my router are a simple search proxy and an Infrared instance that routes Minecraft server connections to another box on my LAN. But IIRC that took a bunch of fiddling