Koozali.org: home of the SME Server

dns2go question

Scott Smith

Re: dns2go Mini-HOWTO (was: dns2go question)
« Reply #15 on: August 30, 2001, 07:52:39 PM »
Alejandro wrote:
>
> In the standard installation dns2go will report result of
> heartbeats to \var\log\messages file

I changed this to /var/log/dns2go just to make it easier to locate the dns2go logs. Messages is quite large enough imho.

> if you change default installation setting during first use
> dns2go, or you  redirected the log file in the dns2go.conf
> file the log should be stored at \root

Why? Most other programs place logs in /var/log, what would be the reason to put it in /root instead?

> there is another file showing dns2go current status and is
> stored in \var\dns2go\status.dat

I had missed that, thanks. Sidney will appreciate it, too.

Scott

Alejandro

Re: dns2go Mini-HOWTO (was: dns2go question)
« Reply #16 on: August 30, 2001, 09:25:41 PM »
Scott.
Sorry, I haven't read all of your excellent (I really mean it) mini how to,
I will proceed as you have described as soon as I get the time to learn how it works.
but my installation was done logged at server as root
I ran the rpm and named report file as oferred in first use of dns2go....so dns2go script allocate this gĀ”file in root dir.
 
you wrote: Why? Most other programs place logs in /var/log, what would be the reason to put it in /root instead?

any way I think is beter to use your procedure, I assume it replaces completely the use of any other dynamic dns service (dyndns yi and so) and starts when e-smith starts (runlevel 7)
I promisse to give it a full try as son as possible.
meanwhile I can add a new comment,
My isp is not so relyable, and my connection (wireless adsl) is lost sometimes for very short periods and sometimes not so short (about 1 hour some weekends) I have noticed that dns2go does not give up with the retries set to -1 but It does give up whe an authentication problem occurs. it ocurs sometimes even I'm sure my  auth key is wright, so I assume it is a link problem right at authentication transaction, and the client gives up tryin after that.
What could be done about this? any ideas?
I thank you a lot!
Ale.

Scott Smith

Re: dns2go Mini-HOWTO (was: dns2go question)
« Reply #17 on: August 30, 2001, 11:57:51 PM »
Alejandro

Thanks for the kind words and the explanation. Do let me know how the HOWTO works out for you.

As to DNS2GO giving up on auth errors -- this could explain what I've seen in the past 24 hours with my own system. I've not had a chance to review my logs yet, but on two occasions I've had to ssh into my system (using the last known IP address) and restart the dns2go daemon. There are always options, but I'll need to figure out some more about how dns2go works under the hood before I'll have a good idea for what those options are.

Scott

Scott Smith

Re: dns2go Mini-HOWTO (was: dns2go question)
« Reply #18 on: August 31, 2001, 03:14:20 AM »
ATTENTION!

I found a bug in the HOWTO. Actually, it is a problem in the custom script. I understood (incorrectly) that 'dns2go -r' would start the dns2go daemon if it was not already running. I had a chance to experiment more with my system today and found that is not the case. Below is the corrected custom script. I will repost the entire HOWTO in a subsequent message.


#!/bin/sh
# Description: DNS2GO by Deerfield

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

# note - these are not used by DNS2GO

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

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

# expand /etc/dns2go.conf custom template and
# start/stop/restart the dns2go daemon process

/sbin/e-smith/expand-template /etc/dns2go.conf

DNS2GO=/usr/local/bin/dns2go

STATUS=offline
grep "^pid = 0" /var/dns2go/status.dat >/dev/null 2>&1 || STATUS=online

case "$1" in
    start)      if [ $STATUS = offline ]
                then
                    $DNS2GO
                else
                    $DNS2GO -r
                fi
                ;;

    stop)       if [ $STATUS = online  ]
                then
                    $DNS2GO -k
                else
                    echo "DNS2Go by Deerfield.com is already stopped"
                fi
                ;;

    restart)    if [ $STATUS = online ]
                then
                    $DNS2GO -r
                else
                    $DNS2GO
                fi
                ;;
    *)          $DNS2GO $@ ;;
