OpenWrt on old i7 PC?

I apologize if this has been asked before. I checked the similar topics but couldn't quite find anything which would help me elucidate what I'm attempting to do.

I have an old 4th gen i7 that I'm not really using much, only as file storage and very rarely compiling software I can't find on Debian's repo. I'm considering extending its workload to also router/routing tasks since it's barely ever using any CPU power or RAM capacity and because I may get half-a-gig speeds soon and my current router may not be very good at routing that much with SQM enabled. But, how would I go about it?

How things currently work:

| Cable Modem | --> | OpenWRT router (dual core ARM, 512mb RAM) | --> | LAN (storage PC, Android devices, laptops, etc |

How I'd like things to work:

| Cable Modem | --> | Storage PC (Openwrt x86-64, i7 4790k, 16gb RAM) | --> LAN (storage PC, Android devices, laptops, etc |

Would it be best to run OpenWRT directly on the hardware and just add the services I need for file transfer and such from opkg? I'd prefer running it on a VM on top of Debian, if possible. I'd split the RAM evenly and let the VM have full access to processor resources as it requires.
I'd also need the PC to both serve internet connection to clients connected to it and serve internet to itself.
This would require an extra NIC with at least 2 ports, right? perhaps a wireless card? or I could always use my current router as a "dumb AP" if it's easier.

Thanks for your time, hopefully I made myself clear. If not, feel free to inquire further.


yes, a(n old) pc can be used to run openwrt. you need to consider followings:

  • if you want internet 24/7 and use a pc will power consumption bother you? there is direct cost implication and it is not eco friendly,
  • running directly owrt on a pc will give best performance, and owrt provides you many functions and services beyond routing but it is not a full blown linux distro
  • not being a full distro means means you may find application limitations (though e.g. samba as SMB server exists), or find hardware limitations (e.g. video card support is very basic, so using as Plex transcoder may not work as you expect)
  • not being a full distro it means system and package upgrade has its own limitations, you will not able to use e.g. apt upgrade
  • you can also run owrt virtualized but obviously it has performance penalty, some folks use ESXi or other to host owrt, and attach server's network card to owrt to act as the main router. which approach has one tiny problem: if you need to patch the host from internet you will not have internet access while host is not running or owrt guest is not running
  • owrt acts as router so at least two nic ports is a convenient setup,, one for wan facing to public internet, one for lan.
  • if you want your pc to connect directly to internet and other clients via owrt via same internet access that will raise problems, technical and security.
  • if you use a pc personally i would not use it as wireless ap, wifi cards are tend to work as STA but not really as AP, better if you use pc owrt as router and plastic AP as so called "dumb AP" for wifi

and a list can go on and on ... :slight_smile:

but it is not a bad idea to use pc imho, good luck.


I suppose there are no workarounds since the VM has to run at some point and it can't be sooner than the host OS itself. I had not taken this into consideration. Very informative, thank you.

To sum up, it is very bad in practice, and very good in theory. Main router should be implemented on router itself. If you need more power, just use mini-pc like NanoPi R4S.

I understand. Rockchip is still ARM, though. If I remain using SoCs, whichever they may be, will they be able to route 500 mbps up/down with SQM? the main reason why I'm looking to size up a little is because I feel these SoC/mobile CPUs won't be able to do that kind of work.

This a point worth repeating IMHO, especially older PCs can daw a lot of power even when idling, while dedicated (often celeron/atom) devices that often come with multiple NICs can be surprisingly frugal for the processing performance they offer.
So yes, especially for fast internet links x86 is a decent option, but "old PCs" often are not necessarily the x86 solution for 24/7...
That said, I had an oldish XEON running as local server 24/7 until I measured its consumption (~50Watts on average, so when ide) after which I turn this thing on when I need it and off afterwards (that little gain in convenience of being able to reach it at all time from remote locations, is not worth wasting 50Watts most of the time... more modern more dedicated x85 solutions can idle at well below 10Watt, same as many older all in one routers).... but I digress.

Same problem here. Just got gigabit cable (50mbps up) and would like to wireguard the whole pipeline.

Old PC's use too much power.

Other options for gbps SQM/wireguard are:

N5105 mini PC $250-300, 22.03.3, 10-15 watts

R6S has fork, no snapshot, WIP $250, 5-7 watts

BPI-R3 exciting WIP, snapshot $200, 5-10 watts?

Rpi4, overpriced IMO $250

Van tech corner on YouTube did lots of nice testing videos on mini RPI r2s, r4s, r5s, (and r6s, N5105) you might like. They are cheaper and can handle 500mbps up down w/ SQM.

I am going to wait things out as my C7 v2 gets 700-800mbps average on v21.02.5 (no SQM or wg).

I can attach a few slower wireguard routers off of it and get 50-200mbps per device which is good enough for now.

I only have 1 laptop that can do 1 gbps so I don't need to splash out the cash right away. Wireguard runs on that laptop at 800mbps.

Few servers online will give you a gbps anyways - mostly 40-200mbps.

Sorry for the novel. I'm waiting for the dust to settle on the new devices.

In general this is not a problem, virtualized firewall is quite common nowadays.
Patching host won't be affected, it downloads all updates before it make changes, why would an offline router causing problem? Unless your host update is breaking the OS itself, I have been running my router inside Synology NAS virtual machine for more than a year and it's never a problem, of course you need a backup anyway to prevent outage (even I have bare metal router, I also have another cheap one just in case).

ARM itself is not a problem, Apple M1 is also ARM processor but it does running faster than a lot of x86 processors, it depends on the generations and how it is designed. In general R4S using RK3399 which is proven to be running very fast, CAKE SQM there's already test showing it can do 1Gbps without problem. The R6S is even faster but since it's not in mainline yet so no official support currently.

1 Like

Current price for a 1GB ram raspberry pi4B kit (with case, power supply, SD-card) seems to be 95EUR, even if you add a second USB3 gigabit ethernet dongle, a managed switch:
raspberry 4B kit: 95.00 EUR
tp-link ue300: 22.90 EUR
e.g. Netgear GS308E 8-Port: 35.10 EUR
95+22.9+35.1 = 153 EUR -> ~$168

So the price is IMHO not that bad even if you throw in an additional 40EUR for a low cost OpenWrt router to act as AP* (although it used to be considerably lower before 2020...) the bigger challenges IMHO are:
a) availability (currently the 1GB model is hard to source, raspberry pi400s seem to be easier to come by, albeit a bit more expensive)
b) clutter, not everybody appreciates splitting functionality over multiple individual components
c) unease about USB3 ethernet, while working OK for some users, others report mixed experience with USB dongles...

