I am not responsible if your devices send you back in time, explodes, implodes, bricks or flies into space from the use of any software I put up.


Monday, December 29, 2014

6 Reasons Why You Would Want 3rd Party Router Firmware Over Factory Firmware

1) Updates

The real truth is that many hardware manufacturers want to sell you new devices.
Consumers do not buy support licenses so there is no money to make from old devices.
Sooner or later they will stop updating their older range of devices and you will not get any new updates.

3rd Party firmware on the other hand keeps the source codes and continues to generate updates as long as the device is capable of supporting new features.
Bug fixes and optimization are applied across various architectures so improvements are definitive.
This ensures that your old trusty devices will never be neglected few years down the road.

2) Security

Factory firmware uses old unsupported kernels.
If you do not believe me go ahead and download the GPL Sources for your new devices, you will find their Software Development Kit uses old version of sources and libraries.
Some are still using older Linux Kernel 2.6 not patched up to the latest release.

However 3rd party firmware project often update their source and libraries to the latest versions.
In addition, 0 day vulnerabilities are quickly patched thanks to the enthusiastic developers and community contributors.
An example is the OpenSSL heartbleed vulnerabilities, in 3rd party firmware projects, the source is quickly patched when upstream patches are available immediately.

3) Customisation

Consumer routers are designed for the consumers so their features are commonly kept to the minimal, User Interface is kept simple so they will be able configure the device without in-depth networking knowledge.
As a result they are sufficiently easy to configure and deploy for common use cases, however when it comes to more complex setups they fall short.
Some factory firmware even make assumptions about configuration.

There are even firmware that assumes that the user will want to use only the ISP provided DNS hence there is no option in the User Interface to specify multiple DNS Servers of higher performance like Google DNS.

3rd party firmware are made by developers for developers and system administrators hence all the possible configurations are available and made flexible to allow users to deploy their own customised setups.

With 3rd party firmware you can create multiple VLANs and segregate networks for security and access control, the catch is you have to learn about networking technologies and how to configure them via forums from the experts. If you do not have the patience or understanding it can be a daunting task.

4) Features

Consumer routers are usually fixed in the features they offer.
They are marketed by the features marked on their boxes hence their feature set is fixed.
This is further supported by point 1, which is after a while they stop updating older devices to work on new ones so new features are almost unheard of.

With 3rd party firmware, new code is added to the source which means besides bug fixes you get new features as well.

An example is the WR1043NDv1 is a 5 year old device which did not have ipv6 feature when it was sold and the TP-Link still does not offer IPv6 capabilities now. However if you were to use 3rd Party firmware such as OpenWRT/Gargoyle/DD-WRT you can enable and use IPv6 on it.

In addition new features have been added to enable more advance features on the Router's internal switch like Port Mirroring.
This is further supported by Point 2, the ability to customize the Router like adding more esotoric software like proxy servers increase the feature set of
the device.

Did I mention the superior Quality Of Service offered by 3rd Party firmware to counter bufferbloat and latency when the FQ_CODEL was developed by the OpenSource community and integrated back into the project?

5) Freedom

Basically point 3 and 4 adds to the freedom you get with 3rd party firmware.
Want to setup a wireless mesh network?
Totally impossible to do with most factory firmware but totally doable with 3rd party firmware.

Setup in Wireless Access Point Mode with a Web Interface Authentication using a Radius Server?
Almost impossible to do with most factory firmware but totally doable with 3rd party firmware.

Want to host your own website on your Router to save power?
Totally impossible to do with most factory firmware but totally doable with 3rd party firmware.

With 3rd party firmware you are free to repurpose your Router to your own needs limited only by your imagination and knowledge.

6) Free

With the advantages of point 1 to point 5 the most compelling reason why you should go for 3rd party firmware is that you can get all this and more for free!
The developers share and improve their work for the community and you can be a part of it!

Monday, December 22, 2014

Overclocking TP-Link WDR4300

