Index of /linux/perl

Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - [   ] tzoperl-1.6-2.i386.rpm 17-Aug-2000 01:00 8.9K [   ] tzoperl-1.6-2.src.rpm 23-Oct-2000 01:00 9.6K [   ] tzoperl-1.6.tar.gz 17-Aug-2000 01:00 6.6K [   ] tzov2x.tar.gz 22-Oct-2003 16:24 32K
-tzoperl-1.6.pl 

README for tzoperl 1.6 Release 2 Supporting Script for TZO DDNS (08/17/2000)

Changes....

tzoperl.pl works with perl sockets to communicate with the TZO DDNS
servers so it should work on most flavours of *nix with perl5. No more
lynx dependencies!

Also, there is an included daemon "update.pl" which will monitor your
ip address on your local machine or it can monitor the ip address of
a gateway, router or firewall and update the TZO DDNS servers if it changes.
Make sure to specify the proper settings in the "/etc/tzopl.conf" file. 

What is TZO?

TZO offers Domain Registration Services and Dynamic Domain 
Registration Service (Official Registrar), SMTP Mail 
Store and Forward, and Web Hosting options for users with 
Static or Dynamic IP Addresses(you can host multiple virtual 
domains with your one IP Address). TZO also allows for DNS 
Hosting/Parking Services for Cable and DSL users as well as 
standard ethernet and PPP. Host Private Domains on your Linux
Server with a Dynamic IP Address. Private Domains are less
that $60 per year if your domain is already registered! 
Ask about our relay options! mailto:<support@tzo.com>.

Basic Install
Technical Level Needed  3  (beg. 1-10 adv.) 

#########( If you are using RPM (Redhat Pachage Manager )############

 
RPM Installed Directory's and Files

 #- Install tzoperl-1.6-2.i386.rpm -#

/etc/
	tzopl.conf
	
/usr/bin/
         tzoperl-1.6.pl
         update.pl
         tzopl.pm
                    	 	
/usr/doc/tzoperl-1.6/
                     README.txt
				 README.rc

############ Install from tzoperl-1.6.tar.gz ################

Copy tzoperl-1.6.tar.gz into prefered area
like...
/usr/local/

tar -xzvf  tzoperl-1.6.tar.gz

/usr/local/tzoperl-1.6/
              	tzoperl-1.6.pl
         		update.pl
        		tzopl.pm
               README.perl
			README.rc
			
Copy the files into the designated directories...

/etc/
	tzopl.conf
	
/usr/bin/
         tzoperl-1.6.pl
         update.pl
         tzopl.pm
                    	 	
/usr/doc/tzoperl-1.6/
                     README.txt
				 README.rc

 - ToDo Checklist

1). Make sure that tzoperl.pl, update.pl and tzopl.pm are in "/usr/bin/" and
	tzoperl.pl and update.pl need to be executable. (chmod 755) as root.  
2). Make sure you have rights to execute those files 
3). Make sure you have a TZO Account already (Free Trial or Full Account)
4). If you do not have an account, you can signup at http://www.tzo.com/ 
	and go to webclient and a KEY will be emailed to you, or simply send
	an email message to mailto:<tzoklin.signup@tzo.com>
5). Edit /etc/tzopl.conf to include Your TZO Information, connect to 
	the Internet, and run the tzoperl-1.6.pl Script.

See Below for Detailed instructions. 


     File to edit "/etc/tzopl.conf".

#############################
#
# File:/etc/tzopl.conf
#
#		** EXAMPLES **
#
#	specify the interface - eg. eth0, eth1, ppp0, dhcp
#	$interface = "eth0";
#
#	insert your email address
#	$TZOEMAIL = 'user@domain.com';
#
# 	insert your domain name
#	$TZONAME = "domain.com"; ( or - "name.domain.com";)
#
# 	insert your TZO key
#	$TZOKEY = "XXXXXXXXXXXXXXXX";
#
# 	select your connection type
#
#	$CTYPE = "3";
#
#		CTYPE (Connection Types)
#   		1   Dial-up Modem
#   		2   Cable Modem
#   		3   LAN (Local Area Network)
#   		4   ADSL, HDSL, xDSL
#   		5   America Online Dial-up
#   		6   Other Connection Type
#   		7   Static IP Address
#

