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:
    https://www.cloudflare.com/login
  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 'z=YOUR_CLOUDFLARE_ROOT_DOMAIN' \
    -d 'type=A' \
    -d 'name=YOUR_CLOUDFLARE_DNS_ENTRY' \
    -d 'content=1.2.3.4' \
    -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):

    https://www.cloudflare.com/api_json.html?a=rec_load_all&tkn=YOUR_API_KEY_HERE&email=YOUR_CLOUDFLARE_EMAIL&z=YOUR_CLOUDFLARE_ROOT_DOMAIN
  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.
    https://www.cloudflare.com/api_json.html?a=rec_edit&tkn=YOUR_API_KEY_HERE&id=YOUR_DNS_ENTRY_ID&email=YOUR_CLOUDFLARE_EMAIL&z=YOUR_CLOUDFLARE_ROOT_DOMAIN&type=A&name=YOUR_CLOUDFLARE_DNS_ENTRY&content=1.2.3.4&service_mode=0&ttl=1
  8. Refresh your domain’s DNS entries page to see if the IP became 1.2.3.4.
  9. Copy and paste your modified URL from step 6 into Tomato
    Make sure to replace 1.2.3.4 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:
    http://www.cloudflare.com/docs/client-api.html#s5.2

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++

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.

Download:

Replace Notepad++ Batch Script

Instructions:

  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.

Easy OpenVPN Setup Script for Debian Based OpenVZ VPS

What is OpenVPN?

OpenVPN is a reliable and well tested VPN solution that is able to run over a single port, supports compression, tunnels over NAT, and is very secure.

What does this script do?

This script will automatically install, configure, and add users to OpenVPN all in under 5 minutes, even with minimal Linux skills. The port forwarding, server configuration, and authentication setup is all taken care of for you.

Features

  • Automatic .ovpn file generation with inline certificates in a single file
  • Google DNS servers
  • Port 53 captive portal bypass server option

Continue reading

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

PPTP Debian/Ubuntu OpenVZ Setup Script

What is PPTP?

PPTP is short for Point-to-Point Tunneling Protocol, a technology for creating Virtual Private Networks (VPNs) quickly. Support is built-in to many operating systems natively, without needing an additional client, unlike OpenVPN.

What does this script do?

This script will automatically PPTP/PoPToP on your OpenVZ VPS in a few of minutes. Port forwarding, server configuration, and authentication setup is all taken care of for you.

What if I want to do it myself?

A manual installation guide is available here for those of you who want to get down and dirty: http://www.putdispenserhere.com/pptp-vpn-setup-guide-for-a-debian-openvz-vps/

How do I install it?

1. Make sure that your VPS has its PPP module working. To check, run the following command:

cat /dev/ppp

If your VPS returns this message, then your PPP module is set correctly:

cat: /dev/ppp: No such device or address

If not, then you need to enable it in SolusVM (or disable and re-enable it).

2. Copy and paste these lines into your SSH client of choice:

wget https://raw.github.com/cwaffles/ezpptp/master/ezpptp.sh
chmod +x ezpptp.sh && ./ezpptp.sh

Continue reading