DDNS, The Easy Way.

Status
Not open for further replies.

distro

Forerunner
Dynamic DNS or DDNS is a term used for the updating in real time of Internet Domain Name System (DNS) name servers to keep the active DNS configuration of their hostnames, addresses and other information up to date.

A user may need access to their home or office computer while travelling; if and only if its address is known can it be set up to be accessed over a VPN, or by a remote control program such as VNC server. This could be accomplished with a name server, but setting one up is a complex task and may be too time consuming. Instead there are a number of providers, free of charge or for payment, of what is called a Dynamic DNS service. The DDNS provider allocates a static hostname to the user; whenever the user is allocated a new IP address this is communicated to the DDNS provider by software running on a computer or network device at that address; the provider distributes the association between the hostname and the address to the Internet's DNS servers so that they may resolve DNS queries.

The ultimate result is that the traveller may communicate with his home at, say myname.ddnsservice.org instead of an unknown varying IP address; the host name is resolved to the current address of the home computer with a DNS query transparent to the user. The communication between the user's computer and the DDNS provider is not standardised, varying from one provider to another, although a few standard web-based methods of updating have emerged over time.

Ok, I didnt make that shit up, its from wikipedia.

But, you get the point what DDNS is and is very necessary for people who want to monitor their home PC, Linux Boxes, Pogoplugs and NAS which are on "Dynamic ip" . A free DDNS is no-ip.com and is excellent in their service. Only thing is, I couldnt run the noip software properly for my pogoplug and this made me look at other alternatives.

Luckily for me , I was able to find a service that was much better, easy and just works. I intend this tut for headless systems.

How it Works:

A software runs in your NAS/home server which keeps on reporting the ip-address of NAS/home to dnsomatic.com ; dnsomatic.com will then update this ip to other services like opendns , Dyndns and no-ip.com. Now, No-ip.com will give you a fixed web address, like "abcd.zapto.org" ; when you use abcd.zapto.org as ip-address (for torrent client, ssh), it will "re-direct" you to your NAS/Home ip even if your ip was "dynamic".

Why no-ip.com ? 'coz opendns only reports ip, it doesnt re-directs you to your home/NAS ip (google recursive dns). Dyndns is a paid service, that was it for me, why pay if you get same thing for free
tongu23e.gif


And no-ip.com is a free re-director to your dynamic home/NAS ip.

I will try to keep this as simple as possible:

1. Create account on no-ip.com and dnsomatic.com (if you have opendns account, it will work on dnsomatic.com)

2. Login to no-ip.com , Click on: "Host/redirects"

..a. Click on "add host"

..b. At hostname write something, you can remember easily eg: abcd

..c. Next select zapto.org or no-ip.org or no-ip.bz , whatever you like. eg: zapto.org

..d. Now, just click on "Create Host"

VlauN.png


3. Login to dnsomatic.com account, Click "Your service" , Click "Add service" , Select "noip" from drop down menu.

4. A screen will popup, you need to input your no-ip.com username and pass and the full hostname you assigned earlier, in this case: abcd.zapto.org and click on "Update account info"

sl6hs.png


5. Download and install ddclient in your NAS/Pogoplug/Linux Box (look for your flavor of linux)

6. Find ddclient.conf in your NAS/Pogoplug system , Mostly it will be in "/etc/ddclient/"

You need to edit it to be similar like this:

Code:
daemon=300					  # check every 300 seconds

syslog=yes					  # log update msgs to syslog

pid=/var/run/ddclient.pid

ssl=yes

use=web, web=myip.dnsomatic.com

server=updates.dnsomatic.com	  

protocol=dyndns2				  

login=ur_dnsomatic_login_username 		

password=ur_dnsomatic_password 	  

all.dnsomatic.com

7. Start your ddclient in your NAS/Pogoplug/Linux box ; ddclient now updates dnsomatic.com services under your login-username with your ip

8. Check your services option in dnsomatic.com site. And you should see ip of your NAS/Pogoplug besides your no-ip hostname. Now, dnsomatic will update the no-ip.com site, your hostname abcd.zapto.org with this ip. So, whenever you use abcd.zapto.org, it will re-direct you to your NAS/Pogoplug.

That's it, now, if you want to connect to your NAS/Pogoplug's ssh, just punch in abcd.zapto.org in putty and you will be re-directed to your NAS/Pogoplug.

Oh, btw, If your NAS/Pogo is behind a router, then pls Port Forward "Port 22" to your NAS/Pogplug on your network. Similarly for services, like for bnc running on your NAS/Pogoplug.

