Live data from Hacker News

How to turn anything into a router

nbailey.ca

251–260 of 276 posts

Re: How to turn anything into a router

#251
post #68

Anyone know how necessary UPnP is? From what I can tell, this setup does not run UPnP for automatic port forwarding

It's quite useful, but -like just about everything- not necessary.

Run it in what miniupnpd calls "secure mode" (which prevents clients from adding rules for IPs they can't talk from), put the daemons's rules after your manually-managed ones and -because of today's world of NAT hole-punching and "just tunnel it over HTTPS, it's the universal firewall bypass protocol" techniques- you're exactly as secure as if you had it off.

Re: How to turn anything into a router

#252
post #89

Earlier quoted context omitted.

What happens if one node on your network is downloading at 1Gbit and another is uploading at 1Gbit? Both get 500Mbit. Bottleneck.

That's going to be super rare. If it's just LAN traffic it shouldn't hit your router at all and you won't have the bottleneck issue. The actual cases would need to be quite contrived, like you're backing up your media library at the same time you're updating cod warzone.

> The actual cases would need to be quite contrived...

As someone who works a programming job from home, I can tell you that the cases are not at all contrived.

I've also heard from folks who have lots of roommates (whether or not those roommates are their swarm of children) that heavy simultaneous upload and download traffic is very common.

You can get away with a router that has a single physical port. It's generally just easier and better to have more than one physical port... and even 10gbit-capable ethernet ports are pretty damn cheap. (I can get two 10gbit ports for about the same price as two 1gbit ports... ~30 USD.)

Re: How to turn anything into a router

#253
post #101

I'm curious - for power consumption, considering that you can get RaspPi products for so cheaply, is a discarded laptop more or less impactful on your electrical bill than a RaspPi? Like is the "free" laptop going to cost you more in the long-run then a nice little power-sipping ARM like a Pi5? Or do you need those extra operations-per-second that the more power-hungry x86 CPU gets you?

Everything outside of power equipment -- like HVAC, refrigerator, laundry dryer, etc -- is a rounding error on most power bills.

Re: How to turn anything into a router

#254

This article and many comments here missess the most important detail: Nobody wanna be a full time SysAdmin. Sure, follow the article and you will get things.....working but will also turn you into a SysAdmin. Homelab is my hobby, CLI aka command line interface is where I spend most of the time playing with my linux containers BUT you do wanna a GUI to manage network stuff. Do you wanna do this right and once?? And t…

If you know your platform, it is set-it-and-forget-it. I use CLI OpenBSD as a router, and it has been far less trouble than any of the ready-made GUI ones I have ever used.

The ready-mades are brutally under-powered, have snowflake UIs that have to be re-learned on each revision, and have very short firmware update windows, so have to be replaced (and the UI re-learned) every few years. While with my OpenBSD thing, it's just `sysupgrade` then `pkg_add -u` -- for almost a decade now.

But yeah, if you're just copy-pasting without understanding, OPNSense is far better.

Re: How to turn anything into a router

#255
post #240

Earlier quoted context omitted.

Which bands and capabilities did you have in mind? For a basic 2.4 GHz, almost anything at this point. Intel and some iteris chipsets are well supported. mt7996 is good for wifi 7. You can also check the suggested hardware list on the kismet project for good recommendations for older bands and protocol versions

> Intel and some iteris chipsets are well supported. Intel chipsets categorically do not support AP mode

It is hit or miss - one NUC has been stable for years, another kernel panics after the 5th client connects.

Re: How to turn anything into a router

#256
post #238

Earlier quoted context omitted.

Iirc classic WRT-841 and similar "300Mbit WiFi" generation 4-100Mbit-ports Wi-Fi routers had the CPU attached via an on-SoC gigabit link to a vlan capable switch that has the 4 100BASE-TX ports exposed.

Are there links I can read up on this? Ethernet as on-chip bus blows my mind. I guess it's cheaper than having to redesign an entire SoC, but still...

These SoCs are often purpose built for networking. The CPU just connects to an internal switch chip instead of an external jack.

Mikrotik makes block diagrams of some of their Routerboards available. This is a hAP AC3, for example

https://i.mt.lv/cdn/product_files/RBD53iG-5HacD2HnD_201031.p...

It runs on a Qualcom IPQ4019 single-chip Wi-Fi system-on-chip (SoC)

Re: How to turn anything into a router

#258
post #30

Lots of "just use X" comments but the article is about showing the bare minimum/how easy the core part of routing actually is. Also, if you have ever used docker or virtual machines with NAT routing (often the default), you've done exactly the same things. If you have ever enabled the wifi hotspot on an android phone also, you've done pretty much what the article describes on your phone. All of these use the same Lin…

Not super practical for everyone, but definitely valuable as a mental model shift

Re: How to turn anything into a router

#259

This really takes me back. My first actual 'use' for Linux was making routers out of leftover computers. The perfect machine back then was a 100MHz Pentium, in a slimline desktop case. At the time, the Pentium III was the current desktop chip, so you'd have a pile of early Pentium-class machines to use. And even a 10mb ISA network card (3Com if possible) would have plenty of power for the internet connections of the…

This unlocked a very specific kind of nostalgia

Re: How to turn anything into a router

#260

I've got one of those N100+10Gbit router devices with a handful of ports. It seems a pretty reasonable device with one of the router distros running on it, but it doesn't seem nearly as efficient as my ucg-fiber/route10 devices, and that wouldn't bother me except that I suspect the packet latency is significantly higher too. Those devices AFAIK have hardware programmable router chips, which means the forwarding is do…

It's less about "hardware is always lower latency" and more about when the fast path stays enabled vs when you fall off it
Post reply on HN