Integrating IPCT DDNS with Asus Routers

  • Views Views: 1,252
  • Last updated Last updated:
  • IPCT DDNS can easily be integrated with Asus routers running AsusWRT-Merlin firmware. The entire process from start to finish should take under 5 minutes.

    Step 1 - Download Asuswrt-Merlin

    First download the Asuswrt-Merlin firmware for your router by clicking here or the spoiler text below.

    Step 2 - Flash Firmware

    Since Asuswrt-Merlin is mostly a variant of the original Asuswrt, it means that there is no special procedure to flash it. Just flash it the same way you would flash any regular Asus firmware (Administration -> Firmware Upgrade -> New firmware File).
    • Starting with Asus's 3.0.0.4.380_3000, a new firmware format is used. To flash Asuswrt-Merlin on one of these newer firmwares, you will need 380.61 or newer. Likewise, downgrading to an older version is not supported. (Try firmware recovery mode if you really need to downgrade.)
    • The RT-AC68U and RT-AC56U need to be at least on firmware 378.55 (or the last 378.xxx version from Asus) before you can flash 380.xx, due to the partition size change.
    • It's recommended to reboot the router before flashing it, to free up sufficient memory. Otherwise, there's a chance the router might reject the firmware, due to running too low of free RAM.
    • If coming from a non-Asuswrt firmware, you will have to do a factory default reset.
    • While it is generally not necessary to restore to factory defaults, it's not a bad idea, especially if there is a big jump in version number (e.g. from 112 to 178). No need to do the 30/30/30 dance as required by DD-WRT - just do a plain Factory Default reset, or turn the device on while keeping the WPS button pressed. (The procedure can be different from one model to another.)
    • It is very hard to brick an Asus router. If something goes wrong during flashing, you can put your router in Recovery mode by powering it on while you keep Reset pressed. After your release it, the power LED will either blink or stay off (depending on the model). At that point, you can either access it through http://192.168.1.1 (make sure you first give your PC a static IP within the same range, e.g. 192.168.1.100), or through the Firmware Recovery Tool provided on Asus' support CD. You will then be able to flash a working firmware.
    • If something looks weird, don't waste too much time: save your settings, reset to factory default, reconfigure the basics, and see if the issue is resolved. If not, you can always restore your saved settings and do some more advanced troubleshooting.
    • It is not recommended to restore settings saved under a different firmware version. It might work, but there is no guarantee.

    Step 3 - Enable SSH

    • Click "Administration" on the left side, then the System tab and the Yes option for Enable SSH and Allow SSH password login. Then scroll down and click Apply
      upload_2019-2-28_15-47-44.png

    Step 4 - Sign up for IPCT DDNS

    If you haven't already, sign up for IPCT DDNS and create a hostname. The hostname will be the URL that to use for your DDNS. By default your current IP address and username will be used, but you can change that if you want.
    upload_2019-2-22_22-37-16.png
    The hostname will be assigned a unique API key after it is added. Make sure to keep this API key private. You can reset it at any time.
    upload_2019-2-22_22-41-48.png

    Step 5 - Turn off JFFS Formatting

    1. We are going to put the custom DNS script on a partition that is wiped when the router reboots. You can disable wiping of this partition so the script stays there forever.
    2. Log in to the Asus web interface. In the left pane under the Advanced Settings section, click Administration
    3. Now click the System tab, under Persistent JFFS2 partition set Format JFFS partition at next boot to No
    4. Set Enable JFFS custom scripts and configs to Yes
    5. Scroll down and click Apply
      upload_2019-2-28_15-46-15.png

    Step 6 - Create Custom DDNS Script

    You will need a program to SSH into your router. I recommend using PuTTY.
    1. SSH into your Asus router (admin as user) and enter the jffs scripts folder
      Code:
      cd /jffs/scripts
    2. Create the ddns-start script by editing ddns-start by typing
      Code:
      vi ddns-start
    3. Now copy these lines and paste them into the vi editor (in Putty right-click pastes). Make sure you first replace APIKEY with the API Key assigned to your host name in Step Four.
      Code:
      #!/bin/sh
      wget -q https://ipcamtalk.com/dyn?api=APIKEY -O - >/dev/null
      if [ $? -eq 0 ]; then
      /sbin/ddns_custom_updated 1
      else
      /sbin/ddns_custom_updated 0
      fi
      Vi can be a little finicky and tricky, so make sure the entire code is there. You may have to type out some of the beginning part of the code. It cut off everything before the : in the url the first time I did it.
    4. To save this file, click the ESC button on your keyboard, then type :wq and press Enter.
    5. We need to make the script executable by typing the following code
      Code:
      chmod a+x /jffs/scripts/ddns-start

    Step 7 - Enable the Custom DDNS Script

    1. Log back into the Asus router web interface to enable custom DDNS.
    2. Under Advanced Settings choose WAN
    3. Click the DDNS tab and set Enable the DDNS Client to Yes
    4. Set Method to retrieve WAN IP to Internal
    5. Set Server to Custom (which uses the script we created before)
    6. Enter your API key as the Host Name
    7. Click Apply
      upload_2019-2-28_15-35-59.png

    After the router applies the new settings you should receive a message saying "Registration is successful.". Good job, you're done! Your hostname is now set to your global IP address and is fully integrated with your Asus router. If you do not receive this message then go over the integration again and make sure you typed the code exactly.

    You can confirm it's working by checking the IPCT DDNS page. Your hostname should reflect your IP address.
Top