You can add other services like opendns, dyndns and many other to dnsomatic.com and all will be updated on change of ip.

I hope this tut helps.
 
Nice dude. I started a thread asking for free dysns or ddns about 2 years ago, and got good reply, and finally went for a static IP connection. Good to know things have changed and good free ddns providers are there for us. The service provided by Asus' ddns service, ie asuscom.com was shit and was still at development stage that time.

Thanks for the info mate.
 
Oh, btw, If your NAS/Pogo is behind a router, then pls Port Forward "Port 22" to your NAS/Pogplug on your network. Similarly for services, like for bnc running on your NAS/Pogoplug.

You haven't mentioned this part.
 
Port forward was relatively the easy part.
<


Anyways, the number of devices makes this difficult. I will try to post Netgear router's Port forward screen shot.
 
thanks for the guide distro, really useful. When I was setting this up on my pogoplug, I got till step 7, but when I run ddclient, I get this error.

Code:
[root@alarm ~]# rc.d start ddclient
/etc/conf.d/ddclient: line 21: all.dnsomatic.com: command not found
:: Starting ddclient                                                     [DONE]

Will it still work?
 
I edited the .conf file in "etc/ddclient" ; I left the etc/conf.d/ddclient untouched.

If you edited the etc/ddclient file correctly, check the dnsomatic account for updated ip. If it updates, it works. Another thing is logs, in logs you can find the update results, it says dnsomatic updated or successful. The log location , I am not sure but check in etc/ddclient. If all works, still check the file concerned, you can try to in un comment that line or remove that file from etc/conf.d/ddclient.

By my method , I am actually using the .conf in etc/ddclient
 
thanks distro

Ok, I cleaned the conf.d and pasted the part in etc/ddclient/ddclient.conf. This time it ran without giving any errors. Also, the IP changed under account in dnsomatic so i guess its working.

I am still not able to access transmission though. If i type 192.168.1.123:9091, i can access it. I can ping <address>.zapto.org but if i try to goto <address>.zapto.org:9091, it times out.

If I goto http://<address>.zapto.org/ it takes me to my routers page which is at 192.168.1.1

is it a forwarding issue?
 
You need to forward your router port to pogoplug , @distro this is something which i said earlier ;-)
 
Last edited by a moderator:
^^ lol , never knew this will be an issue. I think I will have to sit down and add to the first post. It's gonna take time ATM.

#manu1991 , it's the router port forward issue. You need to go to ur router and port forward to ip of your pogoplug.
Also, check that transmission is able to accept all ips, google for those particular settings. I think it's in the .json file.
 
that's what I was afraid of. I have this shitty ADSL Modem+Wifi router from MTNL, this is the closest I could find and setup to port forwarding:
CDz16.png
 
Your port numbers are wrong, it should start with 9090 and end with 9092

Keep nat enabled under nat tab
 
I have tried with all ports open as well. its still not working.

NAT and UPnP are enabled. Start port is 10, end is 65535. Port forwarding is working because the port 51413 which was earlier shown as closed in transmission is shown as open now.

ddclient is also working fine.

Code:
[root@alarm ~] # ddclient -daemon=0 -verbose
CONNECT:  myip.dnsomatic.com
CONNECTED:  using HTTP
SENDING:  GET / HTTP/1.0
SENDING:   Host: myip.dnsomatic.com
SENDING:   User-Agent: ddclient/3.8.1
SENDING:   Connection: close
SENDING:
RECEIVE:  HTTP/1.1 200 OK
RECEIVE:  Server: Apache
RECEIVE:  Vary: Accept-Encoding
RECEIVE:  Content-Type: text/html
RECEIVE:  Content-Length: 14
RECEIVE:  Accept-Ranges: bytes
RECEIVE:  Date: Thu, 17 May 2012 17:51:13 GMT
RECEIVE:  X-Varnish: 2393536400
RECEIVE:  Age: 0
RECEIVE:  Via: 1.1 varnish
RECEIVE:  Connection: close
RECEIVE:
RECEIVE:  59.180.114.126
INFO:     setting IP address to 59.180.114.126 for all.dnsomatic.com
UPDATE:   updating all.dnsomatic.com
CONNECT:  updates.dnsomatic.com
CONNECTED:  using SSL
SENDING:  GET /nic/update?system=dyndns&hostname=all.dnsomatic.com&myip=59.180.114.126 HTTP/1.0
SENDING:   Host: updates.dnsomatic.com
SENDING:   Authorization: Basic bWFudTE5OTE6bnV4c29wcnA=
SENDING:   User-Agent: ddclient/3.8.1
SENDING:   Connection: close
SENDING:
RECEIVE:  HTTP/1.1 200 OK
RECEIVE:  Server: nginx/1.0.14
RECEIVE:  Date: Thu, 17 May 2012 17:51:17 GMT
RECEIVE:  Content-Type: text/html
RECEIVE:  Connection: close
RECEIVE:  Vary: Accept-Encoding
RECEIVE:  Content-Length: 19
RECEIVE:  Accept-Ranges: bytes
RECEIVE:  X-Varnish: 2393537162
RECEIVE:  Age: 0
RECEIVE:  Via: 1.1 varnish
RECEIVE:
RECEIVE:  good 59.180.114.126
SUCCESS:  updating all.dnsomatic.com: good: IP address set to 59.180.114.126
Can't exec "sendmail": No such file or directory at /usr/sbin/ddclient line 1465.
ddclient: cannot execute command | sendmail -oi root.

