1
22.1 Legacy Series / Re: os-ddclient
« on: November 28, 2022, 10:43:20 pm »
Has anyone gotten ddclient to work with NameCheap? I was moving to ddclient today after my update to 22.7 and successfully installed ddclient-3.9.1.
It did not work when configuring it using the provided GUI, and filling in the hostname, login, password. After some testing, I figured out the issue, but its not something I can fix.
First, using dyndns as the "Check ip method", did not find my domain. Using freedns resolved that issue. Can't exactly confirm thats a ddclient issues, but it could be an issue with dyndns endpoint; I didn't go down that rabbit hole.
Second, looking at the logs under /var/log/ddclient/latest.log, I was able to see the request that is being used to update the IP entry, and it looks like this (matching the GUI variables):
hxxps://dynamicdns[.]park-your-domain[.]com/update?host={hostname}&domain={username}&password={password}&ip={Public_IP}
Matching these variables to ddclient.conf, I see hostname is as at the bottom, login is username, and password is password.
I don't know anything about the dynamicdns api, or what it expects, but seeing "username" / "login" as the domain, made no sense to me. It would explain why I saw this error:
My username is clearly not my domain.
So I played around with the request a bit, and found that the below url worked:
hxxps://dynamicdns[.]park-your-domain[.]com/update&domain={hostname}&password={password}&ip={Public_IP}
Checking the DNS records on NameCheap I saw it updated the A record.
While I can just create a cron job / script to do this for me, I'd rather use the plugin since thats available to me and I can manage it via the web GUI.
If anyone has a solution that works with the current version of ddclient, I'd greatly appreciate it.
Thanks!
It did not work when configuring it using the provided GUI, and filling in the hostname, login, password. After some testing, I figured out the issue, but its not something I can fix.
First, using dyndns as the "Check ip method", did not find my domain. Using freedns resolved that issue. Can't exactly confirm thats a ddclient issues, but it could be an issue with dyndns endpoint; I didn't go down that rabbit hole.
Second, looking at the logs under /var/log/ddclient/latest.log, I was able to see the request that is being used to update the IP entry, and it looks like this (matching the GUI variables):
hxxps://dynamicdns[.]park-your-domain[.]com/update?host={hostname}&domain={username}&password={password}&ip={Public_IP}
Matching these variables to ddclient.conf, I see hostname is as at the bottom, login is username, and password is password.
Code: [Select]
syslog=yes # log update msgs to syslog
pid=/var/run/ddclient.pid # record PID in file.
ssl=yes
use=cmd, cmd="/usr/local/opnsense/scripts/ddclient/checkip -i eth0 -t 1 -s freedns --timeout 10",
protocol=namecheap, \
login=username, \
password=NameCheapAPIKey \
blah.com
I don't know anything about the dynamicdns api, or what it expects, but seeing "username" / "login" as the domain, made no sense to me. It would explain why I saw this error:
Code: [Select]
<?xml version="1.0" encoding="utf-16"?><interface-response><Command>SETDNSHOST</Command><Language>eng</Language><ErrCount>1</ErrCount><errors><Err1>Domain name not found</Err1></errors><ResponseCount>1</ResponseCount><responses><response><Description>Domain name not found</Description><ResponseNumber>316153</ResponseNumber><ResponseString>Validation error; not found; domain name(s)</ResponseString></response></responses><Done>true</Done><debug><![CDATA[]]></debug></interface-response>
My username is clearly not my domain.
So I played around with the request a bit, and found that the below url worked:
hxxps://dynamicdns[.]park-your-domain[.]com/update&domain={hostname}&password={password}&ip={Public_IP}
Code: [Select]
<?xml version="1.0" encoding="utf-16"?><interface-response><Command>SETDNSHOST</Command><Language>eng</Language><IP>{Public_IP}</IP><ErrCount>0</ErrCount><errors /><ResponseCount>0</ResponseCount><responses /><Done>true</Done><debug><![CDATA[]]></debug></interface-response>
Checking the DNS records on NameCheap I saw it updated the A record.
While I can just create a cron job / script to do this for me, I'd rather use the plugin since thats available to me and I can manage it via the web GUI.
If anyone has a solution that works with the current version of ddclient, I'd greatly appreciate it.
Thanks!