I know a lot people have been asking about overclocking the AR9344 MIPS74Kc.
An OpenWRT forumer pepe2k (his blog www.tech-blog.pl) created a Firmware Recovery uboot here (if you like his work please donate).
From my experience with the AR9344 SoC I know that maximum possible clockspeed for AR9344 varies a lot.
I have a unit which can do a maximum of 700MHZ and another unit which can do a maximum of 740MHZ, so for this share I only shared a bootloader copy clocked at 600MHZ, if you want to try higher value you have to built the bootloader yourself.
The reason why I chose 600MHZ is because a Mikrotik Router using the same AR9344 is also clocked at 600MHZ CPU 400MHZ RAM and 200MHZ AHB so it should be safe.

Another issue is that some AR9344 routers come with low grade RAM as a result when you perform memtester, a utility that read & write bit patterns to RAM, to detect RAM errors it will fail. The default RAM clock is 450MHZ but it seems to be too high for certain brands of RAM.

A solution to this is to decrease the RAM frequency of 400MHZ.

I have build a special openwrt image to unlock write access to uboot so you can write the uboot image to the uboot partition.
Please remember to flash the normal image after you are done to write-protect the uboot from any accidental writes.

I have 2 images for download here
  1. Uboot with 600MHZ Overclock 450MHZ RAM 225MHZ AHB for routers without low grade RAM
  2. Uboot with 600MHZ Overclock 400MHZ RAM 200MHZ AHB for routers without low grade RAM as a fix to units with memtest errors
Instruction on how to reflash the uboot on your Router here
If you do not feel confident please do not attempt it.

As for how to test for RAM error:
  1. Connect your Router to Internet
  2. ssh into the router
  3. opkg update
  4. opkg install memtester
  5. memtester 32M (to test 32MB of memory)
Good luck!

After you flash the bootloader there will be a failsafe page where you can upload Atheros Radio Test (ART) Partitions, Firmware Image and bootloader if you press and hold the reset button after 4 light flashes from power on.

Thursday, December 18, 2014

TP-Link Recovery Mode for WR1043ND

Did I ever mentioned that my overclocked bootloader has TP-Link's new built in tftp recovery mechanism?
Do know know if you ever flashed my overclocked bootloader successfully and later "brick" it by flashing new OpenWRT images wrongly there is a 100% chance of recovery?

Simply said I created the overclocked firmware mods by detecting the bit responsible for flipping up the PLL, modifying the bit and correcting the checksum so the new TP-Link uboot tftp recovery mechanism still works.

In fact I use it to test all the firmware I built ALL THE TIME because I am simply too lazy to open up the router and connect the serial pins.

So how do you do it?
  1. Turn off all firewall
  2. Get a tftp server software, in Windows I use tftpd32 in Linux I use dnsmasq
  3. Copy a factory firmware (without the uboot) into the tftp directory change the filename to wr1043nv1_tp_recovery.bin
  4. To activate the recovery mode hold the reset button immediately when it powers on before it boots into linux, you will flashing lights.
  5. This emergency mode listens for the IP Address so you can set static ip mode on your PC running the tftp software
  6. After that if the router detects the tftp server it will attempt to grab to grab the file wr1043nv1_tp_recovery.bin from the tftp server at
  7. Then it will begin flashing itself you just need to grab a cup of coffee while it reboots after flashing
In fact all new TP-Link firmware with bootloaders now come with recovery modes listening at different address. You can refer to this useful forum thread by a uboot expert pepe2k.

Friday, November 28, 2014

OpenWRT Barrier Breaker December Release 2014

Yet another Edit:
The performance regression on Barrier Breaker has been solved.
This was due to removal of the Routing Cache in the Linux Kernel.
The routing cache has been added back as a patch and I have included it in the December Release.
Please refer to the new results below for more information.

The issue has been resolved, the bug only occurs in Kernel Version 3.10.61, it does not happen on 3.10.60 so I reverted the December release to 3.10.60.
All my December Release has been updated and I have tested no latency issues. Fix will be final.

Released Tweaked OpenWRT Barrier Breaker for December
Patch Build Scripts available for
Download Links
(Factory for conversion from factory to OpenWRT)
(Sysupgrade from OpenWRT to newer OpenWRT)
Performance Baseline
Wifi Test conducted with a 2 Stream Wireless Client Adapter (300Mbps) using WPA2-Personal with AES Encryption
OpenWRT does not have hardware NAT capabilities at time of writing.
The WDR4300v1 Tested is Overclocked @ 740MHZ Stable, original units are Clocked at 560MHZ
The WR1043NDv1 tested is Overclocked @ 430MHZ Stable, original units are Clocked at 400MHZ






