Koozali.org: home of the SME Server

Dynamic-DNS

Pete

Dynamic-DNS
« on: October 03, 2002, 01:24:37 AM »
Hello

I've configured SME5.5 to use dyndns.org, but the auto update does not work.
yes my dyndns account name is correct and yes my password is correct.

Does anyone know how the script works. I have found something in /sbin/e-smith/dynamic-dns/dyndns.org but it's a dead end street for me.
B.T.W. the log file /tmp/dyndns.log is empty :-(

I now have to manually go and modify the IP address in dyndns and the whole point about dyndns is that it is DYNAMIC.

Luckely my ISP doesn't force a IP address change too often, but it would be nice if i'd be able to get it working.

Thanks for helping me out.

Dan Brown

Re: Dynamic-DNS
« Reply #1 on: October 03, 2002, 01:34:14 AM »
what does 'grep dyndns.org: /var/log/messages' give you?

Jason Slater

Re: Dynamic-DNS
« Reply #2 on: October 04, 2002, 10:45:44 AM »
I'm having the same problem and the response I get is:

Oct  3 10:31:22 net-server dyndns.org: Unknown response . Status was 0.

Pete

Re: Dynamic-DNS
« Reply #3 on: October 09, 2002, 12:25:05 AM »
I have tried the grep, but I get nothing.
It's really like the dyndns.org updater is not functioning at all!?!

Is there any way I can find out if it is running.

It sounds stupid but If I'd know how to run the update manually I could make a script and run it from cron.hourly.

This would fix the problem for me. I'm just using e-smith as a webmail system ( and a pretty good one ) so if it is unreachable for an hour it would be no problem.

Jason Slater

Re: Dynamic-DNS
« Reply #4 on: October 09, 2002, 12:09:26 PM »
I think I found the solution to my problem: ddclient.  It's available as an RPM and was fairly easy to install and configure and it already seems to have worked.

My guess as to why it's not working with the e-smith software would have something to do with their NIC2 protocol - maybe in a future update?

Anyways, here's the link:

http://clients.dyndns.org/unix.php?service=dyndns

Choose the Linux/Unix clients and it's right at the top.

Hope this helps.

Pete

Re: Dynamic-DNS
« Reply #5 on: October 12, 2002, 02:22:56 PM »
I installed ddclient, configured ddclient.conf.

when I try ddclient it returns me the error : Skipping host: address: 'login' is an invalid option.

I'ts probably me. I find the conf file quite hard to understand. It's not too clear what needs to be set and what not.

I really need some help to make this thing work.

Jason Slater

Re: Dynamic-DNS
« Reply #6 on: October 13, 2002, 11:11:02 AM »
Did you take the comments out in the appropriate places?

Maybe if you cut-and-paste your conf file in a message I could take a look at it for you (change usernames and passwords, of course).

I'm not sure what else I can offer.

Tom Docking

Re: Dynamic-DNS
« Reply #7 on: October 14, 2002, 06:43:46 AM »
I concur with Jason's recommendation of ddclient.

Not only is it easier to tweak the config files, but you can also update multiple domains at the same time. (including "My Custom DNS" for yourname.com domains)

I've even got a non-dyndns.org domain being updated, all from the one client app.

Another *major* advantage, is that it can read the IP address from an ADSL modem using PPPoA, such as the Alcatel SpeedTouch Pro issued by Telstra down here in Oz.

pete

Re: Dynamic-DNS
« Reply #8 on: October 14, 2002, 02:28:39 PM »
Hi,

Since I've installed ddclient it keeps on sending messages to my admin mailbox with the following contents:

WARNING:  skipping host: Address: 'login=' is an invalid login.
WARNING:  null password specified for host (bypassing.
WARNING:  skipping update of pdcq.dyndns.org from 213.224.83.131 to
213.224.83.35.
WARNING:   last updated Sat Oct 12 12:03:44 2002.
WARNING:   Wait at least 30 seconds between update attempts.

The funny thing is that this 213.224.83.85 isn't even the IP address of the eth1 ( the network card connected to my ISP )settings.

Here is the contents of the config file:


######################################################################
##
## Define default global variables with lines like:
##      var=value [, var=value]*
## These values will be used for each following host unless overridden
## with a local variable definition.
##
## Define local variables for one or more hosts with:
##      var=value [, var=value]* host.and.domain[,host2.and.domain...]
##
## Lines can be continued on the following line by ending the line
## with a \
##
######################################################################
daemon=300                                      # check every 300 seconds
syslog=yes                                      # log update msgs to syslog
mail=root                                       # mail update msgs to root
pid=/var/run/ddclient.pid                       # record PID in file.
#
#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
#use=netgear-rt3xx,          fw=192.168.0.1:80          # via Netgear's internet
 FW
#use=linksys,                fw=192.168.1.1:80          # via Linksys's internet
 FW
#use=maxgate-ugate3x00,      fw=192.168.0.1:80          # via MaxGate's UGATE-3x
00  FW
#use=elsa-lancom-dsl10,      fw=10.0.0.254:80           # via ELSA LanCom DSL/10
 DSL Router
#use=elsa-lancom-dsl10-ch01, fw=10.0.0.254:80           # via ELSA LanCom DSL/10
 DSL Router
#use=elsa-lancom-dsl10-ch02, fw=10.0.0.254:80           # via ELSA LanCom DSL/10
 DSL Router
#use=alcatel-stp,            fw=10.0.0.138:80           # via Alcatel Speed Touc
h Pro
#use=xsense-aero,            fw=192.168.1.1:80          # via Xsense Aero Router
#fw-login=admin,             fw-password=XXXXXX         # FW login and password
#
## To obtain an IP address from FW status page (using fw-login, fw-password)
#use=fw, fw=192.168.1.254/status.htm, fw-skip='IP Address' # found after IP Addr
ess
#
## To obtain an IP address from Web status page (using the proxy if defined)
#use=web, web=checkip.dyndns.org/, web-skip='IP Address' # found after IP
Address
#
#use=ip,                     ip=127.0.0.1       # via static IP's
use=if,                     if=eth1            # via interfaces
#use=web                                        # via web
#
protocol=dyndns2                                # default protocol
proxy=proxy.telenet.be:8080                     # default proxy
server=members.dyndns.org                       # default server
#server=members.dyndns.org:8245                 # default server
(bypassing proxies)

login=[my dyndnslogin]                             # default login
password=[my dyndnspasswd]                                       # default password
#mx=mx.for.your.host                            # default MX
#backupmx=yes|no                                # host is primary MX?
#wildcard=yes|no                                # add wildcard CNAME?

##
## dyndns.org dynamic addresses
##
## (supports variables: wildcard,mx,backupmx)
##
server=members.dyndns.org,              \
protocol=dyndns2                        \
[my xxxx.dyndns.org]

##
## dyndns.org static addresses
##
## (supports variables: wildcard,mx,backupmx)
##
# static=yes                            \
# server=members.dyndns.org,            \
# protocol=dyndns2                      \
# your-static-host.dyndns.org

##
##
## dyndns.org custom addresses
##
## (supports variables: wildcard,mx,backupmx)
##
# custom=yes                            \
# server=members.dyndns.org,            \
# protocol=dyndns2                      \
# your-domain.top-level,your-other-domain.top-level

##
## ZoneEdit (zoneedit.com)
##
# server=www.zoneedit.com,              \
# protocol=zoneedit1,                   \
# login=your-zoneedit-login,            \
# password=your-zoneedit-password       \
# your.any.domain,your-2nd.any.dom

##
## EasyDNS (easydns.com)
##
# server=members.easydns.com,           \
# protocol=easydns,                     \
# login=your-easydns-login,             \
# password=your-easydns-password        \
# your.any.domain,your-2nd.any.domain

##
## Hammernode (hn.org) dynamic addresses
##
# server=dup.hn.org,                    \
# protocol=hammernode1,                 \
# login=your-hn-login,                  \
# password=your-hn-password             \
# your-hn-host.hn.org,your-2nd-hn-host.hn.org

##
## dslreports.com dynamic-host monitoring
##
# server=members.dslreports.com         \
# protocol=dslreports1,                 \
# login=dslreports-login,               \
# password=dslreports-password          \
# dslreports-unique-id

Jason Slater

Re: Dynamic-DNS
« Reply #9 on: October 15, 2002, 11:18:56 AM »
I've got these lines commented out in my config:
proxy=proxy.telenet.be:8080 # default proxy
server=members.dyndns.org # default server

Other than my having the wildcard enabled my config file looks very much like yours.

Maybe your ISP has a proxy that's getting in the way somehow?

Hope this helps.

pete

Re: Dynamic-DNS
« Reply #10 on: October 15, 2002, 03:14:24 PM »
I'm going to try it but it seems odd that you comment out:
server=members.dyndns.org # default server

As this defined which dynamic dns server the script needs to connect to.

Thanks

pete

Re: Dynamic-DNS
« Reply #11 on: October 15, 2002, 04:49:46 PM »
I know my ISP doesn't allow direct web traffic and you cannot surf without configuring the proxy.

But even with the correct proxy setting I cannot get it working;

Anyway it's odd that ddclient keeps on sending mails with the error : Skipping host: address: 'login' is an invalid option.

I tried looking in the README document available on the net about ddclient but I didn't find any useful info there.

Jason Slater

Re: Dynamic-DNS
« Reply #12 on: October 15, 2002, 10:08:23 PM »
I'm not sure what to offer at this point...  Other than trying to get some info out of your ISP (do you think that ddclient is maybe trying to log into the proxy server?) I'm stumped.

David Lemstra

Re: Dynamic-DNS
« Reply #13 on: October 16, 2002, 10:01:02 AM »
I'm not exactly an expert, but I've had more success using the web status page. Try uncommenting this part instead.

>## To obtain an IP address from Web status page (using the proxy if defined)
>#use=web, web=checkip.dyndns.org/, web-skip='IP Address' # found after IP

However, I've had trouble getting it working again myself, now that I've upgraded to 5.5, but it may be worth a try.

Best of Luck!

pete

Re: Dynamic-DNS
« Reply #14 on: October 16, 2002, 02:40:34 PM »
I think I've got it working now.

When you type wrong arguments after ddclient ( like ddclient -stop ) it will generate a help list.
I printed this list and built my own ddclient.conf from scratch.

If you then start ddclient with the arguments '-daemon=0 -debug -verbose -noquiet'
at every step you can see on the terminal what he's doing.

I have been able to update the ip address manually, but how can I be shure it continues working?

do I need to add an entry in cron ?

David Lemstra

Re: Dynamic-DNS
« Reply #15 on: October 17, 2002, 11:04:07 AM »
OK, I think I've this figured out now.
I'll start from the begining.
First, this should only be nesescary for dns services not listed in the start up routine. It is also needed for custom DYNDNS service (to my knowledge, anyways).

1) from the admin terminal (not the web page), redo the setup configuration and disable all of the dyndns services (select none). reboot as required.

2)D/L the package at http://members.rogers.com/ddclient/pub/ddclient.tar.gz and unzip it.