esac

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

exit 0

#EOF(custom)

Scott Smith

Re: dns2go question
« Reply #19 on: August 31, 2001, 03:15:16 AM »
Mini-HOWTO: DNS2GO Dynamic DNS Service
----------------------------------------------------------------------

Author   : J. Scott Smith
Version  : 0.1.3
Release  : 30-AUG-2001
Platform : e-smith 4.1.2
Requires : DNS2Go Linux Client 1.1
Links to : http://www.e-smith.com
           http://www.dns2go.com
      http://network-tools.com


INTRODUCTION
----------------------------------------------------------------------

This document explains how to setup the DNS2GO (http://www.dns2go.com)
to work with e-smith. It uses an e-smith custom template to build the
/etc/dns2go.conf file, which allows it to hook into the e-smith db
files. It also creates a quick and dirty dirty link in /etc/rc7.d to
make sure DNS2GO starts when the system is rebooted.

Somebody may want to make this into an RPM. Please do!

Please direct comments and questions regarding this HOWTO to one of
the e-smith (now Mitel Network Server Solutions Group) forums or
mailing lists.


INSTALLATION
----------------------------------------------------------------------

>>>>>  Step 1  <<<<<

Register your domain with DNS2GO, then download and install the DNS2GO
Linux client per the instructions from their site. Do not bother with
their configuration instructions, though, just install the package.


>>>>>  Step 2  <<<<<

Prepare the /sbin/e-smith/dynamic-dns directory.

     # cd /sbin/e-smith/dynamic-dns
     # cp custom custom-skeleton
     # mv custom dns2go


>>>>>  Step 3  <<<<<

Modify the dns2go file as follows:


#!/bin/sh
# Description: DNS2GO by Deerfield

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

# note - these are not used by DNS2GO

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

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

# expand /etc/dns2go.conf custom template and
# start/stop/restart the dns2go daemon process

/sbin/e-smith/expand-template /etc/dns2go.conf

DNS2GO=/usr/local/bin/dns2go

STATUS=offline
grep "^pid = 0" /var/dns2go/status.dat >/dev/null 2>&1 || STATUS=online

case "$1" in
    start)      if [ $STATUS = offline ]
                then
                    $DNS2GO
                else
                    $DNS2GO -r
                fi
                ;;

    stop)       if [ $STATUS = online  ]
                then
                    $DNS2GO -k
                else
                    echo "DNS2Go by Deerfield.com is already stopped"
                fi
                ;;

    restart)    if [ $STATUS = online ]
                then
                    $DNS2GO -r
                else
                    $DNS2GO
                fi
                ;;
    *)          $DNS2GO $@ ;;
esac

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

exit 0

#EOF(custom)


>>>>>  Step 4  <<<<<

Link the above custom script to 'custom' and into run level 7. This
next command will link the 'dns2go' script created above to the
'custom' name, which is what e-smith will be looking for. The script
will be run by various e-smith events as necessary.

     # ln -s /sbin/e-smith/dynamic-dns/dns2go /sbin/e-smith/dynamic-dns/custom

And the next command will link the dns2go script into run level 7 so
the DNS2GO daemon will start when the system boots:

     # ln -s /sbin/e-smith/dynamic-dns/dns2go /etc/rc.d/rc7.d/S99dns2go


>>>>>  Step 5  <<<<<

Create the file /etc/e-smith/templates-custom/etc/dns2go.conf by
copying the /etc/dns2go.conf file, which was installed in step 1. It
may be necessary to create the directory first, using the command:

     # mkdir -p /etc/e-smith/templates-custom/etc

Once/If the directory is created, copy the file using:

     # cp /etc/dns2go.conf /etc/e-smith/templates-custom/etc


>>>>>  Step 6  <<<<<

