Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: Dennis on November 05, 2003, 03:10:10 AM

Title: dynamic dns update
Post by: Dennis on November 05, 2003, 03:10:10 AM
I need to know how to update dynamic dns automaticly on sme 6.0b3.
My knowledge of linux is a bit basic on how to do that.
Title: Re: dynamic dns update
Post by: Dan Brown on November 05, 2003, 04:50:11 AM
1.  Use a supported dynamic DNS service (dyndns.org, dyndns.com, tzo.com, yi.org).

2.  Configure the system with the requested information when going through the console configuration program.
Title: Re: dynamic dns update
Post by: Charlie on November 05, 2003, 06:00:29 AM
I got zoneedit to work without much pain. Let me know if you need help and I'll post what I did.
Title: Re: dynamic dns update
Post by: Rolando Proenza on November 06, 2003, 01:50:16 AM
Yes I am interested in ZoneEdit !
Let me know how to!
Regards
Roland
Title: Re: dynamic dns update
Post by: Charlie on November 06, 2003, 08:46:20 PM
It is pretty easy. In the setup routine choose dynamic-dns and specify "custom". Put in your login and password.
If using < SME6 edit /sbin/e-smith/dynamic-dns/custom with the text listed below, edited with your account info. If you are using SME6 you must create the custom file with your favorite text editor. Make sure you give it the same rights as the other files in that directory.

Output of my 'custom' file:
____________________________________________
#!/bin/sh
# Description: Put your description here

#------------------------------------------------------------
# Custom dynamic DNS update handler.
#------------------------------------------------------------

IPADDR=$1
USERID=$2
PASSWD=$3
DOMAIN=$4

#------------------------------------------------------------
# Your handler starts here.
#------------------------------------------------------------

# fill this in...
wget -O - --http-user=$USERID --http-passwd=$PASSWD 'http://dynamic.zoneedit.com/auth/dynamic.html?host=my-domain1.com'
wget -O - --http-user=$USERID --http-passwd=$PASSWD 'http://dynamic.zoneedit.com/auth/dynamic.html?host=mydomain2.com'

#------------------------------------------------------------
# Your handler ends here.


#------------------------------------------------------------

exit 0
____________________________________--
end of my file

If you update server domains with different passwords you can change $USERID to the actural username.
Title: Re: dynamic dns update
Post by: Dan Brown on November 07, 2003, 02:25:59 AM
Charlie, that looks good, but there doesn't seem to be any handling of error conditions.  Does zoneedit return any, and/or are they documented?
Title: Re: dynamic dns update
Post by: Dan Brown on November 08, 2003, 01:35:48 AM
I've taken this and worked with it a bit, and I think this is an improvement:

#!/bin/sh
# Description: www.zoneedit.com (free service)

#------------------------------------------------------------
# dyndns.org dynamic DNS update handler.
#------------------------------------------------------------

IPADDR=$1
USERID=$2
PASSWD=$3
DOMAIN=$4

# This request will update only the primary domain name.  It is
# assumed that you have any desired hostnames (or a wildcard),
# as well as any virtual domains, set as a CNAME (alias) to
# the primary domain name.

wget -q -O /tmp/zoneedit.log \
--http-user=$USERID \
--http-passwd=$PASSWD \
https://dynamic.zoneedit.com/auth/dynamic.html?host=$DOMAIN

logger -t zoneedit.com cat /tmp/zoneedit.log

exit 0
--
As I see it, this improves in a few ways:

1.  There's only one request sent, reducing bandwidth, overhead, etc.
2.  The request is sent via SSL for greater security.
3.  The results of the request are logged to /var/log/messages to assist in troubleshooting.

I'll probably work at rolling this into an RPM shortly.
Title: Re: dynamic dns update
Post by: Mizou on November 08, 2003, 03:42:32 AM
Hi Dan,

Re:__________________________________________________
# This request will update only the primary domain name. It is
# assumed that you have any desired hostnames (or a wildcard),
# as well as any virtual domains, set as a CNAME (alias) to
# the primary domain name.
______________________________________________________
mydomain.com.au gets updated, but my www.mydomain.com.au or other vituals don't get updated.
I searched the forum regarding CNAME and couldn't find much help. Could you please elaborate or point me to info on settting up the cname.

Thanks

Mizou
Title: Re: dynamic dns update
Post by: Dan Brown on November 08, 2003, 03:51:55 AM
The cname is something you set up on zoneedit; it's one of the screens you can edit when you're editing the zone (along with other screens like IP address, mail exchanger, etc.).  Recommended usage is to set up an IP address for mydomain.com, and an alias for *.mydomain.com (or, if you prefer, any individual hostnames you want to use) to mydomain.com.
Title: Re: dynamic dns update
Post by: Jim Darrough on November 13, 2003, 07:58:16 AM
Hello.
     I registered a new domain and signed up for Zoneedit. Can someone advise me how I might make my home e-smith 5.5 system available via the internet for webmail? I am not really interested in hosting anything via my connection (24k if I'm lucky), just being able to get to the webmail from outside.

     How do I set the server to poll for and send the latest ip address each time it calls the isp? Should I set the new domain as the e-smith server's domain?

    Where can I read about these items?

Thanks, Jim Darrough
Title: Re: dynamic dns update
Post by: Jim Darrough on November 14, 2003, 12:49:22 AM
Hello Charlie.


     I have set up a new domain, and signed up with Zoneedit. I used "dynip" with my XP box through my e-smith 5.5 server to attain and send my ip to Zoneedit.com, which worked well, and I was able to log onto my webmail server with no problems (except it's slloooowwww because of my 24k dialup service). Now, what do I need to do to set up a program for e-smith such that it will obtain my "current" ip from the isp and transmit it to Zoneedit?

     In your message, you said

"... In the setup routine choose dynamic-dns
> and specify "custom". Put in your login and password.

I a
m using e-smith 5.5 so do I go to the configuration menu for the server or does your statement refer to Zoneedit.com?

> If using < SME6 edit /sbin/e-smith/dynamic-
dns/custom with
> the text listed below, edited with your account info. If you
> are using SME6 you must create the custom file with your
> favorite text editor. Make sure you give it the same rights
> as the other files in that directory.
>
> Output of my 'custom' file:
> ____________________________________________
> #!/bin/sh
> # Description: Put your description here
>
> #------------------------------------------------------------
> # Custom dynamic DNS update handler.
> #------------------------------------------------------------
>
> IPADDR=$1
> USERID=$2
> PASSWD=$3
> DOMAIN=$4
>
> #------------------------------------------------------------
> # Your handler starts here.
> #------------------------------------------------------------
>
> # fill this in...
> wget -O - --http-user=$USERID --http-passwd=$PASSWD
>
I assume that wherever I see "$USERID" I should use my user id for zoneedit. Does it need to be in quotes? Can I just assign myuserid to $USERID somewhere above? Same for the others, right?

 'http://dynamic.zoneedit.com/auth/dynamic.html?host=my-domain1.com'
> wget -O - --http-user=$USERID --http-passwd=$PASSWD
> 'http://dynamic.zoneedit.com/auth/dynamic.html?host=mydomain2.com'
>
> #------------------------------------------------------------
> # Your handler ends here.
>
>
> #------------------------------------------------------------
>
> exit 0
> ____________________________________--
> end of my file
>
> If you update server domains with different passwords you can
> change $USERID to the actural username.

Thanks, Jim Darrough