4

I have a subdomain that I want to update with ddclient. I configured the ddclient to get the IP from dyndns but it's not updating the subdomain on namecheap. They said to use yourdomain.com as the login instead of my actual domain.

Has anyone been able to get namecheap DNS updated with ddclient?

I'm running CentOS 6.2 with ddclient 3.7.3.

When I run ddclient I get the following.

CONNECT:  checkip.dyndns.org
CONNECTED:  using HTTP
SENDING:  GET / HTTP/1.0
SENDING:   Host: checkip.dyndns.org
SENDING:   User-Agent: ddclient/3.7.3
SENDING:   Connection: close
SENDING:
RECEIVE:  HTTP/1.1 200 OK
RECEIVE:  Content-Type: text/html
RECEIVE:  Server: DynDNS-CheckIP/1.0
RECEIVE:  Connection: close
RECEIVE:  Cache-Control: no-cache
RECEIVE:  Pragma: no-cache
RECEIVE:  Content-Length: 106
RECEIVE:
RECEIVE:  <html><head><title>Current IP Check</title></head><body>Current IP Address: IPADD</body></html>
Use of uninitialized value in string ne at /usr/sbin/ddclient line 1998.
WARNING:  skipping update of lf4bot from <nothing> to IPADD
WARNING:   last updated <never> but last attempt on Fri Jun 15 22:46:21 2012 failed.
WARNING:   Wait at least 5 minutes between update attempts.

ddclient.conf File

daemon=300                              # check every 300 seconds
syslog=yes                              # log update msgs to syslog
mail=root                               # mail all msgs to root
mail-failure=root                       # mail failed update msgs to root
pid=/var/run/ddclient.pid               # record PID in file.
ssl=yes                                 # use ssl-support.  Works with
use=web, web=checkip.dyndns.org/, web-skip='IP Address' # found after IP Address
protocol=namecheap \
server=dynamicdns.park-your-domain.com \
login=yourdomain.com \
password=PASSWORD \
lf4bot
krizzo
  • 367
  • 2
  • 5
  • 16

3 Answers3

6

I just went through this process, and want to note some issues that tripped me up.

First, this is the canonical reference for configuring ddns for namecheap: http://www.namecheap.com/support/knowledgebase/article.aspx/583/11/how-to-configure-ddclient

If you don't want to rely on an external web service for finding your IP (like me), things are slightly more complicated. ddclient has a facility for logging into your router and grabbing your IP address from there, which should be the most efficient and reliable method.

The first thing you need is to find the page that contains your IP address. For me, this was http://192.168.1.1/RST_status.htm. Make sure that when you "view source" on that page, you see your IP address. Now log out of your router, otherwise ddclient will just see an error message about how someone is already logged in. Finally edit your /etc/ddclient.conf like so:

protocol=namecheap
use=fw
fw=192.168.1.1/RST_status.htm
fw-login=admin
fw-password=<my-router-password>
server=dynamicdns.park-your-domain.com
login=<my-domain>.org
password='<8cc67226fadff52f402d31505ee85d6b>'
www

To make sure it works, run: ddclient --debug --verbose. You should see the webpage that it downloads from the router, and the IP that it scrapes out of it.

You probably don't want to use the --noexec option for debugging, since ddclient will then skip downloading html from the router, and won't find any IP address. In that case you will see DEBUG: skipped network connection and WARNING: unable to determine IP address, which is no good.

bukzor
  • 243
  • 3
  • 9
1

I was using ddclient version 3.7.3 on centos 6.2 I don't know if the versions matter but the way I ended up setting up my namecheap dyndns was this way. I made it so others could see exactly how they should have it just replace the google.com, 8cc67226fadff52f402d31505ee85d6b and dev with your setup.

Don't add quotes around the password or add commas/backslashes after each line.

##
## NameCheap (namecheap.com)
##
protocol=namecheap
server=dynamicdns.park-your-domain.com
login=google.com
password=8cc67226fadff52f402d31505ee85d6b
dev
krizzo
  • 367
  • 2
  • 5
  • 16
0

I had the same difficulty with ddclient. So I wrote a simple perl module to take care of updates. I developed it thinking, as everyone does, that you have to grab your external ip and feed it to Namecheap with your basic parameters. This isn't necessary, as the update script on Namecheap's end determines your IP on its own.

So an update call is simple:

use App::DDNS::Namecheap;

my $domain =  App::DDNS::Namecheap->new(
                  domain   => 'mysite.org',
                  password => 'abcdefghijklmnopqrstuvwxyz012345',
                  hosts    => [ "@", "www", "*" ],
);

while (1) {
    $domain->update();
    sleep (300); #5 minute cycle
}

Note that subdomains can be handled with the use of a wildcard entry. Just define "*" as a subdomain A record on your Namecheap "all host records" page.

App::DDNS::Namecheap is on the CPAN if you're interested.