3)As per the instructions execute the following:
  cp ddclient /usr/sbin/
We should put the ddclient.conf file into the template-custom dir instead of the suggested dir as such:
  cp sample-etc_ddclient.conf /etc/e-smith/templates-custom/ddclient.conf

4)Now edit this file.
 vi  /etc/e-smith/templates-custom/ddclient.conf
I recomend Putting a header in that reminds you to edit this in the future at this location, not at /etc/.

There are several update methods to pick from. I prefer the webcheck method, 'cause that's the first I got to work, and you need to know the least about your own setup.

5)When done with the settings, the template must be expanded so that it ends up where the system wants to see it. Do:
/sbin/e-smith/expand-template /etc/ddclient.conf
You should now have a ddclient.conf file with your edits in /etc.

6)Now we copy the redhat configuration script as per the package readme:
cp sample-etc_rc.d_init.d_ddclient /etc/rc.d/init.d/ddclient
Make sure it is executable with:
chmod a+x /etc/rc.d/init.d/ddclient

9)As per the readme execute:
/sbin/chkconfig --add ddclient

8) Now to do a simple test. Execute:
/etc/rc.d/init.d/ddclient start
Note, if you are in the init.d dir, you must do this instead:
./ddclient start
The leading 'period' is very important!
This has something to do with security and not being able to execute scripts in the current dir...
Anyways, you should see this:
Starting ddclient:                                         [   OK   ]
You can also switch "start" for "status" above to see if it is running. Or you can do
ps -A
and look for ddclient in the list.

