Buying a new openwrt-compatible router. Howto

I need a new router, because the time machine I have been using for so long is finally giving up. It was a pretty strong machine. God bless her soul. Now I'd like to have something like this as a router:
solid run But that's pricey and needlessly powerful, it costs extra to add wifi, box, power and so on.


Since I found out OpenWRT exists I have continuously rooted my routers. OpenWrt is minimalistic linux made especially for routers. I don't like the fact that it's not a full-fledged linux - they had to minimize the footprint and some packages are incomplete/different. But it does its jobs perfectly.

There is a hardware compatibility list which now features devices with 1gb ram and 4gb flash. Unfortunately they either have no wifi, or not enough lan ports. Even the Bulgarian producer Olimex is featured close to the top.

Starting from top to bottom, here's how I chose my router:
(I skip all that have no wifi)

  • 256/1024/Gateworks Ventana GW5xxx/only two GbE ports;hard to buy
  • 16/128/EnGenius ECB1750/no GbE
  • 16/128/Belkin F9K1115/hard to buy
  • 32/128/WZR-HP-AG300H/no ac
  • 32/128/Meraki Z1/no ac
  • 16/128/EnGenius ECB1750/no GbE

Possibilities (all of them are available in local shops):
(all of them support some type of ac on 5Ghz)

  • 128/512/Linksys WRT1900AC/€235
  • 128/128/Cisco-Linksys EA6300/€106
  • 128/256/Buffalo WZR-600DHP2-EU/€100
  • 128/128/Netgear R6100/€100
  • 16/128/ZyXEL NBG6616/€85
  • 16/128/TP-LINK Archer C7/€98
  • 16/128/TP-LINK Archer C5/€75
  • 16/128/D-Link DIR-860L/€53

In the table I didn't put CPU type and whether they have USB 2/3 ports.

USB over IP - connect directly to a remote usb device

Problem1: My printer's scanner does not work over the wire with OSX. So the scanner part works by cable only. Well what if I put the usb cable over the wi-fi? Well, now I have a wireless scanner.

Problem2: I have a remote backup drive that I want to keep bootable and encrypted. Was it possible before this? I couldn't make it work. Is it possible now? I think so.

VirtualHere is a commercial software. For free it allows one simultaneous device, if you disconnect the first, you can use the second. It works flawlessly.

Its server has builds for most linuxes plus OpenWrt. The client is very simple, builds for osx, win, linux.

There are FOSS alternatives. If anyone has tried them, please share some info.

OpenWRT: installing a bit-torrent with web interface

1 Install tranmission

opkg update
opkg install transmission-cli transmission-daemon transmission-web

2 configuration

don't use /etc/config/transmission - it is not read by the service starter. Actually, don't use /etc/init.d/transmission start - it doesn't work for some reason - I'm too lazy to use it.

What I did is:

transmission-daemon -d >> settings.json

which doesn't work also for some reason, so copy the config info and save to settings.json or edit /root/.config/transmission-daemon/settings.json directly

3. changes to settings.json

"download-dir": "/home/ftp_user/storage/",
"rpc-authentication-required": true,
"rpc-enabled": true,
"rpc-password": "pass",
"rpc-url": "/transmission/",
"rpc-username": "user",
"rpc-whitelist-enabled": false,

4 start

if you saved a local copy of settings.json

transmission-daemon -g .

if you changed /root/.config/transmissio-daemon/settings.json


OpenWRT: usb flash or usb disk as a storage device in OpenWrt

1. Find the plugged in USB device


to see plugged in devices.

2 Partitions

install and use cfdisk to partion the USB.

3. GPT

gdisk not implemented on OpenWRT, so if the disk is GPT, then create an empty partition and it can be formatted with mkfs.ext4.

Then to recognize which partition is which (recognize them by size), use

cat /proc/partitions

 4. ext4

Install e2fsprogs, so that you can use mkfs.ext4.

mkfs.ext4 /dev/sdb5

5. fstab

Edit /etc/config/fstab

config 'mount'
	option	target	'/mnt/sda1'
	option	device	'/home/ftp_user/8GB'
	option	enabled	'0'
config 'mount'
	option  target  '/home/ftp_user/storage'
	option  device  '/dev/sdb5'
	option  enable  '0'

OpenWRT: ftp installation and configuration (vsftpd)

1 open holes in the firewall

Use OpenWRT's web interface (luci): open tcp:20 and tcp:21 for plain old unencrypted ftp.

2 install vsftpd

