Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 5th November 2006, 08:56
agrajagzz9 agrajagzz9 is offline
Junior Member
 
Join Date: Nov 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy trouble with ddclient

Hi
I'm hosting a webserver at home and using the dyndns free service for a domain name. As I have a dynamic IP, I'm using DDclient to update the IP on the dyndns server when it changes. However, there seems to be a problem with this. DDclient detects the local address of eth0 (the interface that I specified in the /etc/ddclient.conf file). So now I have to update the IP manually on the dyndns site every time my IP changes. If anyone has used this program, please help .

Agrajag
Reply With Quote
Sponsored Links
  #2  
Old 6th November 2006, 14:58
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

Is your system (the one where ddclient is installed) acting as your router (i.e., is it connected directly to the internet)?
What's the output of
Code:
ifconfig
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 7th November 2006, 07:56
agrajagzz9 agrajagzz9 is offline
Junior Member
 
Join Date: Nov 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No, the server is connected to a router which is connected to an adsl modem.

ifconfig returns the following:
Code:
eth0      Link encap:Ethernet  HWaddr 00:09:5B:67:8E:D3
          inet addr:192.168.2.2  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::209:5bff:fe67:8ed3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:122265 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15435 errors:2 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:25614627 (24.4 MiB)  TX bytes:5386844 (5.1 MiB)
          Interrupt:185 Memory:cc102000-cc102fff

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:30 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2332 (2.2 KiB)  TX bytes:2332 (2.2 KiB)
thanks for your help

Agrajag
Reply With Quote
  #4  
Old 7th November 2006, 16:42
domino domino is offline
Senior Member
 
Join Date: Aug 2005
Posts: 364
Thanks: 0
Thanked 9 Times in 8 Posts
Default

Also post your ddclient.conf and and your cron tab.
__________________
Shuttle XPC | Intel 865g | P4 3.2Ghz | ATI 9800 Pro
Hosts: Ubuntu 6.10 ~ XGL-Beryl SVN-Gnome | OS X 10.4.8 | WindowsXP
Virtual Appliances: Ubuntu Server 6.10 | WindowsXP | CentOS 4.4
Reply With Quote
  #5  
Old 8th November 2006, 12:06
agrajagzz9 agrajagzz9 is offline
Junior Member
 
Join Date: Nov 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok

here's the ddclient.conf:
Code:
pid=/var/run/ddclient.pid
protocol=dyndns2
use=if, if=eth0
server=members.dyndns.org
login=agrajagzz9
password='secret'
zz9.homelinux.net
and crontab:
Code:
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user  command
17 *    * * *   root    run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || run-parts --report /etc/cr$
47 6    * * 7   root    test -x /usr/sbin/anacron || run-parts --report /etc/cr$
52 6    1 * *   root    test -x /usr/sbin/anacron || run-parts --report /etc/cr$
#
Reply With Quote
  #6  
Old 8th November 2006, 12:18
domino domino is offline
Senior Member
 
Join Date: Aug 2005
Posts: 364
Thanks: 0
Thanked 9 Times in 8 Posts
Default

If you don't post the complete ddclient.conf file (minus password and hostname), it's useless. What distro are youu using?

Code:
## For those using Redhat style rc files and using daemon-mode:
  cp sample-etc_rc.d_init.d_ddclient /etc/rc.d/init.d/ddclient
  ## enable automatic startup when booting
  /sbin/chkconfig --add ddclient
  ## start the first time by hand
  /etc/rc.d/init.d/ddclient start
Code:
If you have not configured ddclient to use daemon-mode, you'll need to
configure cron to force an update once a month so that the dns entry will
not become stale.

  ## configure cron to force an update twice a month
  cp sample-etc_cron.d_ddclient /etc/cron.d/ddclient
  vi /etc/cron.d/ddclient
__________________
Shuttle XPC | Intel 865g | P4 3.2Ghz | ATI 9800 Pro
Hosts: Ubuntu 6.10 ~ XGL-Beryl SVN-Gnome | OS X 10.4.8 | WindowsXP
Virtual Appliances: Ubuntu Server 6.10 | WindowsXP | CentOS 4.4
Reply With Quote
  #7  
