[AC68U] Problems with NameCheap DDNS

  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

Nikecow

New Around Here
Hello there,

I've been spending all day trying to configure a DDNS for my router with NameCheap. The thing is, I get an error no matter what I try. The other providers did seem to work. Here are my settings:



I contacted NC support and they gave me the manual link which did work, namely: https://dynamicdns.park-your-domain.com/update?host=mc&domain=[REDACTED].org&password=[REDACTED]

As you can see on the settings I filled these in exactly but I always get the following error in my log:

Code:
Feb 27 14:41:00 watchdog: start ddns.
Feb 27 14:41:00 rc_service: watchdog 609:notify_rc start_ddns
Feb 27 14:41:01 ddns update: ez-ipupdate: starting...
Feb 27 14:41:01 ddns update: connected to dynamicdns.park-your-domain.com (104.219.249.25) on port 80.
Feb 27 14:41:01 ddns update: unknown return code: 400
Feb 27 14:41:01 ddns update: server response: Bad Request
Feb 27 14:41:01 ddns update: asusddns_update: 1

Details:
Router: RTAC68U
Firmware: 3.0.0.4.378.50_0 (clean install)

What am I doing wrong :confused:?
 
Last edited:

RMerlin

Asuswrt-Merlin dev
ez-ipupdate does not support https. If the provider now requires SSL, then you will have to create a custom ddns script to handle updates.
 

RMerlin

Asuswrt-Merlin dev
Can someone confirm that Namecheap does enforce SSL now? I was just based my response on your example URL which was over https.
 

kastorl

New Around Here
Can someone confirm that Namecheap does enforce SSL now? I was just based my response on your example URL which was over https.

namecheap on merlin's fw works fine. i'm using ddns-start to update multiple hosts/domains at namecheap over https via curl. thanks merlin for that!

op, make sure for the host name, you are using @ or the actual host of the domain, ie, if you own "yourdomain.com" and want the ip for "yourdomain.com" updated, use the @ for the host name. if you want to update IP for mail.yourdomain.com, then for the host name put in mail. make sure the password is the namecheap ddns password, not the one you use to login to your namecheap account:



if you want to update MULTIPLE hosts, even for the same domain, you'll have to use merlin's ddns-start script. here's what i use to update multiple domains/hosts for that (change out the pw for your ddns pw for each corresponding domain as each domain you turn on ddns for in namecheap has its own unique pw):
Code:
#!/bin/sh

curl -s "https://dynamicdns.park-your-domain.com/update?host=www&domain=mydomain.com&password=1234567890"
curl -s "https://dynamicdns.park-your-domain.com/update?host=mail&domain=mydomain.com&password=1234567890"
curl -s "https://dynamicdns.park-your-domain.com/update?host=www&domain=myothersite.com&password=1234567890"

/sbin/ddn_custom_updated 1
 

Nikecow

New Around Here
My settings were indeed correct and it still doesn't work.

Still giving me the bad request error. I have added your custom script and that does work though, thank you :D

I will update this thread if I get it to work the normal way.
 
Last edited:

Marc Aronson

Occasional Visitor
New to the forum and new to using namecheap, but had a similar problem. Here is how I solved it.

I "copied and pasted" the password from namecheap into the DDNS configuration page. When doing a copy/paste operation, a trailing space was added to the password. It looks like the firmware doesn't trim trailing spaces. I manually deleted the last character of the password after doing the past and it worked for me.

Hope this helps!
 

RMerlin

Asuswrt-Merlin dev
New to the forum and new to using namecheap, but had a similar problem. Here is how I solved it.

I "copied and pasted" the password from namecheap into the DDNS configuration page. When doing a copy/paste operation, a trailing space was added to the password. It looks like the firmware doesn't trim trailing spaces. I manually deleted the last character of the password after doing the past and it worked for me.

Hope this helps!

It doesn't trim them because a space is quite often a valid character for a password. I have a customer's server password which begins with a space, for instance.
 

Marc Aronson

Occasional Visitor
It doesn't trim them because a space is quite often a valid character for a password. I have a customer's server password which begins with a space, for instance.

Good point -- thank you for the reply. Also, thank you for the fantastic firmware -- it is a vast improvement over the original Asus firmware!

Another problem I am manually working around is the way hostname and domain name are handled.

Consider the case of DDNS name = "prefix.myname.com":
  • I set host name = "prefix".
  • I set domain name = "myname.com".
  • DDNS works properly, but the exported ovpn file has the incorrect hostname of "prefix" instead of "prefix.myname.com".
  • If I change hostname to "prefix.myname.com", the DDNS updater client doesn't work properly.
It's a bit of a "catch 22" that I work around by manually editing the exported ovpn file -- would it make sense to automatically glue the hostname and domain name together for cheapname configurations?
 

siafu

New Around Here
I know this is an old thread, but I had to get this working with namechesp.com today.