9) Now, there is one last thing to make sure ddclient always gets started. I'm not sure if it is nesscary, though, but am pretty sure it doesn't hurt. Links have been created in all the important /etc/rc.d/rcX.d/ directories  already, except for rc7.d
(These links are run when the system switches b/w runstates.)
So add a soft link:
ln -s /etc/rc.d/init.d/ddclient /etc/rc.d/rc7.d/S66ddclient
Theoretically, these links should all be put into the custom templates dir, but i haven't yet.

Now after you reboot, you should see the following in your message log in the web panel:
Oct 17 01:09:15 e-smith ddclient: ddclient startup succeeded

This is good!

Important note about testing: The reason I couldn't verify that this was working properly was because of the way I was testing. I would log on manually to the dyndns site and change the address. Then I would reboot. Even though I saw all the good indicators above, the IP would not update. This is because ddclient compares the current address assigned with a cached copy in /etc/ddclient.cache. It NEVER looks at (and thus updates) the value I manually put on the DYNDNS site because the real IP address that the server sees never changed!
So to really test it, you need to renew your IP address (on the broadband modem) to see ddclient do an update.

Whew! I hope that all helps!

Note: I've gleaned some of this info from
http://www.e-smith.org/docs/howto/contrib/dns2go-howto.txt

David Lemstra

Re: Dynamic-DNS
« Reply #16 on: October 19, 2002, 10:39:40 PM »
Oops, on part 3) above, the command should be:
cp sample-etc_ddclient.conf /etc/e-smith/templates-custom/etc/ddclient.conf