still if I try to goto <server>.zapto.org:9091, nothing happens.

http://www.yougetsignal.com/tools/open-ports/ says port 9091 is open on server>.zapto.org.

this is the transmission settings.json, is there anything wrong in this?
Code:
{
    "alt-speed-down": 50, 
    "alt-speed-enabled": false, 
    "alt-speed-time-begin": 540, 
    "alt-speed-time-day": 127, 
    "alt-speed-time-enabled": false, 
    "alt-speed-time-end": 1020, 
    "alt-speed-up": 50, 
    "bind-address-ipv4": "0.0.0.0", 
    "bind-address-ipv6": "::", 
    "blocklist-enabled": false, 
    "blocklist-url": "http://www.example.com/blocklist", 
    "cache-size-mb": 4, 
    "dht-enabled": true, 
    "download-dir": "/home/manu/extdd/torrent", 
    "download-queue-enabled": true, 
    "download-queue-size": 5, 
    "encryption": 0, 
    "idle-seeding-limit": 30, 
    "idle-seeding-limit-enabled": false, 
    "incomplete-dir": "/root/Downloads", 
    "incomplete-dir-enabled": false, 
    "lpd-enabled": false, 
    "message-level": 2, 
    "peer-congestion-algorithm": "", 
    "peer-limit-global": 240, 
    "peer-limit-per-torrent": 60, 
    "peer-port": 51413, 
    "peer-port-random-high": 65535, 
    "peer-port-random-low": 49152, 
    "peer-port-random-on-start": false, 
    "peer-socket-tos": "default", 
    "pex-enabled": true, 
    "port-forwarding-enabled": true, 
    "preallocation": 1, 
    "prefetch-enabled": 1, 
    "queue-stalled-enabled": true, 
    "queue-stalled-minutes": 30, 
    "ratio-limit": 2, 
    "ratio-limit-enabled": false, 
    "rename-partial-files": true, 
    "rpc-authentication-required": false, 
    "rpc-bind-address": "0.0.0.0", 
    "rpc-enabled": true, 
    "rpc-password": "truncated", 
    "rpc-port": 9091, 
    "rpc-url": "/transmission/", 
    "rpc-username": "", 
    "rpc-whitelist": "127.0.0.1", 
    "rpc-whitelist-enabled": false, 
    "scrape-paused-torrents-enabled": true, 
    "script-torrent-done-enabled": false, 
    "script-torrent-done-filename": "", 
    "seed-queue-enabled": false, 
    "seed-queue-size": 10, 
    "speed-limit-down": 100, 
    "speed-limit-down-enabled": false, 
    "speed-limit-up": 100, 
    "speed-limit-up-enabled": false, 
    "start-added-torrents": true, 
    "trash-original-torrent-files": false, 
    "umask": 18, 
    "upload-slots-per-torrent": 14, 
    "utp-enabled": true
}
 
DAMN, its working, I was trying to access it from the same network via address.zapto.org. if I try it from a different internet connection, it works fine. Maybe you should mention this in the first post @distro for idiots like me.
 
Last edited by a moderator:
DAMN, its working, I was trying to access it from the same network via address.zapto.org. if I try it from a different internet connection, it works fine. Maybe you should mention this in the first post @distro for idiots like me.

It should work from same network also :P

Anyways, I am glad u figured it out.
 
Last edited by a moderator:
Status
Not open for further replies.