Edit the file to match the one shown below. I've marked the changed
areas with "# MOD: e-smith" (except for the header and footer comments
-- those are kinda obvious!)


#------------------------------------------------------------
# DO NOT MODIFY THIS FILE! It is updated automatically by the
# e-smith server and gateway software. Instead, modify the source
# template in the /etc/e-smith/templates directory. For more
# information, see http://www.e-smith.org.
#
# copyright (C) 1999, 2000 e-smith, inc.
#------------------------------------------------------------
#
# Simple configuration file for DNS2Go linux client
#
# For more information refer to the dns2go.conf manual page

#
# GLOBAL DIRECTIVES
#
# DNS2Go Server
server = discovery.dns2go.com

# Key (required, case-sensitive)
# MOD: e-smith
key = {$DynDnsPassword}

# log file (optional, default: syslog)
# MOD: e-smith
log = /var/log/dns2go

# number of connection attempts (optional, default: 8)
# MOD: e-smith
# -1: never give up, retry forever
retries = -1

# rate to send heartbeats (in minutes) (optional, default: 0=automatic)
#heartbeat-rate = 0

#
# DOMAIN DIRECTIVES
#
# Fully qualified domain name (required)
# MOD: e-smith
domain = {$DynDnsAccount}

# static IP address (optional, default: external IP address)
#address=0.0.0.0

# online www alias redirection: choose one of the following:
# (optional, default: www alias resolves to domain IP)
#www-redirect-url = http://...
#www-redirect-port = 8080

# offline redirect option: choose one of the following
# (optional, default: offline status page)
#offline-url = http://...
#offline-ip  = 0.0.0.0

#------------------------------------------------------------
# TEMPLATE END
#------------------------------------------------------------


You may also want to change some of the other settings such as the
online/offline www alias redirection, etc. Please see the DNS2GO
documentation and/or web site for details about other settings. For
our purposes, though, we are only concerned with the DNS2GO domain and
key (which, as you may have guessed, we are mapping to the e-smith
DynDnsAccount and DynDnsPassword entries.)

Thanks to Alejandro for the tip on the retries option. By setting this
value to -1, the dns2go daemon is instructed to retry forever (ie,
never give up trying) to reconnect to the DNS2GO service. This is
useful if you have an unreliable connection (pppoe, adsl, cable, etc.)


>>>>>  Step 7  <<<<<

Use the console interface to configure Dynamic DNS. Select the
"custom" option. You just created the script for this type of dyndns
service in step 2 above.

Enter the name of your DNS2GO domain as the DNS account. For example,
if your domain is "johndoe.dns2go.com" then enter this. If you are
hosting a primary domain, such as mydomain.com, with DNS2GO then enter
that domain here. Do not include prefixes such as www.

Enter the DNS2GO key, which was emailed to you when you signed up for
the service, as the DNS password. Remember that the key is case
sensitive and must be entered exactly as it was sent to you.

Complete the console setup and reboot the server.


>>>>>  Step 8  <<<<<

To complete the installation, simply test your domain. (Unsolicited
plug: I use the Network-Tools (http://network-tools.com) site for this
type of thing, which makes it easy to check out your (or any) system.)
Run a ping test to your domain, for example "johndoe.dns2go.com", and
also to your www alias, such as "www.johndoe.dns2go.com".


CONCLUSION
----------------------------------------------------------------------

DNS2GO is a nice service in that their daemon takes care of the
details of figuring out the IP address, contacting the DNS host, etc.
In fact, you can run DNS2GO without taking all the steps outlined
above. You could just do this:

1. Install and configure DNS2GO.
2. Add this command to /etc/rc.local:  /usr/local/bin/dns2go -r

That will force the daemon to start when the system is booted, which
takes care of the rest of the details. But, having the integration
with the templates is nice as it ensures the daemon is restarted
whenever e-smith makes changes that might affect DNS.

BTW, one of the nice features of DNS2GO is the way it handles multiple
domains. Say for instance that you have setup "domain1.d2g.com" and
"domain2.d2g.com". Using the DNS2GO control center, you can specify
these domains to be grouped. Now, when the dns2go daemon updates any
one domain in the group, all of the others are updated. Very nice!


WISH LIST
----------------------------------------------------------------------

The Dynamic DNS support in e-smith needs to be modularized. This would
make it easier (IMHO) to add/modify dyndns providers to the system.
Each provider could have their own set of options, so for example the
DNS2GO module could provide fields for the retries, online/offline web
aliasing, etc.

Someday :-)


