Live data from Hacker News

How to turn anything into a router

nbailey.ca

51–60 of 276 posts

Re: How to turn anything into a router

#51
Routing is pretty easy for most use cases... firewalling an Internet connection, on the other hand, is just about impossible (thanks TLS 1.3) without pretty serious overhead, 3rd party maintained live subscriptions, TLS interception, and a willingness to say "no" to a lot of the shenanigans that modern programs and devices try to pull.

I recommend the free home version of Sophos for the least painful way to do it. Buy a Palo Alto with a full subscription if you are really serious.

Re: How to turn anything into a router

#52
Maybe someone in this thread has a couple of ideas:

What’s the simplest way to spin up a simple „cattle, not pet“ routing VM? I don’t want to mess with any state, I just want version controllable config files. Ideally, if applying a version fails, it would automatically roll back to the previous state.

OpenWRT seems like it fits my description most closely, but maybe someone here is a fan of something more flashy/modern.

Re: How to turn anything into a router

#53
post #41

Earlier quoted context omitted.

A CPU from the last 20 years can route traffic at gigabit speed. It's only something to worry about for a Raspberry Pi3 or something similarly 'crippled'.

I think I understand why this is true for plain IP forwarding. There isn’t much to break the cache and the lookups are few and fast. What’s the cheapest (new) computer that can drive a 1Gb port with NAT? With a busy encrypted (wireguard?) connection? [I don’t think qos has a lot of use in the domestic environment; sure, someone here does it but I think it’s much less mainstream than the features I already mentioned.…

Wireguard adds nothing unless you'd want to terminate it on the router. In which case it adds so very little it's unnoticeable.

About any n100 will do. Question is in their reliability which mostly comes down to power regulation components quality. Not performance.

One of my installs runs on a repurposed old android phone. Which has about 100 times CPU capacity of the router I write this through, and that one being cheap tplink shit still terminates wireguard at link speed which is 100Mbps. You don't need fancy gear for routing. And you don't usually need gigabit uplink because speed is limited way upstream.

But if you want "the right gear and damn the price" go get a Microtik. They are very good.

Re: How to turn anything into a router

#54
post #42

Earlier quoted context omitted.

I'm at a stage where I don't want to be doing network management on my weekends. I have a Ubiquiti router that's pretty good, and for my router I'd like something like TrueNAS for my NAS, a distribution that completely turns the hardware into an appliance I can configure once and forget about. Is there something like that?

Pfsense/opnsense would be one option (based on FreeBSD). For Linux there is OpenWRT, which you can either run as an alternative firmware on quite a few consumer routers/access points, or install on a PC or Pi or similar. Caveat: I have only used OpenWRT on a high end consumer router (GL.inet MT6000) out of those. That works well, anything else is based on reading about people using those options. For all of those, on…

Nice, thanks! I had an OpenWRT router back in the day, but it had no Web interface. I'll try OPNsense, thanks.

Re: How to turn anything into a router

#56

Earlier quoted context omitted.

Wouldn’t all traffic be routed through the OS/processor on board?

You'd be shocked to find out how old and weak the CPU in your current router is. Typically they're on par with low end desktop CPUs from 10-15 years ago.

Except actual routers don't handle the traffic on the CPU, they have dedicated hardware to actually handle the packets. The CPU basically runs the OS, configures the hardware router, and does housekeeping tasks (e.g. ARP or FDB expirations, NAT cleanup, etc). The only packets that ever reach it are "trap to CPU" situations that don't require acceleration as those are rare or expensive to implement in hardware (e.g. better suited to a CPU). Those usually include management protocols (ICMP, ARP, NDP, STP, etc) or packets with unknown destination (e.g. the first packet to an IP that requires ARP resolution).

That's how you can have multi-Gbps on a router with a 200MHz MIPS CPU. Or Tbps on a router with a quad-core Xeon.

Re: How to turn anything into a router

#57
Here I was thinking this article would tell me how to turn my unmanaged switches into routers, but no, "anything" actually means "any fully featured general purpose computer with networking".

Re: How to turn anything into a router

#58

Maybe someone in this thread has a couple of ideas: What’s the simplest way to spin up a simple „cattle, not pet“ routing VM? I don’t want to mess with any state, I just want version controllable config files. Ideally, if applying a version fails, it would automatically roll back to the previous state. OpenWRT seems like it fits my description most closely, but maybe someone here is a fan of something more flashy/mod…

OPNsense. I use it on dell optiplex SFF for about 8 years. Was never tempted to use VM for routing, but many do.

Version control is in the GUI, you can adapt for your needs the number of changes you need. automatic config.xml backup also possible.

Re: How to turn anything into a router

#59
Hmm I've always had a manually configured low power generic box as router.

But I've never even tried to set up my own access point, I just pay Unifi for that [1]. The software part is doable but I don't want to learn to handle the signal issues.

[1] Switched to Unifi in anger after my first consumer level 5 Ghz wifi needed reboots weekly because it was overheating. Do yourself a favour and get the semi pro stuff, Unifi or others.

Post reply on HN