LinHES Forums
http://forums.linhes.org/

Testing DDNS \ DynDNS
http://forums.linhes.org/viewtopic.php?f=25&t=21985
Page 1 of 1

Author:  gatorback [ Thu Jan 20, 2011 1:59 am ]
Post subject:  Testing DDNS \ DynDNS

I signed up for a dyndns account, enabled, and configured the DDNS settings in LinHES. When I signed up the account, I put a bogus IP address with the expectation that that LinHES would update it to the correct WAN IP address. Is there a way to probe (test) LinHES as to what it thinks the WAN IP is?

I would think that DDNS periodically polls the current WAN IP and should update dyndns accordingly. If this is the case, is there a command to prompt the polling process?

Author:  Martian [ Thu Jan 20, 2011 10:29 am ]
Post subject: 

I believe LinHES uses ddclient:

http://sourceforge.net/apps/trac/ddclient

Author:  gatorback [ Thu Jan 20, 2011 11:14 am ]
Post subject: 

10 hours later, DDNS client did not update dynDNS.com. Has anyone had success configuring DDNS on LinHES with the mythTV DDNS menu? If there was a command to query the DDNS to return the current WAN address, that would be really helpful.

Author:  Martian [ Thu Jan 20, 2011 12:03 pm ]
Post subject: 

From the link I posted above:
Quote:
Debugging ddclient looks pretty hard but it isn't. First try to put as less as necessary in your configuration. Try to run
Code:
./ddclient -daemon=0 -noquiet -debug
and check the result. Try to add the features you need and check it again. Once you're happy with the result, run it as a daemon.

If this doesn't work for you, there are a few places where you can look for help. If you need any help in configuring ddclient, you could try
Code:
ddclient --help
It should give you all the possible configuration options so.

If you think your configuration is correct, but ddclient doesn't work as you expected, you can enable debug and verbose messages by running
Code:
ddclient -daemon=0 -debug -verbose -noquiet


I don't use ddclient on my myth box but do use it on my Linux (Arch based) server that works flawlessly with dnydns.

Martian

Author:  gatorback [ Thu Jan 20, 2011 7:27 pm ]
Post subject: 

@martian: thanks for the specific guidance. It seems to work.

Code:
[root@mythtv ~]# ddclient -daemon=300  -debug -verbose -noquiet
[root@mythtv ~]# pgrep -fl ddcli
4605 runsv ddclient
4679 ddclient - reading from members.dyndns.org port 443
6116 ddclient - sleeping for 270 seconds


I will have to figure out how to ensure that ddclient process is started at bootup another day.

Author:  mattbatt [ Thu Jan 20, 2011 9:44 pm ]
Post subject: 

My router has a DynDNS client on it I just used that.

Author:  turpie [ Thu Jan 20, 2011 10:15 pm ]
Post subject: 

Thanks martian those debug tips also helped me.

Does anyone know what the permissions and ownership should be for /etc/ddclient/ddclient.conf? As ddclient complained that it couldn't access this config file.

Thanks,
Paul

Author:  Martian [ Fri Jan 21, 2011 7:56 am ]
Post subject: 

gatorback wrote:
@martian: thanks for the specific guidance. It seems to work.
...
I will have to figure out how to ensure that ddclient process is started at bootup another day.

Glad to help! Unfortunately I'm not going to be much help with getting it to run at started since LinHES uses different init scripts than Arch. You should be able to find a run script in /etc/sv/ddclient or something along those lines however.

turpie wrote:
Thanks martian those debug tips also helped me.

Does anyone know what the permissions and ownership should be for /etc/ddclient/ddclient.conf? As ddclient complained that it couldn't access this config file.

Thanks,
Paul

Glad to help Paul! On my Arch server the file is root:root with 600 permissions which kinda makes sense since the file contains your dyndns password in plain text. You will need to run ddclient as root in this case.

Martian

Author:  gatorback [ Fri Jan 21, 2011 11:25 am ]
Post subject: 

turpie wrote:
Thanks martian those debug tips also helped me.

Does anyone know what the permissions and ownership should be for /etc/ddclient/ddclient.conf? As ddclient complained that it couldn't access this config file.

Thanks,
Paul


Although Martian answered the question, it is important to understand the how. That being said, first look at the permissions \ owner of the file:

Code:
[root@mythtv ~]# ls -l /etc/ddclient/ddclient.conf
-rw------- 1 root root 5264 2011-01-20 14:21 /etc/ddclient/ddclient.conf


This command lists, the group, owner and permissions of the file. In my previous posting, it shows that the command is run as root. Footote: I did not have to run the ls command as root.

With regard as to what it 'should be', I would think that is a system configuration item and should be accessible to only the admin group, which is root, unless you designate some other admin group. DDClient was installed with root ownership from the LinHES CD, so I prefer to avoid changing permissions because I believe there is a good reason for restricting system configuration items. Others may disagree and they can get around this easily by changing adding themselves to more capable groups (generally considered a poor security practice).

Author:  gatorback [ Sat Jan 22, 2011 10:07 pm ]
Post subject:  Archlinux autoexec.bat?

Can anyone confirm the statement:

Code:
ddclient -daemon=300 -debug -verbose -noquiet


should be placed here:

Code:
vi /etc/rc.conf


to ensure that ddclient daemon is invoked at system bootup?

Author:  gatorback [ Tue Jan 25, 2011 1:20 am ]
Post subject:  Starting ddclient demon at boot.

Before making any changes I checked the ddclient processes:


Code:
[root@mythtv ~]$ pgrep -fl ddclient
4605 runsv ddclient
4679 ddclient - reading from members.dyndns.org port 443
6116 ddclient - sleeping for 10 seconds




I added the command to the start file as shown in my posting above. It updates the target ddns service with correct IP address.

I checked the ddclient processes again:


Code:
[root@mythtv ~]# pgrep -fl ddclient
4739 runsv ddclient
4816 ddclient - sleeping for 40 seconds
4865 ddclient - sleeping for 30 seconds
4870 ddclient - sleeping for 30 seconds
4874 ddclient - sleeping for 40 seconds
5828 ddclient - sleeping for 39 seconds


Not sure why it is missing the process:

4679 ddclient - reading from members.dyndns.org port 443

Should there be four instances of ddclient sleeping?

6116 ddclient - sleeping for 10 seconds

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/