Dynamic DNS with Cloudflare and Tomato Firmware

How to set up Dynamic DNS with free Cloudflare DNS service using Tomato Firmware

  1. Login to Cloudflare:
  2. Go to DNS Settings under your domain and add an “A” DNS entry for Dynamic DNS (ddns used in this example)
  3. Get your API key from https://www.cloudflare.com/my-account
  4. Example Curl code to test if its working (Optional)

    curl https://www.cloudflare.com/api_json.html \
    -d 'a=rec_edit' \
    -d 'tkn=YOUR_API_KEY_HERE' \
    -d 'id=YOUR_DNS_ENTRY_ID' \
    -d 'email=YOUR_CLOUDFLARE_EMAIL' \
    -d 'type=A' \
    -d 'content=' \
    -d 'service_mode=0' \
    -d 'ttl=1'
  5. Get DNS entry ID – requires your API key, domain, and email address. Make sure you replace the parameters with your own.

    (Note – Open URL in a different browser, otherwise you’ll get errors):

  6. Search the page for “ddns”, or whatever you named your dns entry. Make sure your copy the {“rec_id”: that is at the top of the block.
  7. Test updating the IP in your browser. Look for success at the bottom.
  8. Refresh your domain’s DNS entries page to see if the IP became
  9. Copy and paste your modified URL from step 6 into Tomato
    Make sure to replace with @IP in the URL
  10. Refresh your domain’s DNS entries page again to verify that the IP has been set.
  11. That’s it :)
  12. Additional Info:

1 Click Replace Notepad with Notepad++ Windows 7/8/8.1 Batch Script

Just a quick tip to replace the basic Windows Notepad with the much handier Notepad++


If you don’t have Notepad++ already, you can download it here.

No file ownership changes, replacements or backups necessary, just a quick registry fix and command line trick.


Replace Notepad++ Batch Script


  1. Run the notepad++replace.bat as Administrator.
  2. Open “notepad” using the Run command and see if Notepad++ starts.
  3. Tell the world about it :P

Compatible with 32bit and 64bit editions of Windows 7, 8, and 8.1 (including Update 1).

Original and further info at Grahame Scott-Douglas‘ blog.

Moving my scripts over to Github

A mini news flash here, I’ve created a Github account that will be hosting all my scripts.

The first to be moved over is my automated PPTP setup script, now called ezpptp.

The LNMP (Nginx, PHP, MySQL) script has been depreciated in favor of Xeoncross’s lowendscript that I’ve contributed some patches to.

My OpenVPN setup script will soon be joining the other bunch in the near future.

Hopefully with the scripts now being hosted on Github, I’ll see some patches and commits to make them even better :D

OpenVPN Debian/Ubuntu Setup Script for OpenVZ

An new awesomer script is now available! Check it out!

I have edited a script (credits below as well as a CentOS/RHEL version) for automated OpenVPN setup. OpenVPN server on your OpenVZ VPS can be set up in under a couple of minutes. Port forwarding, client config, key archiving, and config setup is all done for you. Note that setting the port to 53 can be used to bypass captive portals as an alternative to using iodine. Feedback is appreciated.

Make sure that your VPS has it’s TUN/TAP modules enabled by your provider first. To verify it is working, enter the command below:

cat /dev/net/tun

If you receive this message, your TUN/TAP device is ready for use:

cat: /dev/net/tun: File descriptor in bad state

If you receive this message, contact your provider for assistance:

cat: /dev/net/tun: No such file or directory

To install the script, copy and paste this into your SSH client of choice:

wget http://www.putdispenserhere.com/wp-content/uploads/openvpninstall.sh
chmod +x openvpninstall.sh

Continue reading

Rebuild Icon Cache Guide

1. Close any My Computer windows. This command will kill explorer.

2. Open the Start Menu, and type cmd in the search box and press enter (make sure you run as Administrator if you have UAC on).

3. In the command prompt, Copy and Paste the commands below:

For Windows Vista/2008/7/2008R2:

TASKKILL /IM explorer.exe /F
DEL /A:H IconCache.db

For Windows NT/2000/XP/2003/2003R2:

TASKKILL /IM explorer.exe /F
CD /d %USERPROFILE%\Local Settings\Application Data
DEL /A:H IconCache.db

4. The IconCache.db file has now been rebuilt.

Bypassing Captive Portals/Airport Pay Restrictions with Iodine on a Debian VPS Guide

This guide is intended for those who want to set up a Iodine on a Debian or Ubuntu VPS. Lots of time has been spent through trial and error trying to figure it out. Insight and portions of this guide have been taken http://code.kryo.se/iodine/.

Server Setup:

1. Run one of the following scripts on your server below.
SSH into your server/VPS and run one of the below scripts:

1a. Ubuntu only installation!

cat >> /etc/apt/sources.list <<END
deb http://archive.ubuntu.com/ubuntu natty main restricted universe
apt-get update
apt-get -t natty install iodine
sed -i '$d' /etc/apt/sources.list

1b. Debian only installation!

cat >> /etc/apt/sources.list <<END
deb http://ftp.debian.org/debian sid main
apt-get update
apt-get -t sid install iodine
sed -i '$d' /etc/apt/sources.list

Continue reading

Debian Nginx 0.7/PHP 5.3/MySQL 5.1 Install Guide

This script is based of 21Andy’s work, and Lowendbox’s work.

Please note that this script has been deprecated in favor of Xeoncross’s updated Lowendscript. This post remains here just for historical purposes.

Link: https://github.com/Xeoncross/lowendscript

The main differences compared to Andy’s and Lowendbox’s work are:
PHP 5.3 vs 5.2
Nginx 0.7 vs 0.6
MySQL 5.1 vs 5.0
Cleaner repos (for those Debian templates with broken repositories)

To run this script, enter in:

wget http://www.putdispenserhere.com/wp-content/uploads/setup-cheap-debian.sh
bash setup-cheap-debian.sh

Afterward, run this to setup WordPress:

bash setup-debian.sh wordpress blog.example.com

Make sure you change blog.example.com to match your domain.

Continue reading