THE END
----------------------------------------------------------------------

Uh-hum. I already told you, this is the end!

Al Church

Re: dns2go question
« Reply #20 on: September 24, 2001, 01:37:19 AM »
This has been a great thread. Thanks for all of this information. I was having the same problems that Sydney was having, and you addressed those. I have a new problem, however.

Steps one through six go fine. I go to step seven to record my Dns2Go accound and Key in the console interface. For teh life of me, I can;t find the Dyname DNS section. I've looked in the text based console and the web based interface. Did I do something wrong somewhere? or am I using the "wrong" console interface?

Thanks.

Al

Al Church

Re: dns2go question
« Reply #21 on: September 24, 2001, 01:43:44 AM »
This has been a great thread. Thanks for all of this information. I was having the same problems that Sydney was having, and you addressed those. I have a new problem, however.

Steps one through six go fine. I go to step seven to record my Dns2Go accound and Key in the console interface. For teh life of me, I can;t find the Dyname DNS section. I've looked in the text based console and the web based interface. Did I do something wrong somewhere? or am I using the "wrong" console interface?

Thanks.

Al

Ruusvuu

Re: dns2go question
« Reply #22 on: September 24, 2001, 07:10:19 AM »
Wow!  Are you guys trying to set up the client software on e-smith?
I never thought of that, but it sounds like a major hassle.
Maybe there's something I am missing, but it works great on my Win2k client.
The only drawback is that I must register each domain once every 60 days to keep the account(s) active.  

Does the subject of this thread prevent you from having to do that?

Thanks

Scott Smith

Re: dns2go question
« Reply #23 on: September 24, 2001, 06:00:53 PM »
Ruusvuu wrote:
>
> Wow!  Are you guys trying to set up the client software on
> e-smith?

Not trying -- done. And it works great.

> I never thought of that, but it sounds like a major hassle.

Not all that difficult. Check the howto on e-smith.org.

> Maybe there's something I am missing, but it works great on
> my Win2k client.

I ran the client for quite some time on a Windows server, but that is also where my web, ftp, and mail servers were running. Never had much problem with it, but once I switched to e-smith for those services it became necessary to have DNS2Go pointing to the e-smith server, not the Windows server.

> The only drawback is that I must register each domain once
> every 60 days to keep the account(s) active.
>
> Does the subject of this thread prevent you from having to do
> that?

I've never had that issue, with either the Windows or Linux clients, so I can't help you there.

However, there are a number of advantages to having DNS2Go running on the e-smith server. Unless you are running e-smith as a firewall only and not using any of the services, or unless you're determined to port forward from the Windows box back to e-smith, you really need DNS2Go pointed at the e-smith box and the dns2go Linux daemon running on e-smith. The other big advantage is that since I've put the daemon on Linux, I've never given it a second thought. It just works. Survives reboots, the cablemodem power getting unplugged, the feed to the hub getting cut, etc.

Scott

Scott Smith

Re: dns2go question
« Reply #24 on: September 24, 2001, 06:12:03 PM »
Al Church wrote:
>
> This has been a great thread. Thanks for all of this
> information.

You're welcome!

> I was having the same problems that Sydney was
> having, and you addressed those. I have a new problem, however.
>
> Steps one through six go fine. I go to step seven to record
> my Dns2Go accound and Key in the console interface. For teh
> life of me, I can;t find the Dyname DNS section. I've looked
> in the text based console and the web based interface. Did I
> do something wrong somewhere? or am I using the "wrong"
> console interface?