Under HostName I put the hostname I found under the LAN section of my router. and of course, under the Domain Name you put the name of your web address you purchased from Namecheap. I spent a lot of time trying to get this to work properly with Free Certificate from Let's Encrypt.

The @ will not work with Free Certificate from Let's Encrypt, if you look in the longs it will give an error and points out that @ cannot be used.
 

conmurray

New Around Here
@siafu, I'm curious as to whether you did manage to set this up?

I've encountered a similar issue as yourself.
Further, I found that if I put into hostname something like "router" and then had my domain name as "conmurray.com", the logs would show it complain as follows:
"detail": "Error creating new order :: Cannot issue for \"router\": Domain name needs at least one dot"

The only way I could get around this was to put "router.conmurray.com" into the hostname.
Now my asus thinks its DDNS is router.conmurray.com.conmurray.com

Argh Im not a fan of namecheap.
 

DJLaz

New Around Here
@conmurray did you find a way to get past this? I am having the exact same problem with a namecheap domain I registered today. Trying to set up DDNS to use Let's Encrypt on my RT-AC86U and seeing the same error in the logs:
"detail": "Error creating new order :: Cannot issue for \"router\": Domain name needs at least one dot"

The Let's Encrypt status just sits at "Authorizing". I haven't tried the other workaround of using the full name in the hostname field, since it seems like it is also not handled correctly.

Any help would be appreciated.
 

Simulacra

Occasional Visitor
Good point -- thank you for the reply. Also, thank you for the fantastic firmware -- it is a vast improvement over the original Asus firmware!

Another problem I am manually working around is the way hostname and domain name are handled.

Consider the case of DDNS name = "prefix.myname.com":
  • I set host name = "prefix".
  • I set domain name = "myname.com".
  • DDNS works properly, but the exported ovpn file has the incorrect hostname of "prefix" instead of "prefix.myname.com".
  • If I change hostname to "prefix.myname.com", the DDNS updater client doesn't work properly.
It's a bit of a "catch 22" that I work around by manually editing the exported ovpn file -- would it make sense to automatically glue the hostname and domain name together for cheapname configurations?
Nothing has been fixed in 5 years since this post. Buying recently a new RT-AX86U, I've got the same issue with domain/subdomain on DDNS with namecheap.com :(
 

DJLaz

New Around Here
A quick update on this from my setup. I had DDNS working already from my router, but Let's Encrypt will not successfully authorize a certificate due to the mishandling of the host and domain name fields. I successfully worked around this by setting Let's Encrypt client up on a different machine in my network, and configuring that to retrieve the certificate. Now I manually imported that cert onto my router, and this is working as all my SSL traffic is now secured. The machine I am using with Let's Encrypt should automatically renew this certificate after the 90 days, and as far as I am aware I should not require to re-import the certificate on the router (since it will renew the same cert). I will know in 3 months whether that is working or not, but worst case is I will have to manually import the certificate again. Obviously it would be a lot easier if this all worked on the router, but it is not a huge deal and things seem to be working now.
 

Simulacra

Occasional Visitor
It is ridiculous that the system unable to pick up a domain. It takes a subdomain only. In Administration - System - Remote Access Config you can see that the address is like https://subdomain:8443. Of course, nothing is working in this situation. It's not only an issue with the certification, it not possible to link my router to Alexa. All because the domain is missing from the address.
 

Simulacra

Occasional Visitor
However, in the Network map - Internet Status we can see the fully qualified domain name with subdomain and domain.
So we need a small fix for WAN address.
 
Last edited:

Simulacra

Occasional Visitor
The root cause I think in the variable taking from the config file inadyn.conf.
We don't have this problem using Asus.com because a variable hostname here is a full name (subdomain + domain) (hostname = host.domain.com). But for namecheap.com hostname is used for a subdomain only and username for the domain (hostname = host and username = domain.com)

It's why we unable to create a certificate and link to Alexa: because the domain is missing from the variable 'hostname'.
 

Simulacra

Occasional Visitor
RTFM, guys. There is a solution

All we need is to create a custom script.
Create a file
nano /jffs/scripts/ddns-start
And put here the code from there
if you have multiple subdomains put them here
HOSTS="name1 name2 name3 name4"
Put also your password and domain where required.
Then save and exit from nano.
After that, you need to make your script executable
chmod + x /jffs/scripts/ddns-start

In the admin web of your router, you need to be sure that the option Enable JFFS custom scripts and configs is active in Administration - System.
Then go to WAN - DDNS and change 'Server' to 'Custom' and put the fully qualified domain name (like subdomain.mydomain.com) that you prefer to use to access your router in 'Host Name'

APPLY :)

Actually, even a SSL certificate was created but it didn't work. I found my SSL certificate in /jffs/.le folder
I use Nginx for domain forwarding so didn't care about why the Merlin was wrong, but just put links to fullchain.pem and key files in nginx.conf. And now it works as it should be working.
 
Last edited:

Simulacra

Occasional Visitor
The issue with SSL certificates was fixed in the last Merlin FWs. Just create a custom script from my guide above and it should work.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top