# Are you going through a Gateway? (e.g. Firewall, NAT, 
# Linksys Cable/DSL Router) Selecting "Yes" will pass 
# a null IP Address for the Network Adaptor, thus posting
# the Gateway address. Selecting "No" will pass the 
# Network adaptors address regardless of a Gateway. 
# Yes = 1 No = 0

$gateway = "0";

# Current IP Address log file
# Put this where ever you want.

$iplog = "/var/log/tzoip.log";

# * This is only for use if you are using the update.pl daemon *
# Specify how often to check for an IP Address change
# This will work on gateways as well.
#
#	"1-min"
#	"2-min"
#	"5-min"
#	"10-min"
#	"30-min"
#	"1-hour"
#	"2-hours"
#	"8-hours"
#	"24-hours"
#	"2-days"
#	"Never"

$checkip = "10-min";

# Log File of all Signons
# Put this where ever you want

$usage = "/var/log/tzousage.log";

# Log PID form UpDate Daemon
$tzopid = "/var/run/tzoupdate.pid";

# valid ports to use - '80' & '21333'. If you are going through a 
# squid proxy you probaly want to use port '21333'.

$hstport = '80';

###################################

--- Command line Options and Flags

--- Options
 -o             : signon to TZO
 -f             : signoff to TZO


--- Flags

 -h             : give usage.
 -v             : give some informative output.
 -e <TZO email> : specify TZO email (default: $TZOEMAIL)
 -n <TZO name>  : specify TZO name (default: $TZONAME)
 -k <TZO key>   : specify your TZO key (default: $TZOKEY)
 -i <interface> : get ip address from <interface>
 -I <ipaddress> : use <ipaddress>
 -c <ctype>     : specify connection type (default: $CTYPE)

 CTYPE (Connection Types)
   1   Dial-up Modem
   2   Cable Modem
   3   LAN (Local Area Network)
   4   ADSL, HDSL, xDSL
   5   America Online Dial-up
   6   Other Connection Type
   7   Static IP Address

********************

Now to activate the service run the following commands from the console

% tzoperl-1.6.pl -o # this signs on your domain with no output
% tzoperl-1.6.pl -o -v # this signs on your domain with output


% tzoperl-1.6.pl -f # this signs off your domain with no output
% tzoperl-1.6.pl -f -v # this signs off your domain with output

To run the daemon for the TZO DDNS

% update.pl


################################

This is a sample of how to have TZO run as a service
or run level under linux when ever a system or run level
is restarted. 

copy area specified into a file called "tzo"
into /etc/rc.d/init.d/tzo
Make it executable

#################################
#
# File:/etc/rc.d/init.d/tzo

# Source function library.
. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
 start)
	echo -n "Starting TZO DDNS: "
	daemon /usr/bin/update.pl
	echo
	touch /var/run/tzoupdate.pid
	;;
  stop)

	echo -n "Shutting down TZO DDNS: "
	killproc perl 
	echo
	rm -f /var/run/tzoupdate.pid
	;;
  *)
	echo "Usage: $0 {start|stop}"
	exit 1
esac

exit 0
#
################################

These are symbolic links that need to be created

# Symbolic Links for different run levels
				
/etc/rc.d/rc2.d/
				K32tzo -> /etc/rc.d/init.d/tzo
				S62tzo -> /etc/rc.d/init.d/tzo
/etc/rc.d/rc3.d/
				K32tzo -> /etc/rc.d/init.d/tzo
				S62tzo -> /etc/rc.d/init.d/tzo
/etc/rc.d/rc4.d/
				K32tzo -> /etc/rc.d/init.d/tzo				
				S62tzo -> /etc/rc.d/init.d/tzo
/etc/rc.d/rc5.d/
				K32tzo -> /etc/rc.d/init.d/tzo
				S62tzo -> /etc/rc.d/init.d/tzo
/etc/rc.d/rc6.d/
				K32tzo -> /etc/rc.d/init.d/tzo
				S62tzo -> /etc/rc.d/init.d/tzo
				
################################

 Any Qustions, Comments or new ways of using TZO in different Linux 
 Versions. please mailto:<support@tzo.com> 
 
##