So yes, for going the wired-ARM router path, raspberry pi4Bs are not ideal, as there are cheaper more complete** but similarly powerful arm SBCs available. However, if one has a pi4B sitting around doing nothing/little converting it to a gigabit capable OpenWrt router is not a terrible idea either.

*) This might also allow you to get rid of the managed switch and use the OpenWrt router's configurable switch instead...

**) A raspberry Raspberry Pi CM4 (Compute Module 4), plus a dfrobot Router Carrier Board Mini get you a raspberry 4B-based dual ethernet wired-only router, but that still leaves this rather expensive and currently hard to source.

Just sell the RPi4 and get a NanoPi R4S or Banana B-Pi series.....

I'm in the x86 camp myself (apu2e4 is my main router). I just ran some tests on my N5105 4xI226 2.5Gbe box running SNAPSHOT bare metal, and observed the following power numbers:

  1. Idle ~8.9w with active WAN + one sleeping LAN connection (this number is typical, I look at it many times every day).
  2. Woke LAN workstation, 9.1w.
  3. Started htop on router, power jumped to ~9.5-9.6 w.
  4. Started test and saw ~14.0-14.4 w during download.
  5. Dropped to ~10.5-11.0 w during upload phase.
  6. When bufferbloat test ended (A+, of course) power dropped back to 9.5.
  7. htop shows load "0.0" the whole time, so bufferbloat traffic isn't stressing things at all.
  8. Kill htop, power back at 9.1.

The box is one of the CWWK "v5" (I think, minimal case, no fan), cost US$140 + $13 shipping (took a month from CN to US). The box is new, so I splurged on new internals rather than going the junk pile for parts: WD 550 SSD was $37 (250GB so MASSIVE overkill for OpenWrt), Crucial 8GB 3200CL22 SODIMM stick $28 (again massive overkill), total $218. Could get that down a bit by using a salvaged -- or buying a much smaller -- SSD, and scavenging a RAM stick from an old laptop or whatever.


Well, if you happen to be unhappy with that raspberry, then selling it seems like a decent proposal, as long as the prices are still elevated. Personally I would keep it though, there are things possible with a raspberry that are much harder with competing SBCs (unless using compatible extension connectors).

I already have my Pi4 integrating into PiKVM.