Description:

This document describes how to configure a LANCOM router to operate with a dynamic DNS provider.

If the Internet connection of the router only was assigned a private IP address due to usage of Carrier Grade NAT or Dual Stack Lite, using a DynDNS service is impractical since only the private IP address can be registered with the DynDNS service. Therefore accessing this IP address from the Internet is not possible. Carrier grade NAT is often used in cellular networks and Dual Stack Lite is often used for cable connections with DOCSIS support. 


Requirements:


Scenario:

The router has an xDSL connection with an IP address that changes (i.e. dynamic), but which should be available from the outside at all times. Because you do not know the IP address, one solution is to use a dynamic DNS service such as DynDNS.org.


Procedure:

1) Start the Setup Wizard in LANconfig and select the option Configure dynamic DNS.

2) Select your dynamic DNS provider from the list of supported providers.

3) In the next dialog you select the remote site, which in most cases is the connection to your ISP (Internet service provider).

The dynamic DNS provider is updated each time this device attempts to connect to the remote site (e.g. following a forced re-connect).

4) In this dialog, enter the DNS resolvable name along with the access data for your dynamic DNS account.

5) After confirming the final dialog with Finish, the configuration is saved and your router is ready to use dynamic DNS.



Transmitting the public IP address to the DynDNS provider in a scenario with an upstream router:
If a LANCOM router is assigned an IP adresse from a private IP address range for its Internet connection in a scenario with an upstream router (Plain-Ethernet), with default settings always the private IP address will be transmitted to the DynDNS provider. For the public IP address to be transmitted, the parameter %a has to be removed in the Action table entries. In this case the DynDNS provider uses the IP address from the packet from where the request originates (the Internet connection of the upstream router).
As Plain-Ethernet connections are established permanently. the Internet connection has to be restarted regularly (e.g. via a Cron job), so that changes to the IP address of the upstream router can be announced. 
1) Open the configuration of the router in LANconfig and fo to the menu Communikation → general → Action table.
2) Modify the two selected entries in the Action table.
3) Remove the string &myip=%a under Action, so that the entries appear as shown below.
4) Set up the Cron job, so that the Internet connection is restarted regularly. The procedure is described in the following Knowledge Base article:



Well worth knowing:

It is also possible to update multiple dynamic DNS providers. Simply repeat the configuration steps described above while entering your account data for the respective dynamic DNS provider.

The Setup Wizard stores the configured queries to the menu Communication → General → Action table:

Example of an entry from the provider "no-ip.com ":

Example of an entry from the provider "DYNDNS.org":

With the provider DYNDNS.org you can also use the so-called "Updatekey" as an alternative to the password. This is simply used instead of the password.

The syntax of the action would look like this:

https://username:updatekey@members.dyndns.org/nic/update?system=dyndns&hostname=%h&myip=%a&wildcard=ON&mx=%h

The first update occurs the next time a connection is established to the configured remote site.

  • The first entry forces an update of the IP address at the provider at the latest after 25 days. Most dynamic DNS providers will block an account if the address does not change at least once every 25-30 days.
  • The second entry is started with each re-connect. It checks the IP address that your provider has stored for your domain. If the entry is the same as your current IP, the following steps are skipped. If the entry is not the same, the following steps are carried out.
  • The third entry sends your current IP if the DNSCheck produced a different result. The lock for 900 seconds prevents your IP from being sent too often, which would result in your account being locked by the provider.
  • The fourth entry causes these steps to be repeated after 300 seconds, just in case of any transmission errors.

Dynamic DNS also works for IPv6 addresses. To enable this, you should swap the variable %a for the variable %z in each of the first three entries in the action table.



Function check:

To check that the command is executed by the action table, start a Telnet or SSH session to the router.

You can locate the log for the action table by entering this command into your router's command line:

list /Status/WAN/Actions/Action-Table

The result should appear as follows:

list /Status/WAN/Actions/Action-Table

Time Action
Result

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
08/18/2008 09:26:06 repeat:300
timer started

08/18/2008 09:26:06 dnscheck:myhost.dyndns.org
80.138.30.236

08/18/2008 09:26:06 http://Example:example@members.dyndns.org/nic/update?system=dyndns&hostname=myhost.dyndns.org&myip=80.138.30.236&wildcard=NOCHG&mx=myhost.dyndns.org&backmx=NO locked (782780 seconds remaining)

  • The first entry states that the command will be repeated in 300 seconds.
  • The second entry is a DNS check of your DynDNS name. Here, the address myhost.dyndns.org was resolved to the IP 80.138.30.236.
  • The third entry is the HTTP command used by the router to send its IP address to the dynamic DNS provider.

You can simply copy & paste the command line

http://Example:example@members.dyndns.org/nic/update?system=dyndns&hostname=myhost.dyndns.org&myip=80.138.30.236&wildcard=NOCHG&mx=myhost.dyndns.org&backmx=NO

into your browser and call up the page there. This lets you check whether the command is functioning. If not, an error message will be returned.