opkg update
opkg install vsftpd

3 create the ftp directory

mkdir -p /home/ftp_user/storage
chown ftp_user /home/ftp_user/storage

Note: Don't chown the ftp_user dir, because later we will jail the user.

4 add the user to the system

Add a user by editing /etc/passwd, useradd doesn't add a shell, so don't use it.

"/bin/false" - no ssh login possible



passwd ftp_user

to change the password of that user

5 configure vsftpd

Config, add these to /etc/vsftpd.conf, so the anon user points to the right location


6 jail the user


7 start and enable

to start and make it autostart at boot:

/etc/init.d/vsftpd start
/etc/init.d/vsftpd enable

Basically OpenWRT has issues in terms of scripts and commands, but it's amazing how many things are already implemented.

Home servers - good at first, but have to go

For quite sometime I've been hosting some stuff at home. It's quite simple - a second hand small-form-factor machine from Compaq, home internet and a router/switch.

Compaq machines are were small and very very quite, they just don't break at all. The first machine that I used for hosting had 7 (seven!) fans some of which we very noisy. No keyboard and no monitor. A small ups and it's good to go.

Hosting stuff at home is extremely cheap - internet that would have been bought anyway. The machines are also very cheap - my blog was running on a Pentium III, 800 Mhz and the machine was running Windows Server 2003 with the blog being .NET application. It's a little load on the electricity bill but that's hardly a show stopper.

A good wi-fi router would do the job of connecting all machines and provide internet for everything in the house. Most new routers have enough juice to support a linux - I've mentioned OpenWRT. If one wants to go crazy one would move a *nix machine in front of the router (two ethernet cards needed), because the router could easily go down.

At first it's very interesting. There are different OSes to configure, building an internal dns, dhcp, port forwards, certificates, sharing. There are a lot of things to learn.

But at some point all this becomes cumbersome - different OSes to configure, building an internal dns, dhcp, port forwards, certificates, sharing. Every single thing takes so much time and so much effort. And the bad thing is that this is a hobby, I'm not a systems administrator.

When I wanted to learn something new there was always twice the effort - once for administration (installing, configuring...), twice for the thing itself. Having stuff hosted somewhere else one does not care about all that. Just click install, or ftp and copy and that's it.

Sometime ago I decided to put a stop to all that. Hosting is so cheap now and the most valued thing (this blog) was the first to go to some distant server. It took me a couple of days but it worked. The old and frankly very stupid personal site I had got killed - after all simplifying is good right?

I've had so many computers, at some point I've owned 4 to 5 machines. I don't think that's necessary. I intend to get rid of all of them and have a nice 802.11 N router with an optical internet and ups.

So it was fun and I learned a lot but it has to end.


Most wireless routers these days have web interfaces can share USB hard drives, have firewalls and so on.

OpenWrt is an open-source firmware that can be installed on such routers. It started thanks to Linksys using GPL software on it’s WRT54G router and had to release the source. This was the base for the project.

OpenWrt is a minimized linux based on the Busybox distribution that can run on the limited hardware of the devices. Thus the devices become a lot more flexible – ssh, telnet, portforwarding, iptables, firewall and so on.

The current version of OpenWrt is 8.09.01, code-named Kamikaze. They use cocktail names for code-names, the last one was called White Russian.

Another project, x-wrt, uses OpenWrt as a base and creates an elaborate web interface, called webif2, that allows the configuration of router via a web interface for users not familiar with linux. x-wrt uses the same version numbers when they bundle their web interface with OpenWrt.

I’ve used x-wrt 7.09 with webif (version 1) which had it’s glitches. Now I’m using OpenWrt 8.09 that provides its own web interface (quite good really). I haven’t tried webif2. But if I do, I’ll try to write something about it.

What about routers?

The starting point is the table of harware section in OpenWrt’s wiki. For every major manifacturer they have a wiki page with info whether they support the router and how good they support it. My router for example is supported fully with OpenWrt based on linux kernel 2.4. They don’t support the wireless (some binary driver issue) with kernel 2.6. So I’m using the latest version of OpenWrt, but with an older kernel.

Some routers have USB ports which can be used for harddrives, flash memories, usb cameras. For my router they have a manual for live streaming from a web camera. USB harddrives can be shared via ftp, samba…. (it’s a linux box after all).

The pro’s of these machines is that they’re cheap, very powerful, and very quiet.

The con’s come from limited memory (can be extended with a flash), lack of all linux commands and options (busybox).