[Solved] NameCheap DDNS in OpenWrt

Windows???

OK, this is not related to OpenWrt.

Do you have trouble understanding or what? The Windows client was to temporarily test (recommended by the support) if it is an OpenWrt problem or the NameCheap configuration. The latter was correct and the Windows client was correct, so the problem is OpenWrt.

OK I understand now - you stopped troubleshooting and putting configs in the OpenWrt; and my trouble [so-called understanding] was due to that.

I hope the best and wish you well; because I don't think that tone was meant to be a positive continuation of the checking [an OpenWrt] with me.

(Also, this 127.0.0.1 IP is quite confusing - unless you are simply saying that's the default IP from the DDNS Provider when you create an account - because obviously, you don't want that IP to remain. Also I asked if you had an A Record in the OpenWrt for that hostname i.e. to facilitiate local lookup of a server, etc... but you said you didn't understand.)

I didn't mean to insult you or treat you badly. I am using the Google translator and that is why we do not understand each other.
The guide on how to configure the DDNS service (previously commented with a link) indicates that you have to put a "dummy" IP in the NameCheap panel so that it updates automatically when the DDNS client is configured correctly. The Windows client works as expected and sends the IP of the router to NameCheap and it is shown too. But it is not the same with the OpenWrt client.
I still don't understand what "A Record in the OpenWrt" is and what it is for in my case.

  • What is your native language?
  • Please show the DDNS config

Spanish

root@archer_c60:~# cat /etc/config/ddns

config ddns 'global'
        option ddns_dateformat '%F %R'
        option ddns_loglines '250'
        option ddns_rundir '/var/run/ddns'
        option ddns_logdir '/var/log/ddns'

config service 'namecheap'
        option enabled '1'
        option lookup_host 'domain.com.ar'
        option use_ipv6 '0'
        option service_name 'namecheap.com'
        option password 'PASSWORD'
        option ip_source 'network'
        option ip_network 'wan'
        option interface 'wan'
        option check_unit 'minutes'
        option force_unit 'minutes'
        option retry_unit 'seconds'
        option domain 'domain.com.ar'
        option username 'domain.com.ar'

(Donde es) Where's:

???

(Poner a prueba o probar) Try out:

config service 'namecheap'                                                                                                                                                     
	option interface 'wan'                                                                                                                                                 
	option use_syslog '1'                                                                                                                                                  
	option ip_source 'network'                                                                                                                                             
	option ip_network 'wan'                                                                                                                                                
	option password 'xxxxxxxxxxxxxxx'                                                                                                                                         
	option update_url 'http://foo.example.com/update?domain=domain.com.ar&password=[PASSWORD]&host=[IP]'                                                     
	option enabled '1'                                                                                                                                                     
	option lookup_host 'domain.com.ar'
1 Like

According to NameCheap the update URL used in DD-WRT is dynamicdns.park-your-domain.com/update?domain=DOMAIN.COM&password=PASSWORD&host= but in the OpenWrt profile it is http://dynamicdns.park-your-domain.com/update?host=[USERNAME]&domain=[DOMAIN]&password=[PASSWORD]&ip=[IP].

???

Estoy completamente confundida.

I'm not sure if you're saying you've known the correct link all the time...or you're unsure what link to use.... :bulb: test both or use what works.

Again, I hope the best.

Neither works or I am not putting the correct data.

I have good news and that is that I was able to configure the DDNS client correctly (or so I think) since I received help in a thread of mine on Reddit that suggested that I enter the following data:

Lookup Hostname: dynamicdns.park-your-domain.com
Profile: namecheap.com
Domain: domain.com.ar
Username: @
Password: Dynamic DNS Password

What "worries me" is that in the OpenWrt panel it shows the NameCheap service domain and its IP, but not my domain and IP.


At least I can see my public IP in the NameCheap panel and also ping my domain, which results in my public IP.

Is it working?

It seems that yes, although I do not like that the IP of Namcheap and its domain appear and not as it happens with DuckDNS that shows mine.

So, I've just configured Namecheap with OpenWRT. It took me an hour or so to figure it out, and Namecheap support was no help at all.

Assuming you wan to register hostname VPN with a domain you ported to Namecheap; let's say it's OPENWRTROCKS.COM

This is how it should be configured:

  1. Log in to your Namecheap profile, find your domain, click Manage

  2. On the page that opens, click the tab Advanced DNS

  3. Scroll down to the Dynamic DNS section

  4. Move the slider so that Dynamic DNS is enabled

  5. Click Add New Record and create a new A+ Record with an IP address.

  • Host: vpn
  • IP Address: any IP address
    Note: Do not put the actual IP address that OpenWRT currently has assigned to its WAN interface. The whole point in configuring DDNS is that the OpenWRT software should update the A+ Record with the actual IP address that's assigned to the OpenWRT's WAN interface, and when this IP address changes in the future, OpenWRT should update Namecheap DDNS service with the new IP address to match the A+ Record vpn.openwrtrocks.com
  1. In OpenWRT, navigate to Services > Dynamic DNS

  2. Click Add New Services at the bottom of the page.

  3. Basic Settings Tab:

  1. Advanced Settings Tab:

IP Address Source: Network
Network: WAN

9(a) Alternatively, you can try here the following:
IP Address Source: Interface
Interface: WAN

  • Log to File: select the checkbox
  1. Save

  2. Save & Apply

  3. Click on the Edit button next to the newly created DynamicDNS service.

  4. Click on the Log File Viewer tab

  5. Click Read/Re-Read Log File.

You should be looking for something like this:

015404       : verbose mode  : 0 - run normal, NO console output
 015404       : check interval: 300 seconds
 015404       : force interval: 4320 seconds
 015404       : retry interval: 15 seconds
 015404       : retry counter : 2 times
 015404       : 'SIGTERM' was send to old process
 015404  note : PID '23129' terminated by 'SIGTERM' at 2020-10-27 01:54
 015404       : last update: 2020-10-27 01:52
 015404       : Detect registered/public IP
 015404       : #> /usr/bin/nslookup vpn  >/var/run/ddns/Namecheap.dat 2>/var/run/ddns/Namecheap.err
 015404  WARN : NO valid IP found
 015404  info : Starting main loop at 2020-10-27 01:54
 015404       : Detect local IP on 'network'
 015404       : Local IP '12.34.56.78' detected on network 'wan'
 015404       : Update needed - L: '12.34.56.78' <> R: ''
 015404       : #> /bin/uclient-fetch -q -O /var/run/ddns/Namecheap.dat -Y off 'http://dynamicdns.park-your-domain.com/update?host=vpn&domain=openwrtrocks.com&password=***PW***&ip=12.34.56.78' 2>/var/run/ddns/Namecheap.err
 015404       : DDNS Provider answered:
<?xml version="1.0"?><interface-response><Command>SETDNSHOST</Command><Language>eng</Language><IP>12.34.56.78</IP><ErrCount>0</ErrCount><ResponseCount>0</ResponseCount><Done>true</Done><debug><![CDATA[]]></debug></interface-response>
 015404  info : Update successful - IP '12.34.56.78' send
 015404  info : Forced update successful - IP: '12.34.56.78' send
 015404       : Waiting 300 seconds (Check Interval)

If you see an error message, then go make yourself a cup of coffee, chat with your wife, and when you come back, check the bottom of the Dymamic DNS page (Services > Dynamic DNS)

Under "Lookup Hostname Registered IP" column, you should see:
vpn.openwrtrocks.com
12.34.56.78

It takes Namecheap up to 15-30 minutes to propagate the newly registered IP throughout the DNS system. So, it may take that long for OpenWRT to be able to query the DDNS A+ Record FQDN you have created (vpn.openwrtrocks.com) to resolve it to your OpenWRT's WAN interface IP (12.34.56.78)

You can run the DNS resolution from pretty much any OS by using the universal (and now outdated) command:
nslookup vpn.openwrtrocks.com
You should see the IP 12.34.56.78

or Pointer Record (PTR), which is the reverse DNS lookup:
nslookup 12.34.56.78
You shoudl see the FQDN: vpn.openwrtrocks.com

4 Likes

What do I enter in "Domain" from step 8 in OpenWrt?

I guess I missed the domain. I will edit my post to add it.

You put your domain there. If you have your own domain parked to Namecheap you would put your domain there. In my example, it would be openwrtrocks.com

Yes, I thought about entering the domain and everything works as expected!
Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.