Dynamic DNS (DDNS) is a DNS caching service
DD-WRT v23 SP2 and later use inadyn as its embedded dyndns client solution.
Here's a list of Dynamic DNS service providers:
http://www.dyndns.comhttp://www.easydns.com
http://freedns.afraid.org
http://www.no-ip.com
http://www.tzo.com
http://www.zoneedit.com
http://www.ChangeIP.com
Configuration
Predefined
DD-WRT provides a set of predefined configurations for the most common DDNS services. After choosing from one of the predefined DDNS services, you have to provide the "User Name" and the "Password" for the account of your DDNS service. In the "Host Name" field, you have to enter the fully qualified name of you dynamic domain (e.g. myhostname.example.org).
Multiple DDNS host names
If you have multiple host names registered at your DDNS service, you can enter them in the "Host Name" field using the "-a" option.
Example: You want to update the IP address for myhostname1.example.org, myhostname2.example.org and myhostname3.example.org; in this case, you have to enter in the "Host Name" field the following string: "myhostname1.example.org -a myhostname2.example.org -a myhostname3.example.org". (Note: no "-a" for the first host name.)
Custom (URL Updates)
With url updates, the client program usually submits a request using the hypertext transport protocal (HTTP) to a DDNS Server. The request may contain your requested hostname (your dynamic domain name) and/or your IP address. The server then asks for the username and password. The client program returns the information to authorize itself, and the update is completed with the server request response to verify the result.
When your DDNS Service provider uses URL updates, you need to know the url which the client program requests. An example of such a url is:
http://example.com/dyndns/update?hostname=hostname.example.org&ip=1.2.3.4
The URL is divided into parts, the parts should be simple to divide.
Protocol | Usually appears first and is followed by "://" |
Location | Usually after protocol, this can be an IP address or a domain name |
Port (optional) | Sometimes appears after location, only appears after a colon. |
URI | The last part of the URL, which can be subdivided. It normally appears after the location and port. |
The URI can be subdivided even futher. Most of the URI is optional.
URI Location | Everything before the "?" or "#" ("?" first). |
URI Parameters | Everything after the "?" and before the "#". There can be many parameters. Many times, as in the above example is it specified in the "name=value" form. And commonly when more than one value needs to be specified, it is divided with "&" so "name1=value1&name2=value2&name3=value3" can be used to specify three parameters. |
URI Link | Everything after the "#", used to specify a specific point in a page. |
The example request above is:
Protocol | http |
Location | example.com |
Port | Not specified |
URI | /dyndns/update?hostname=hostname.example.org |
URI Location | /dyndns/update |
URI Paramater "hostname" | hostname.example.org |
To confirm that you have the correct URL and can manually update your IP by using your web browser. When prompted, input your registered username and password. If you aren't registered, register one and setup (add) your dynamic domain name first. Once you have the information, you should be able to set it up using DD-WRT.
- Login to the Web GUI, Set DDNS under "Setup" to "custom"
- If the URL paramaters have "hostname" use "dyndns@dyndns.org" for DNS System. Otherwise use "custom@http_svr_basic_auth"
- Enter "Username" and "Password" with your registered username and password of your DDNS service provider.
- Fill in your hostname in "Host Name"
- Complete options in "Additional DDNS Options" textarea.
- Save Changes and Reboot Router
[edit] Additional DDNS Options
For the custom DDNS to work properly we must specify options so that the program knows what to do.
- Specify the Server Name option, this is Location and perhaps the port (if specified) of the URL.
- Specify Server URL Option. If you used the "dyndns@dyndns.org" as "DNS System" you need to specify the Server URL option as just the URI Location; otherwise you need to specify the entire URI.
Using the example above, the Additional DDNS Options should be:
" --dyndns_server_name example.com --dyndns_server_url /dyndns/update"
If this isn't working, try pinging checkip.dyndns.org. You may have to use the "ip_server_name" option if you are unable to recieve a response. The IP address option is used to specify an alternate source to get your IP. Many websites have options to view your IP Address. For the update to work properly, the IP Address check must be be done on the server side (no javascript/vbscript) and your ip address must be the first address on the page. You may need to confirm this by using "View Source" in your browser.
Example:
http://www.dnsstuff.com/tools/my-ip-address.ch
Dividing this URL is similar to dividing the one above:
Protocol | http |
Location | www.dnsstuff.com |
Port | Not specified |
URI | /tools/my-ip-address.ch |
URI Location | /tools/my-ip-address.ch |
The "ip_server_name" option uses the Location and the URI. If there is not a URI, use "/"
The "ip_server_name" string using the server above should be:
"--ip_server_name www.dnsstuff.com /tools/my-ip-address.ch"
Note the space beteen the Location and URI.
If you have multiple dyndns domains under the same account and need to update them together, you can add one or more "-a" options to do so. ie, "-a SECOND_HOSTNAME.example.com". This only works if the domains are under the same provider and account.
So, finally, the additional options should be complete and will work in general cases.
Examples
dnspark.com
dnspark.com
This configuration may be correct.
DDNS Service: Custom
DYNDNS Server: www.dnspark.net
Username: your ddns' username
Password: your ddns' password
Host Name: your domain
URL: /api/dynamic/update.php?mx=ON&mxpri=5
3222.org
Example option for 3322.org (a chinese dyndns provider)
Username: USERNAME Password: PASSWORD Registered Dynamic Domain Name: SAMPLEHOSTNAME.3322.org
3322.org Updating Methods typical url: http://www.3322.org/dyndns/update?system=dyndns&hostname=SAMPLEHOSTNAME.3322.org
option string, using a chinese ip_server
using dyndns@dyndns.org " --dyndns_server_name www.3322.org --dyndns_server_url /dyndns/update? --ip_server_name www.bliao.com:2000 /ip.phtml "
using custom@http_svr_basic_auth: " --dyndns_server_name www.3322.org --dyndns_server_url /dyndns/update?hostname= --ip_server_name www.bliao.com:2000 /ip.phtml "
freedns.afraid.org
DDNS Service: freedns.afraid.org
User Name: USERNAME
Password: PASSWORD
Host Name: yourdomain.com,EntireHashValueAfterTheQuestionMarkTakenFromAfraidDotOrgScript
Force Update Interval 10
DNS-O-Matic
DNS-O-Matic provides you a free and easy way to announce your dynamic IP changes to multiple services with a single update. Using DNS-O-Matic allows you to pick and choose what Dynamic DNS services you want to notify, all from one easy to use interface.
More info can be found in the forums. Using DNS-O-Matic is an easy way to update your favorite dynamic dns service and OpenDNS (which currently does not work with dd-wrt's built in inadyn).
DDNS Service: Custom
DYNDNS Server: updates.dnsomatic.com
User Name: your dns-o-matic username
Password: your dns-o-matic password
Host Name: all.dnsomatic.com
URL: /nic/update?
DynDNS
Note that as of v23, using DDNS in DD-WRT will not allow updates to the DynDNS server using the pre-set DynDNS settings. You must set settings to Custom, and following all instructions below.
The below is my setting for dynamic DDNS using dyndns.org
- substitute your account setting for those in quotes
DDNS Service | Custom |
DYNDNS Server | members.dyndns.org |
User name | 'Your DynDNS username' |
Password | 'Your DynDNS password' |
Hostname | 'Your DynDNS hostname' |
URL | /nic/update? |
Additional DDNS Options | --dyndns_system dyndns@dyndns.org --ip_server_name checkip.dyndns.org:8245 / |
If static DNS is used, use statdns@dyndns.org instead of dyndns@dyndns.org.
EveryDNS
EveryDNS is a basic free dynamic DNS provider.
DDNS Service: | Custom |
DYNDNS Server: | dyn.everydns.net |
Username: | 'Your EveryDNS Username' |
Password: | 'Your EveryDNS Password' |
Host Name: | 'Your Domain Name' |
URL: | /index.php? |
Edit DNS
DDNS Service: | Custom |
DYNDNS Server: | dyndns.editdns.net |
Username: | 'Your Email' |
Password: | 'Your Password' (optional?) |
Host Name: | 'Your Domain Name' |
URL: | /api/dynLinux.php?p= |
NameCheap
NameCheap is a domain registrar that includes free dynamic dns with the host registration. Under $10/year. NameCheap doesn't use normal http auth for updating, so you have to include your domain and password in the URL.
DDNS Service: | Custom |
DYNDNS Server: | dynamicdns.park-your-domain.com |
Username: | (not used) |
Password: | (not used) |
Host Name: | 'Your subdomain (or @ for none)' |
URL: | /update?domain=[your domain]&password=[your password]&host= |
DNSexit
DNSexit is a domain registrar that provides free to top level domains for both business and internet users.
DDNS Service: | Custom |
DYNDNS Server: | www.dnsexit.com |
Username: | BOGUS |
Password: | BOGUS |
Host Name: | 'Your Domain Name' |
URL: | /RemoteUpdate.sv?login=USERNAME&password=PASSWORD&host= |
CHANGEIP.COM
The information below is how to configure your router to update www.ChangeIP.com dynamic dns hostnames:
- substitute your account setting for those in quotes
DDNS Service | Custom |
DYNDNS Server | nic.changeip.com |
User name | 'Your ChangeIP.com username' |
Password | 'Your ChangeIP.com password' |
Hostname | 'Your DynDNS hostname' or '*1' for Group #1 |
URL | /nic/update?system=dyndns&hostname= |
Additional DDNS Options | --ip_server_name ip.changeip.com |
Give UP?
I gave up on trying to setup my freedns.afraid.org setup and just set a cron script at startup to use freedns' wget method of updating my dns every 5 minutes on the router. If this does not work for you, some variation on this theme might:
echo '*/5 * * * * root /usr/bin/wget http://freedns.afraid.org/dynamic/index.php?action=script&data_id=XXXXXX -o - >/dev/null 2>&1' >> /tmp/crontab
NOTE: In the above, the XXXXXX is an id number provided by freedns.afraid.org
Debugging your configuration
Internaly, DD-WRT uses inadyn and creates in the directory /tmp/ddns a configuration file from your settings in the web form. To check whether the expected configuration file is created from your settings in the web form, you can inspect this file as follows:
- ssh or telnet to the router
- navigate to /tmp/ddns: cd /tmp/ddns
- inspect file inadyn.conf: cat /tmp/ddns/inadyn.conf
If you are not familiar with the format of the inadyn.conf file, you can just call /usr/sbin/inadyn from the command line and the allowed parameters are shown.
No comments:
Post a Comment