NOW LET US – AI RAG SaaS Studio TP.HCM
NOW LET US
Digital Product Studio
Back to news
DEV-TOOLS...4 min read

How to turn anything into a router

Share
NOW LET US Article – How to turn anything into a router

A guide on repurposing old hardware or mini-PCs into functional Linux-based routers, demonstrating that specialized hardware isn't always necessary for networking.

How to turn anything into a router

I don’t like to cover “current events” very much, but the American government just revealed a truly bewildering policy effectively banning import of new consumer router models. This is ridiculous for many reasons, but if this does indeed come to pass it may be beneficial to learn how to “homebrew” a router.

Fortunately, you can make a router out of basically anything resembling a computer.

I’ve used a linux powered mini-pc as my own router for many years, and have posted a few times before about how to make linux routers and firewalls in that time. It’s been rock solid stable, and the only issue I’ve had over the years was wearing out a $20 mSATA drive. While I use Debian typically, Alpine linux probably works just as well, perhaps better if you’re familiar with it. As long as the device runs Linux well and has a couple USB ports, you’re good to go. Mini-PCs, desktop PCs, SBCs, rackmount servers, old laptops, or purpose built devices will all work.

To be clear, this is not meant to be a practical “solution” to the US policy, it’s to show people a neat “hack” you can do to squeeze more capability out of hardware you might already own, and to demonstrate that there’s nothing special about routers - They’re all just computers after all.

Hardware selection

My personal preference is a purpose-made mini PC with a passively cooled design.

However, basically anything will work. It should have two Ethernet interfaces, but a standard USB-Ethernet dongle will also do the trick. It won’t be as reliable as an onboard interface, but will probably be good enough. For example, this janky pile of spare parts can easily push 820-850mbps on the wired LAN and ~300 mbps on the wireless network.

This particular device is a Celeron 3205U dual core running at a blistering 1.5 GHz. Even that measly chip is more than capable of routing an entire house or small business worth of traffic.

Going back even further, this was my setup for the first couple weeks of the fall 2016 semester:

  • A ThinkPad T60, trash picked from my previous job
  • An ExpressCard-PCIe bridge in the ThinkPad’s expansion bay
  • A trash-picked no-name Ethernet card in the PCIe slot, missing its mounting bracket
  • An ancient Cisco 2960 100 mbit switch, purchased for $10 from my college
  • A D-Link router acting as an access point (“as-is” thrift store find with a bad WAN port)

Yes, this is indeed a router! It probably looks like a pile of junk, because it is, but it’s junk that’s perfectly able to perform the job I gave it!

How does it get configured?

When set up, the system will be configured like this:

| Interface | Network | |---|---| | eth0 | WAN | | eth1 | LAN (Wired) | | wlan0 | LAN (Wireless) |

Both LAN interfaces will be bridged together, meaning that devices on the wired and wireless networks will be able to communicate normally. If one LAN port isn’t enough, you can plug in as many USB Ethernet dongles as you need and bridge ’em all together.

As mentioned before, this will run Debian as the operating system, and uses very few pieces that don’t come with the base install:

  • hostapd: For creating the Wi-Fi network
  • dnsmasq: For DNS & DHCP
  • bridge-utils: For combining ports into a common network

Also, I should mention that I’ll only be setting up IPv4 here. IPv6 works great for stuff like mobile devices, but I still find it too frustrating inside a LAN.

Install & Setup

Overall, it’s a pretty standard Debian install. A couple things I should mention:

  • Disable PXE network boot in the BIOS/UEFI setup.
  • If you can, set the device to the lowest clock speed, but disable any power management for USB or PCI devices.
  • Find the option like “Restore after AC Power Loss” and turn it ON.
  • Some devices won’t properly power up if there’s no display connected. If your device is like this, stick a “dummy dongle” into the HDMI port.

Install the required packages

After the initial install is done, there are some additional utilities to install:

sudo apt install bridge-utils hostapd dnsmasq

Name the interfaces properly

In modern Linux systems, the network interface names are named based on physical connection and driver type, like enp0s31f6. I find the old format, like ethX much simpler, so each interface gets a persistent name.

For each network interface, create a file at /etc/systemd/network/10-persistent-ethX.link:

[Match]
MACAddress=AA:BB:CC:DD:00:11
[Link]
Name=ethX

Configure the interfaces

The “outside” interface will be the WAN, and the “inside” will be the LAN. Note that the LAN interface does not get a default gateway.

/etc/network/interfaces:

allow-hotplug eth0
allow-hotplug eth1
auto wlan0
auto br0
iface eth0 inet dhcp
iface br0 inet static
bridge_ports eth1 wlan0
address 192.168.1.1/24

IP Forwarding

Create /etc/sysctl.d/10-forward.conf and add this line to enable IP forwarding:

net.ipv4.ip_forward=1

Firewall rules

The firewall rules and NAT configuration are both handled by the new netfilter system in Linux. We manage this using nftables.

© 2026 Now Let Us. All rights reserved.

Source: Hacker News

Advertisement
Ad slot ready: 5887729102

More in this category

NOW LET US Related – GLM 5.2 Is Out

dev-tools

GLM 5.2 Is Out

Zhipu AI has officially released GLM-5.2, its most powerful open-source model to date, featuring a 1M context window and advanced long-horizon task capabilities. The release underscores Zhipu's commitment to open-source AI and global scientific collaboration amid rising technological restrictions.

NOW LET US Related – Noise infusion banned from statistical products published by Census Bureau

dev-tools

Noise infusion banned from statistical products published by Census Bureau

The U.S. Department of Commerce has banned "noise infusion" from statistical products published by the Census Bureau, a decision that could have severe consequences for both data utility and privacy protection.

NOW LET US Related – Treating pancreatic tumours may have revealed cancer's master switch

dev-tools

Treating pancreatic tumours may have revealed cancer's master switch

A promising new drug called daraxonrasib has shown breakthrough results in treating pancreatic cancer, doubling median survival times. This achievement could pave the way for an entirely new class of cancer treatments.

NOW LET US Related – Every Frame Perfect

dev-tools

Every Frame Perfect

In UI design, perfection isn't just about the start and end states, but every single transition frame in between. Polishing these micro-interactions is key to building user trust.

NOW LET US Related – Leaving Mozilla

dev-tools

Leaving Mozilla

A poignant and candid reflection from a 15-year Mozilla veteran upon their departure. The author highlights the leadership's missteps in trying to emulate tech giants and urges Mozilla to return to its core values: community and uniqueness.

NOW LET US Related – Shepherd's Dog: A Game by the Most Dangerous AI Model

dev-tools

Shepherd's Dog: A Game by the Most Dangerous AI Model

A developer tested Anthropic's latest, supposedly 'too dangerous' AI model by asking it to build a long-held game idea in a single shot. The model succeeded, generating a complete 2,319-line game after a 45-minute reasoning session.

EXPLORE TOPICS

Discover All Categories

Deep dive into the specific technology sectors that matter most to you.