Now the most amazing result! 

Lower WiFi performance is due to MIPS24K lower performance in AES encryption

Lower WiFi performance is due to MIPS24K lower performance in AES encryption



Change Summary:
-Added QCA Patches from their SDK
-Use Fast Math for hostapd-wpad
-Update to latest Kernel for 3.10 branch to 3.10.61
-Rename Repository to processor arch instead of Router Model
-Add additional CFLAGS
-Switch AutoLoad to AutoProbe
-Increase Kernel HZ from 100 to 250HZ like CeroWRT
-Enabled Routing Cache for performance

For exact changes please refer to the github source repository.

Sunday, November 23, 2014

Post your request for December Release

Currently the Barrier Breaker build is proceeding smoothly.
I integrated a few performance enhancement patches from QCA Upstream SDK.
Switched the Kernel Modules to AutoProbe loading and enable faster math routine for hostapd.
Changed the Kernel Clock to 250HZ instead of 100HZ.
All the changes are shown on my Github.

So the question is what additional programs do you guys want precompiled with the same optimization build?
I will not be building the modules into the kernel images as I want to leave free space for people to customize their own configuration.

For you guys who want certain programs I will add them as module and which you can manually download from my github repository.

Leave a post below if you want anything.

Saturday, October 4, 2014

Barrier Breaker Release

OpenWRT Barrier Breaker has been released.
I have also uploaded the binaries on github under October Builds.
The new binaries are created by using my new patch builds
Previously I mentioned of using a new way to maintain my own patches and optimizations.
The repositories are here:

For Barrier Breaker WDR36XX/43XX
For Barrier Breaker WR1043ND

With this patches you can create your own builds easily.
Changes are clearly documented in the patch folder with each change written in the patch.
  1. mips16 is fully disabled as from my testing it doesn't seem to help in code compression and introduce execution overhead
  2. Add 24kc/74kc mtune flags to the respective router architecture
  3. Skip Certificate Checks on wget
  4. Renaming of LuCI pages
  5. Fix and unbrick LuCI OpenVPN packages and pages
  6. Add additional LuCI Switch features
  7. Add more LuCI Wifi Configs
  8. Sysctl default optimizations
  9. Remove PPPoA completely as it is only applicable for xDSL Devices
  10. Modify UPnP broadcast model names
  11. Unbrick L7-protocols
  12. Add some optimization I found in Lantiq SDKs
  13. OverClock Ralink RT3052 SoC to 433MHZ tested stable
  14. Change muti-wan pages 
  15. Unlock Wireless Regulatory
  16. Change Linux kernel config
  17. Use latest Kernel, Binutils and GCC
  18. Reduce ZRAM size
  19. Remove whatever unnecessary debug
  20. Fix bootstrap theme for mobile devices
  21. Disable firewall mss by default to increase NAT performance
  22. Disable unnecessary start ups by default
  23. Add additional function for realtek switch RTL8366RB
  24. Minify and Compress CSS and Javascript using yuicompressor and closure .
Upstream changes that breaks the patches are displayed during build process
Patches automate the compilation with the new patches I can build OpenWRT firmware for a particular Router under an hour assuming the sources have already been downloaded.
Porting to different branches like trunk is a breeze.
Consistency in the builds is assured.
Read the README in the repository for more information.

I made a lot of changes in the new builds
A lot of packages deemed unnecessary and big are removed.
If you want them you can download them as ipkgs and install it to the router.
Reason is most people do not solder 16MB flash on their router.
Giving them the flexibility to specialize their purpose is better.

If you are upgrading from older release it might be a good idea to try to reconfigure from scratch if your own config does not work. Then port the settings over.

As for benchmark of Barrier Breaker using my binaries on my Overclock@430MHZ WR1043ND.



Wireless Performance Close Range No Encryption 2.4GHZ Band 40MHZ Force HT ( Fat Channel)

Wireless Performance Close Range WPA2-PSK 2.4GHZ Band 40MHZ Force HT (Fat Channel)

