installing openwrt as a wireless repeater
10 Jun 2014
I love how technology fix complicated problems with little effort. Back at home during the last weekend besides having lots of compliments, hugs, and great food was also the perfect time to fix technological problems (as the official techie of the family). I recovered from trash an old netbook, fixed the power button of a mini component, replaced lightbulbs and setup a wireless repeater. Since the last activity was interesting I decided to wrap it up in a post ☺
My parents house isn’t really big, but even with its current size the wifi signal doesn’t cover some parts of it, ISP routers are getting worst year after year and recent models cover a minimal extension, so I decided to buy a repeater and setup everything as fast as possible. I got a TP-Link N750, formally a TL-WDR4300 Version 1.7 for $60, ate some noddles and got back to home. I didn’t even repared in the fact that the device wasn’t suppose to act as a repeater, I was just looking for any dual-band router with nice antennas, so when I looked at this I just bought it.
Later on, when I actually read the manual and realized it wasn’t going to be as easy as I though I promptly replaced the original firmware with openwrt, the process wasn’t really dificult but still I though in creating a mini tutoral for my future me. It all starts with downloading the latest openwrt trunk build binary (I read somewhere there are problems with the stable version with my router):
$ wget downloads.openwrt.org/snapshots/trunk/ar71xx/generic/openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-factory.bin
Or, when there is a previous openwrt version already installed:
$ wget downloads.openwrt.org/snapshots/trunk/ar71xx/generic/openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-sysupgrade.bin
After completing the download, it can be installed by going to the “Firmware Upgrade” menu of the Link web interface and selecting the openwrt firmware.
The trunk build is quite raw, it doesn’t install the classic web interface, so it’s up to every person to decide if they want it or not, in my case I decided to install it because my sister, who lives with my parents, will manage the system and she doesn’t like cli interfaces.
To install the additional software I connected to the device and changed temporally the network (so the router could have access to internet).
$ sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE #share temporally my laptop wireless connection $ echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward $ telnet 192.168.1.1 #type "passwd" to set the root passwd $ ssh email@example.com #from other terminal window openwrt # ifconfig br-lan 10.9.8.7 $ while true; do sudo ifconfig eth0 10.9.8.10; sleep 1; done #bypass networkmanager $ ssh firstname.lastname@example.org openwrt # route add default gw 10.9.8.10 openwrt # echo "nameserver 18.104.22.168" > /etc/resolv.conf openwrt # opkg update openwrt # opkg install luci relayd openwrt # /etc/init.d/uhttpd enable openwrt # /etc/init.d/uhttpd start openwrt # /etc/init.d/relayd enable openwrt # /etc/init.d/relayd start
After completing the installation phase, I went to the web interface, http://10.9.8.7, created a root password and reconfigured the LAN interface to make permanent the lan ip changes:
- Network ▷ Interfaces ▷ LAN
Afterwards, I created a bridge interface (to bond the lan and wwan interfaces)
Then I joined our local network (linked to the bridge/wwan interface)
- Network ▷ Wifi ▷ Scan
And finally created an AP (linked to the lan interface)
- Network ▷ Wifi ▷ Add
That’s it!, a simple and robust wifi extender, happy repeating ✌