Modify

Opened 3 years ago

Closed 3 years ago

#18693 closed defect (moved_to_github)

ddns-scripts tweak needed for namecheap.com

Reported by: Steve Newcomb Owned by: developers
Priority: normal Milestone:
Component: packages Version: Trunk
Keywords: Cc:

Description

If the hostname's ipaddr is not the same as the domain's ipaddr, the existing dynamic_dns_updater.sh script doesn't work with namecheap.com's ddns service, because that script currently checks (via nslookup) domain.com's current ipaddr, not your.domain.com's current ipaddr. Therefore, the script thinks the nameservice *always* needs updating, even though it doesn't.

I made it work properly with two changes:

(1) I added "option hostname your.domain.com" to my /etc/config/ddns. There was no such option there even though there is a "hostname" field in the LUCI interface.

(2) In /usr/lib/ddns/dynamic_dns_updater.sh, I changed the line:

registered_ip=$(echo $(nslookup "$domain" 2>/dev/null) | grep -o "Name:.*" | grep -o "$ip_regex")

to:

registered_ip=$(echo $(nslookup "$hostname" 2>/dev/null) | grep -o "Name:.*" | grep -o "$ip_regex")

(i.e., "$domain" became "$hostname")

(What this means for LUCI is much less clear to me.)

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by chris5560

Hi Steve,
there is a "historical" problem with the naming of options. Better might be "FQDN".

Have a look at http://wiki.openwrt.org/doc/uci/ddns where are descriptions for all available options.

The option "domain" does not only mean "example.com". It also means the "hostname" to update "myhost.example.com". That's the reason why the field inside LuCI called "Hostname/Domain".

The other reason is that with ddns providers like cloudflare it is possible to feed IP's for self-registered domains. Then you need to send updates for the domain "example.com" by yourself. So I think there is no change needed to the existing scripts.

If you want to update your domain's IP you need one section with option domain "example.com" plus one additional section with option domain "myhost.example.com" to update your host's IP.

Does this make your ticket unnecessary ? If yes please close it, otherwise I need more information about namecheap's ddns service.

Christian

comment:2 Changed 3 years ago by nbd

  • Resolution set to moved_to_github
  • Status changed from new to closed

ddns-scripts is maintained here: https://github.com/openwrt/packages

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.