It is in the text console, the one you get when you login as admin (or that displays always on the console, if that is the mode you've selected.)

The console (this is 4.1.2) only branches into the Dynamic DNS screens if you've selected server and gateway mode, dedicated or dial-up connection, and in the case of dedicated it is only an option if you do not select the static IP option.

Scott

Al Church

Re: dns2go question
« Reply #25 on: September 24, 2001, 08:50:56 PM »
Thanks Scott.

 Scott Smith wrote:

> The console (this is 4.1.2) only branches into the Dynamic
> DNS screens if you've selected server and gateway mode,
> dedicated or dial-up connection, and in the case of dedicated
> it is only an option if you do not select the static IP option.


I just happen to have my box configured as SErver/Gateway, Dedicated AND Static IP. Is there anything I can do to get around that?

al

Scott Smith

Re: dns2go question
« Reply #26 on: September 24, 2001, 09:46:21 PM »
Al Church wrote:
>
> I just happen to have my box configured as SErver/Gateway,
> Dedicated AND Static IP. Is there anything I can do to get
> around that?

Off the top of my head I'd say it is possible, but I hesitate to guess whether it is easy or not. Some templates are expanded based on specific settings, whether that setting applies to the current mode or not, and others check the mode first. Sometimes you can use the db command to set a property and it will be applied, and sometimes that doesn't work. So you'd have to examine all the related templates (or do the trial and error thing) to see what works and what doesn't.

May I suggest that since you have a static IP it might be easier to go to somebody like Go-Daddy (www.godaddy.com) and register a domain name for $8.95/year. You could then point your domain directly to your static IP.

BTW, for those following this thread, one of the free services that DNS2Go offers is the ability to point your registered domain name (ie, yourdomain.com) to your dynamic IP address.

Scott

Al Church

Re: dns2go question
« Reply #27 on: September 25, 2001, 04:17:52 AM »
OK.
I'll take all of this into account. I do have everything working without setting up the username and Key # in the dynamic DNS console. What I did was just ran the dns2go client from a Windows machine from behind the firewall. I set the account up so that when it thinks I'm offline it points to my esmith box. It detected my firewall as the IP adress anyway. The email, ftp, telnet, and web services all work using the dns2go adress.

Ruusvuu, Thanks for the tip.
Scott thanks a lot for the excellent help!!

al

Dan Davis

Re: dns2go question
« Reply #28 on: November 17, 2001, 08:34:12 AM »
Hi, Scott.

I've been doing searches on "dynamic DNS" and came across this thread. I'm a server-newbie with a decent handle on *nix commands and structure, but I'm branching from PC tech work into possibly setting up small business networks using Business DSL lines.

I signed up for dynamic DNS service for myself, with www.dyndns.org... I know this thread has been about DNS2go, but your the closest person I've found to having solid knowledge of e-smith in general.

My network is on an aDSL residential line, with a Netgear RT314 gateway router set up to be a DHCP server to a mixed bag of client PCs (OS X, Win2K, WinXPPro, Mandrake 8.1). As such, I ran setup on my e-smith box as Server Only, thinking that the NAT "firewall" and DHCP server should continue to be provided by the Netgear.

Of course, setting up the server as "Server Only" totally blew by any options for setting up a Dynamic DNS service.

Would I be better off NOT using the Netgear for DHCP services and firewall? My main concern was that the router would not crash, not have a hard drive failure, not require backups... I'm showing uptime of 392 days on this thing right now! Battery backup with that little router can keep running for a day versus about 20 minutes with the e-smith server...

Aside from this problem, I'm finding much to like about this distribution! Great manual, easy install, perfect device detection (funny, it did better than RedHat 7.2 did!), and the price is right, though I'd probably sell a client on the supported version from Mytel. After I get through this problem, it's on to tackle TWIG installation...  ;)

Thanks for any help you may have for me.
Dan