Wednesday, March 9, 2011

Add a dynamic DNS client to the router/gateway

A ddns client will allow access to future SSH, VPN and other external services to access the server from the internet.

  1. Register for a dynamic DNS service. Any good search engine can point you to a good service.
  2. Install ddclient using the command apt-get install ddclient. The installer will ask questions about the newly-registered dynamic dns account. No further configuration seems needed.
  3. Find the dynamic dns address, which is the router's IP address a couple ways.
    route | awk '{ print $2 }' | sort | tail -n+4 | head -n+1    # If on the LAN
    dig +short myaccount.dyndns.org                              # Elsewhere on the internet
    nslookup myaccount.dyndns.org ns.dyndns.org                  # Another way from the internet
    http://www.dnscog.com/dig/myaccount.dyndns.org/              # As a web page

No comments: