Dynamic DNS

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 16:00, 28 July 2006 (edit)
Jnjn (Talk | contribs)
(Detailed step by step description to setup custom ddns service settings.)
← Previous diff
Revision as of 03:18, 29 July 2006 (edit) (undo)
AlReece45 (Talk | contribs)

Next diff →
Line 1: Line 1:
-For some reasons, you would like to use dynamic dns services other then the embedded ones (dyndns.org, zoneedit.com, freedns.afraid.org or no-ip.com). +DD-WRT v23 SP2 and later use [http://inadyn.ina-tech.net/ inadyn] as its embedded dyndns client solution.
-DD-WRT v2.3sp2 and v2.4 are now using inadyn as its embedded dyndns client solution.+
-here is the homepage of inadyn: +== Setting up DDNS ==
-[http://inadyn.ina-tech.net/]+
-descriptions of options can be found here:+=== Custom // URL Updates ===
-http://inadyn.ina-tech.net/readme.html+
-you can also download a pc version of inadyn to test or make some other use there.+With url updates, the client program usually submits a request using the hypertext transport protocal (HTTP) to a DDNS Server. The request will 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 it self, and the update is completed with the server request response to verify the result.
-To set up embedded dyndns to use custom settings, follow the steps below:+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:
-check to c if your ddns service provider support url update or dyndns stylus like update methods.+http://example.com/dyndns/update?hostname=hostname.example.org&ip=1.2.3.4
-with this method, usually, the client program request a url using http protocol (you can do it with your web browser) to the server of ddns service provider, providing your requested hostname (your dynamic domain name) and maybe your ip address to update. the server then asked the username and password, the client program returns the information to authorize it self, and the update is completed with the server responded to tell the result.+
-so, the most important is that you have to know which url the client program have to request.+The URL is divided into seperate parts, most of the time it is simple to divide the parts.
-usually, the url should be something link these:+The protocol usually appears first and is followed by "://"
 +After the protocal is the location the request should be sent, this can be an IP Address or a domain name.
 +Sometimes following the location is the port number. This is optional and will only appear when a ":" appears between the location and the uri.
 +The URI is the last part which needs to again be divided, as it is sent to the server as one. It normally appears after the "/", location, and port.
-http://serverhostname.com/dyndns/update?hostname=yourhostname.domain.com+The URI needs to be again divided. Everything in the URI before the "?" is the URI Location. Everything after the "?" are parameters for the URI Location. 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.
-let's seperate this url into part for easy of id in the following steps:+
-A: http://+The example request above is:
-B: serverhostname.com+
-C: /dyndns/update?+
-D: hostname=+
-E: yourhostname.domain.com+
 +Protocol: http
-check it with your web browser to c if you can update the ip manually by web browser. when prompted, input your registered username and password (you got registered them, don't you? if not, register one and setup (add) your dynamic domain name first.)+Location: example.com
-ok, then, here's the steps with ddwrt.+Port: Not specified
-1 - Login web gui.+URI: /dyndns/update?hostname=hostname.example.org
-2 - Enable ddns and set it to "custom".+
-3 - Check if part D IS "hostname=", if it is, fill the box "DNS System" with "dyndns@dyndns.org". if it's not, fill the box with "custom@http_svr_basic_auth".+
-4 - Fill "User Name" with your registered username of your ddns service provider.+
-5 - Fill "Password" with your password+
-6 - Fill "Host Name" with part E of the url above+
-7 - Let's take a look at the "Additional DDNS Options" box.+
-as it is a CUSTOM mode setting, it NEEDS some additional options to work properly.+
-7.1 the dyndns_server_name option, here is part B of the url. it may contain a port number, such as "dyndns.org:80", the full option string is "--dyndns_server_name PART_B_of_URL"+
-7.2 the dyndns_server_url option. if you are "dyndns@dyndns.org" as "DNS System" (meaning your part D is "hostname="), this option should be part C of the url above. but if you are using "custom@http_svr_basic_auth" then you should use part C and part D together, ie, "/dyndns/update?hostname=".+
-7.3 try to ping (google it if you don't know how to ping) checkip.dyndns.org, you have to use the ip_server_name option. it's especially important for users in China (p.r.) as the goverment has been blocking internet traffic all the time. this server is used for inadyn to determin the ip address to update. somehow, we don't need it if using general url updating methods. the server of dyndns service provider will determin the ip by checking which ip the updating request if from. anyway, inadyn needs the server to know its ip to continue to work, so if failed to contact the ip_server, it will not do any updating task. by using this option, you can change the server to some one your network can contact. if you don't know any, google one (you may use the keywords "my ip"). remember to check it with your web browser, and view the source of the page (if using ms ie, click "view - view source") to c if that ip address IS the FIRST ip address in the source and it should be need the beginning of the source code text (the near the better, should be within the first hundreds of letters).+
-here is one of them:+
-[http://www.dnsstuff.com/tools/my-ip-address.ch]+
-this option is committed with two parts, the hostname:portnumber, the url(path)+
-in the above url string, the hostname is "www.dnsstuff.com", using default http port 80, the path string should be "/tools/my-ip-address.ch", if it doesn't have this part, you should put a "/" here.+
-so, the complete option string should be "--ip_server_name www.dnsstuff.com /tools/my-ip-address.ch", or you can use "--ip_server_name www.dnsstuff.com:80 /tools/my-ip-address.ch", take care of the space between the hostname and path.+
-8 - 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.SOMEOTHER.com". note that, they should be with the same provider and under the same account.+URI Location: /dyndns/update
-So, finally, the additional options should be complete and will work in general cases, example of the option string to fill in the box:+URI Paramater "hostname": hostname.example.org
-using dyndns@dyndns.org: 
-" --dyndns_server_name SERVERHOSTNAME.COM --dyndns_server_url /SOMEPATH/SOMETHING? --ip_server_name IPSERVERHOSTNAME:PORT /SOMETHING -a OTHERDYNDNSHOSTNAME.OTHERDOMAIN.COM " 
-using custom@http_svr_basic_auth:+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.
-" --dyndns_server_name SERVERHOSTNAME.COM --dyndns_server_url /SOMEPATH/SOMETHING?hostname= --ip_server_name IPSERVERHOSTNAME:PORT /SOMETHING -a OTHERDYNDNSHOSTNAME.OTHERDOMAIN.COM "+Once you have the information, you should be able to set it up using DD-WRT.
-fill it, save it (save settings), and remember to reboot the router (administration, reboot).+# 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
 +=== 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.
 +
 +=== Example Option ===
Example option for 3322.org (a chinese dyndns provider) Example option for 3322.org (a chinese dyndns provider)
Line 67: Line 92:
Password: PASSWORD Password: PASSWORD
Registered Dynamic Domain Name: SAMPLEHOSTNAME.3322.org Registered Dynamic Domain Name: SAMPLEHOSTNAME.3322.org
-description of updating methods and update string can be founded here:+ 
-[http://www.3322.org/dyndnspage/protocol.html]+[http://www.3322.org/dyndnspage/protocol.html 3322.org Updating Methods]
typical url: http://www.3322.org/dyndns/update?system=dyndns&hostname=SAMPLEHOSTNAME.3322.org typical url: http://www.3322.org/dyndns/update?system=dyndns&hostname=SAMPLEHOSTNAME.3322.org
 +
[http://www.3322.org/dyndnspage/client.html] [http://www.3322.org/dyndnspage/client.html]
-option string:+option string, using a chinese ip_server
-(using a chinese ip_server)+
using dyndns@dyndns.org using dyndns@dyndns.org

Revision as of 03:18, 29 July 2006

DD-WRT v23 SP2 and later use inadyn as its embedded dyndns client solution.

Contents

Setting up DDNS

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 will 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 it self, 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 seperate parts, most of the time it is simple to divide the parts. The protocol usually appears first and is followed by "://" After the protocal is the location the request should be sent, this can be an IP Address or a domain name. Sometimes following the location is the port number. This is optional and will only appear when a ":" appears between the location and the uri. The URI is the last part which needs to again be divided, as it is sent to the server as one. It normally appears after the "/", location, and port.

The URI needs to be again divided. Everything in the URI before the "?" is the URI Location. Everything after the "?" are parameters for the URI Location. 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.

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.

  1. Login to the Web GUI, Set DDNS under "Setup" to "custom"
  2. If the URL paramaters have "hostname" use "dyndns@dyndns.org" for DNS System. Otherwise use "custom@http_svr_basic_auth"
  3. Enter "Username" and "Password" with your registered username and password of your DDNS service provider.
  4. Fill in your hostname in "Host Name"
  5. Complete options in "Additional DDNS Options" textarea.
  6. Save Changes and Reboot Router

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.

Example Option

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

[1]

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 "