Old 8th November 2006, 12:48
agrajagzz9 agrajagzz9 is offline
Junior Member
 
Join Date: Nov 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That is the complete ddclient.conf file (without the comments at the start).
I'm using Kubuntu 6.06.
I was under the impression that ddclient comes automatically in daemon mode. (Which I think it is anyway.) But the problem is that it updates with the local ip of the computer instead of the external ip. However, it obviously doesn't update unless I reboot the server because it has a static ip.
Reply With Quote
  #8  
Old 8th November 2006, 15:52
domino domino is offline
Senior Member
 
Join Date: Aug 2005
Posts: 364
Thanks: 0
Thanked 9 Times in 8 Posts
Default

Download the latest verion ddclient-3.7.0. the original .conf has 160 lines and the file should include the following if running in deamon mode:

Code:
daemon=300				# check every 300 seconds
and you should include one of the following to get your external IP address if you are connected to a router.

Code:
#use=watchguard-soho,        fw=192.168.111.1:80	# via Watchguard's SOHO FW
#use=netopia-r910,           fw=192.168.111.1:80	# via Netopia R910 FW
#use=smc-barricade,          fw=192.168.123.254:80	# via SMC's Barricade FW

clip...
My router wasn't listed and I got it through a little trial and error. Followed that with your dyndns member information.

now run test:

Code:
ddclient -daemon=0 -debug -verbose -noquiet
__________________
Shuttle XPC | Intel 865g | P4 3.2Ghz | ATI 9800 Pro
Hosts: Ubuntu 6.10 ~ XGL-Beryl SVN-Gnome | OS X 10.4.8 | WindowsXP
Virtual Appliances: Ubuntu Server 6.10 | WindowsXP | CentOS 4.4
Reply With Quote
  #9  
Old 8th November 2006, 18:12
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

Quote:
Originally Posted by agrajagzz9
No, the server is connected to a router which is connected to an adsl modem.

ifconfig returns the following:
Code:
eth0      Link encap:Ethernet  HWaddr 00:09:5B:67:8E:D3
          inet addr:192.168.2.2  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::209:5bff:fe67:8ed3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:122265 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15435 errors:2 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:25614627 (24.4 MiB)  TX bytes:5386844 (5.1 MiB)
          Interrupt:185 Memory:cc102000-cc102fff

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:30 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2332 (2.2 KiB)  TX bytes:2332 (2.2 KiB)
thanks for your help

Agrajag
I don't see any interface that's connected to the internet, like ppp0 or something like this. If your system was connected directly to the internet, you'd have something like ppp0 on your system with a public IP address, and you'd have to use this interface for ddclient.
Now you're behind a router, which means your router must update the dyndns record, so ddclient is useless for you. Most routers support updating dyndns records nowadays.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #10  
Old 8th November 2006, 21:43
domino domino is offline
Senior Member
 
Join Date: Aug 2005
Posts: 364
Thanks: 0
Thanked 9 Times in 8 Posts
 
Default

I recall being able to run ddclient on a linux box behind a network router/switch and that router behind a DSL router without problems. i eventually found out that my DSL router had it's own IP address update util. that connects to dyndns. so I stopped running ddclient.
__________________
Shuttle XPC | Intel 865g | P4 3.2Ghz | ATI 9800 Pro
Hosts: Ubuntu 6.10 ~ XGL-Beryl SVN-Gnome | OS X 10.4.8 | WindowsXP
Virtual Appliances: Ubuntu Server 6.10 | WindowsXP | CentOS 4.4
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble with function.include Boon-Dog-Danny Installation/Configuration 25 19th July 2007 11:12
Big trouble: separate domain appears as ServerAlias for another domain Dmitry General 7 17th July 2006 18:28
Ethereal Trouble mcrosby Installation/Configuration 8 25th June 2006 04:50
DDClient won't start deezone Installation/Configuration 1 1st February 2006 21:22
Mail trouble web-worlds Installation/Configuration 15 27th January 2006 11:45


All times are GMT +2. The time now is 04:22.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.