Some packages in my Repository might not be present in the official Barrier Breaker repo like LuCI OpenVPN which I unbroke in my Patches.
In that case download the individual ipkgs upload to your Router and install them.

Friday, October 3, 2014

Multi-Platform Portable TrueCrypt

Source for generating ISO shared here

This post about my latest creation, a portable multi-platform TrueCrypt that you can install on any generic cheap flashdrive.

Flashdrives controllers are actually programmable devices and manufacturer tools can enable special modes that can enumerate other devices like CD-ROMs.

This is very useful when we want to enable the same filesystem to deliver multi-platform binaries.
For people who value privacy and protection but do not have the money or means to buy secure encrypted flashdrives this article is very useful.

A show case of what it can do:

On Linux

It is enumerated as a Virtual CD-ROM Drive:

Double Click on TrueCrypt.sh


It launches TrueCrypt. Works for 32bit and 64bit Linux

On Windows

It appears as a CD-ROM Drive

Double Click on it to launch TrueCrypt.
And TrueCrypt launches...Works for 32bit and 64bit Windows

On Mac

Just Double Click on TrueCrypt.app

I don't have a screenshot because I don't care to own a Mac but I included it anyway for it to be truly multi-platform.

How to Obtain the Virtual CD-ROM Partition

Different FlashDrives use different controllers.

To obtain information about your FlashDrive use ChipEasy or ChipGenius.


As you can see my FlashDrive uses a Phison Controller.
The tool to enable addition modes in Phison Controller is called ModeConverterFF01.
For more information about different controllers and their manufacturers please visit

Google Translate is your good friend.
I will not be including the manufacturer tools because they are not OpenSource Freeware.
Be careful when downloading files from China Sites, malware advertisements abound!


How to use ModeConverterFF01


As you can see it is very simple, select 2 partitions and and choose the TrueCrypt.iso image and click Convert.
Make sure the size allocated is more than 26MB which is the size of the ISO Image.

Where to get the ISO File

Download it here from my github.

Why TrueCrypt rocks?

Regardless of the real reason why it was discontinue it is still useful because
It has been code audited but make sure the version is 7.1a.
This ISO I created is based on TrueCrypt 7.1a.
It can create encrypted File Containers and Volumes and Fake Volumes to confuse people who wants to look at your files.
It is portable as shown in this entry.

How to use TrueCrypt?

Please Google, there are 101 articles online to teach you.
There is also a guide included in the ISO FS.

Monday, September 8, 2014

Enable OpenVPN Tunnel on OpenWrt

This post is about how to enable OpenVPN on OpenWrt Barrier Breaker.
First we need to install openvpn-openssl
opkg update
opkg install openvpn-openssl
Next we will be using the provided ovpn file instead of OpenWRT config.
It is actually the same thing because OpenWrt converts the config file to a file readable by openvpn but using a vendor provided config is more convenient and less error prone.

In this example we have 3 files
  1. The ovpn file provided by your VPN Provider (Netherlands.ovpn)
  2. Password File (Password.txt)
  3. Certificate File (TrustedRoot.pem)
 Lets take a look at the ovpn file
dev tun
proto udp
cipher AES-128-CBC
resolv-retry infinite
ca TrustedRoot.pem
verb 3
auth-user-pass Password.txt
reneg-sec 0

Note that ca refers to the certificate file indicated by TrustedRoot.pem
And auth-user-pass refer to the password file.
If your VPN provider uses TLS you need to provide cert and key.
cert my-server.crt
key my-server.key
For this example it is just username and password
The password file looks like this:
Thats it.

So we upload all 3 files to /etc/openvpn

To start OpenVPN type the below and enter
openvpn --cd /etc/openvpn --daemon --config /etc/openvpn/Netherlands.conf
You should see this in syslog
Sun Sep  7 17:41:35 2014 daemon.notice openvpn[2284]: Initialization Sequence Completed
Next in LuCI

Add a new Interface in this example I call it "hide"

Physical Interface is set to "tun0"
Protocol is "unmanaged"

 Firewall is set to "wan" To make OpenVPN start persistently on boot add this to LuCI startup

That is all! You should be able to see transmit and receive packets on the tun0 interface indicating that it is working.

If you go to http://www.whatismyip.com/ it should tell you that you have another ip of another country origin.