1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

Custom DDNS Question

Discussion in 'Asuswrt-Merlin' started by SomeWhereOverTheRainBow, Jun 19, 2019.

  1. SomeWhereOverTheRainBow

    SomeWhereOverTheRainBow Regular Contributor

    Joined:
    Jun 4, 2019
    Messages:
    107
    Does any body have a working configuration for setting up asuscomm.com inside in-a-dyn custom?
     
  2. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    30,620
    Location:
    Canada
    Asus's DDNS requires you to first register the account with Asus. Simplest way to do this is to configure it through the webui, the router will then issue the special request to register it.

    Once it's registered, then you can use it with a custom Inadyn configuration:

    Code:
    iterations = 1
    provider [email protected] {
    hostname = yourhostname.asuscomm.com
    username = "AAA"
    password = "BBB"
    }
    
    The username can be obtained with
    Code:
    nvram get lan_hwaddr
    
    And the password:

    Code:
    nvram get secret_code
    
     
    L&LD and SomeWhereOverTheRainBow like this.
  3. SomeWhereOverTheRainBow

    SomeWhereOverTheRainBow Regular Contributor

    Joined:
    Jun 4, 2019
    Messages:
    107
    I was just about to respond that I looked inside /etc/inadyn.conf and figured it out.. as for the
    nvram values i just used
    $(nvram get value) for each value

    iterations = 1
    provider [email protected] {
    hostname = $(nvram get ddns_hostname_x)
    username = "$(nvram get lan_hwaddr)"
    password = "$(nvram get secret_code)"
    checkip-command = "/usr/sbin/nvram get wan0_ipaddr"
    wildcard = true
    }
     
    Last edited: Jun 19, 2019
  4. SomeWhereOverTheRainBow

    SomeWhereOverTheRainBow Regular Contributor

    Joined:
    Jun 4, 2019
    Messages:
    107
    Is there any way to add command to force update for that specific one?
     
  5. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    30,620
    Location:
    Canada
    That won't work. That config file is not a shell script, so it cannot execute commands.
     
  6. SomeWhereOverTheRainBow

    SomeWhereOverTheRainBow Regular Contributor

    Joined:
    Jun 4, 2019
    Messages:
    107
    Code:
    #!/bin/sh
    cat << EOF >> /etc/inadyn.conf
    iterations = 1
    provider [email protected] {
    hostname =  $(nvram get ddns_hostname_x)
    username = "$(nvram get lan_hwaddr)"
    password = "$(nvram get secret_code)"
    checkip-command = "/usr/sbin/nvram get wan0_ipaddr"
    wildcard = true
    }
    EOF
    inside /jffs/scripts/inadyn.postconf
     
  7. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    30,620
    Location:
    Canada
    Why do you want to use a custom script? I assume it was because you needed to support two different DDNS services, in which case ddns_hostname_x will already be used by that other service.
     
  8. SomeWhereOverTheRainBow

    SomeWhereOverTheRainBow Regular Contributor

    Joined:
    Jun 4, 2019
    Messages:
    107
    it is not for that I am setting up a pretty lengthy setup, but you are right I could also use the config method, but i am actually using ddns_hostname_x as a buffer to sub in only part of the actual domain address for multiple different sets of sub domains.

    so mine actually looks like
    $(nvram get ddns_hostname_x).asuscomm.com
    along with what ever other services i run from
    $(nvram get ddns_hostname_x)
     
  9. SomeWhereOverTheRainBow

    SomeWhereOverTheRainBow Regular Contributor

    Joined:
    Jun 4, 2019
    Messages:
    107
    My next latest and greatest question @RMerlin or any one who can respond on such topic, Is there a method to supply a inadyn custom ddns with a custom certificate via providing a path to the crt.pem and key.pem, that ignores the routers custom certificate? I am looking for away to set this up inside inadyn.conf