How to turn an old PC into a home firewall
A spare desktop or mini PC can protect your whole home network better than the router your internet provider gave you. Put it between your modem and the rest of your network and every device passes through it: phones, laptops, consoles, smart TVs and anything else on your Wi-Fi.
This guide covers what the PC needs, how it's wired, and how the setup goes.
Why use a PC as a firewall
- More power than a router. Intrusion prevention, which inspects traffic for attacks as it passes, needs real CPU. A four-core desktop CPU does that at full gigabit speed; most consumer routers can't.
- Protection for every device at once. Devices you can't install anything on, like smart TVs, cameras and game consoles, are covered because their traffic goes through the box.
- You control it. Block lists, parental controls, which countries can reach you, and what each device is allowed to do.
- It reuses hardware you already own.
What the PC needs
- A 64-bit Intel or AMD processor. For a 1 Gbps internet connection with intrusion prevention on, plan on 4 to 6 cores.
- 8 GB of RAM. Large block lists, such as full parental-control lists, use more.
- An SSD of 64 GB or more. It gets erased; the PC is used only as the firewall.
- Two Ethernet ports. One for the modem (WAN), one for your network (LAN). Most desktops have one built in; add a PCIe network card, which costs little. Many mini PCs sold for this have two or more ports built in.
- For the install only: a USB stick of 4 GB or more, a screen and a keyboard.
A laptop is a poor choice: one Ethernet port at most, and USB network adapters are less reliable for something that runs all day.
How it's wired
Modem to the firewall
The cable from your modem (or fibre box) goes into the firewall's WAN port.
Firewall to your network
The LAN port goes to your Wi-Fi router or a switch. If you keep your existing Wi-Fi router, set it to access point (or bridge) mode so it only does Wi-Fi and the firewall does the routing.
Everything else stays the same
Devices connect to Wi-Fi or the switch as before. Their traffic now passes through the firewall on the way out.
Setting it up
The general steps are the same whatever firewall software you use:
Write the installer to a USB stick
Download the installer image and write it to the stick with a USB writing tool.
Boot the PC from the stick and install
The firewall software replaces whatever was on the SSD.
Tell it which port is WAN and which is LAN
This is where many people get stuck: ports are often listed by cryptic names. Some firewalls detect the WAN port by which one gets an address from the modem.
Configure from a browser
From a computer on the LAN side, open the firewall's address and set up an admin account, your internet connection, your network, and the protection you want.
Open-source firewall distributions can do all of this, but expect to configure intrusion prevention rules, DNS filtering and encrypted-DNS blocking yourself, which can take an afternoon or a weekend.
How TheVault does it
TheVault NGFW is built for exactly this: it installs from a USB stick onto a spare PC with two Ethernet ports, or into a virtual machine. The installer asks one question, finds your WAN port by itself, and the rest is a setup wizard in your browser that asks plain questions: intrusion prevention, DNS filtering, ad and tracker blocking and parental controls are switched on from your answers. On our own test network it goes from USB stick to protected network in under ten minutes.
It's built on Debian with the 6.12 LTS kernel and Debian's drivers, so if Debian supports your network card, TheVault will move packets through it. Will it run on my PC?
Related: block ads and trackers on every device, block DNS over HTTPS for parental controls.
Questions people ask
Can any old PC be a firewall?
Most 64-bit desktops and mini PCs from the last decade can. What matters is two Ethernet ports (add a network card if it has one), a 64-bit Intel or AMD processor, about 8 GB of RAM and an SSD. For intrusion prevention at gigabit speed, plan on 4 to 6 CPU cores.
Do I still need my Wi-Fi router?
Keep it for Wi-Fi. Set it to access point or bridge mode so it only provides Wi-Fi, and let the firewall do the routing and protection.
Does a PC firewall slow down my internet?
Not if the PC is powerful enough. Intrusion prevention is the heaviest job; a 4 to 6 core desktop CPU handles it at 1 Gbps.
Can I run the firewall in a virtual machine?
Yes, if the host gives the virtual machine two network interfaces, one for the modem side and one for your network. TheVault runs on bare metal or in a virtual machine.
A spare PC, protected network, under ten minutes
TheVault NGFW installs from a USB stick onto a PC with two Ethernet ports. One payment, updates included, 30-day refund.