TVUnblock IP update script for OpenWRT

Yesterday I discovered the free service and was suprised how easy it is to use. Configuring my OpenWRT router to get access to US Netflix content only took me about 5 minutes. Being a free service, TVUnblock requires users to register their IP with them to unlock the unblocking functionality. For internet connections with dynamic IP adresses, this means that you have to regularly re-register your IP address, else you’re back to the local program, or none at all if you use it for services that aren’t available outside the US.

To automate this process, I have written a small IP update script:

Installation on OpenWRT

Before installing the script, make sure that the DNS is configured and the unblocking service is working correctly.

To get this script to work on OpenWRT, copy it to a directory on the router. In this example, we copy it to /root/, and add execution rights by issuing chmod +x We then tell cron to run the script every 10 minutes by adding the following line to etc/crontabs/root, or through LuCI in System > Schedules Tasks: */10 * * * * /root/ Restart cron (System > Startup > cron > Restart) afterwards. That’s it!