Monday, May 05, 2008

ez-ipupdate configuration

http://leaf.sourceforge.net/doc/bucu-ezipupd.html

it works on my ubuntu system ...
as this manual says, default interval is 1800s.  enough~

Chapter 3. ez-ipupdate configuration

Revision History
Revision 0.1 2001-05-20JN
Initial document
Revision 0.22004-02-11kp
Update for Bering-uClibc
Revision 0.32005-02-06kp
Add necessary changes for shorewall

About ez-ipupdate

What is ez-ipupdate?

Ez-ipupdate is a small utility for updating your host name IP for any of the dynamic DNS service offered at:

This package has been developed & is supported by Angus Mackay.

The key features are: support for multiple service types and updating your IP address if it changes.

Feedback

Comment on the LEAF package can be sent to the authors.

Declare the ezipupd.lrp package

Download the ezipupd.lrp package and copy the package to your Bering-uClibc diskette.

Boot a Bering-uClibc floppy image. Once the LEAF menu appears get access to the linux shell by (q)uitting the menu. Edit the lrpkg.cfg (pre Bering-uClibc-2.2.0) or leaf.cfg (Bering-uClibc-2.2.0 onwards) file and add ezipupd.lrp in the list of packages to be loaded at boot. Check the Bering-uClibc Installation Guide to learn how to do that.

Configuring ez-ipupdate

You can edit the ez-ipupdate configuration file through the package configuration menu:

                        ez-ipupd configuration files

1) configuration file
2) startup script

q) quit
----------------------------------------------------------------------------
Selection:

The parameters allowed in the configuration file are the followings:

  address		usage: address=[ip address]
cache-file usage: cache-file=[cache file]
cloak-title usage: cloak-title=[title]
daemon usage: daemon=[command]
execute usage: execute=[shell command]
debug usage: debug
foreground usage: foreground
pid-file usage: pid-file=[file]
host usage: host=[host]
interface usage: interface=[interface]
mx usage: mx=[mail exchanger]
max-interval usage: max-interval=[number of seconds between updates]
notify-email usage: notify-email=[address to email if bad things happen]
offline usage: offline
retrys usage: retrys=[number of trys]
server usage: server=[server name]
service-type usage: service-type=[service type]
timeout usage: timeout=[sec.millisec]
resolv-period usage: resolv-period=[time between failed resolve attempts]
period usage: period=[time between update attempts]
url usage: url=[url]
user usage: user=[user name][:password]
run-as-user usage: run-as-user=[user]
run-as-euser usage: run-as-euser=[user] (this is not secure)
wildcard usage: wildcard
quiet usage: quiet
connection-type usage: connection-type=[connection type]
request usage: request=[request uri]
partner usage: partner=[easydns partner]

Here is how it could look like:

service-type=zoneedit
user=myname:mypassword
interface=eth0
host=mydomain.com
#notify-email=john.doe@mydomain.com
# other options:
#address=<ip address>
#cache-file=/tmp/ez-ipup
#daemon
#debug
#foreground
#host=<host>
#interface=<interface>
#mx=<mail exchanger>
#retrys=<number of trys>
#run-as-user=<user>
#run-as-euser=<user>
#server=<server name>
#timeout=<sec.millisec>
#max-interval=<time in seconds>
#notify-email=<email address>
#period=<time between update attempts>
#url=<url>

The four most important entries for a typical LEAF Bering-uClibc installation will be explained below:

  • service-type - make shure to add the according service-type. See above the list of available services.

  • user - here you have to provide your username and password for the choosen service seperated by a colon.

  • interface - this defines your interface to the internet - the one which is changing from time to time and whose ip should be changed at your dynamic DNS service (usually eth0 or ppp0)

  • host - the host(s) you like to have been updated. It is possible to update more than one host for a service-type. To allow that, add all your hosts separated by a comma.

Please note: The options cache-file and daemon aren't needed. notify-email doesn't work today.

You can also run ez-ipupdate in interractive mode. The commands are:

 null ezip pgpow dhs dyndns dyndns-static dyndns-custom ods
tzo easydns easydns-partner gnudip justlinux dyns hn zoneedit
heipv6tb
usage: ez-ipupdate [options]

Options are:
-a, --address <ip address> string to send as your ip address
-b, --cache-file <file> file to use for caching the ipaddress
-c, --config-file <file> configuration file, almost all arguments can be
given with: <name>[=<value>]
to see a list of possible config commands
try "echo help | ez-ipupdate -c -"
-d, --daemon run as a daemon periodicly updating if
necessary
-e, --execute <command> shell command to execute after a successful
update
-f, --foreground when running as a daemon run in the foreground
-F, --pidfile <file> use <file> as a pid file
-g, --request-uri <uri> URI to send updates to
-h, --host <host> string to send as host parameter
-i, --interface <iface> which interface to use
-L, --cloak_title <host> some stupid thing for DHS only
-m, --mx <mail exchange> string to send as your mail exchange
-M, --max-interval <# of sec> max time in between updates
-N, --notify-email <email> address to send mail to if bad things happen
-o, --offline set to off line mode
-p, --resolv-period <sec> period to check IP if it can't be resolved
-P, --period <# of sec> period to check IP in daemon
mode (default: 1800 seconds)
-q, --quiet be quiet
-r, --retrys <num> number of trys (default: 1)
-R, --run-as-user <user> change to <user> for running, be ware
that this can cause problems with handeling
SIGHUP properly if that user can't read the
config file. also it can't write it's pid file
to a root directory
-Q, --run-as-euser <user> change to effective <user> for running,
this is NOT secure but it does solve the
problems with run-as-user and config files and
pid files.
-s, --server <server[:port]> the server to connect to
-S, --service-type <server> the type of service that you are using
try one of: null ezip pgpow dhs
dyndns dyndns-static dyndns-custom
ods tzo easydns easydns-partner
gnudip justlinux dyns hn zoneedit
heipv6tb
-t, --timeout <sec.millisec> the amount of time to wait on I/O
-T, --connection-type <num> number sent to TZO as your connection
type (default: 1)
-U, --url <url> string to send as the url parameter
-u, --user <user[:passwd]> user ID and password, if either is left blank
they will be prompted for
-w, --wildcard set your domain to have a wildcard alias
-z, --partner <partner> specify easyDNS partner (for easydns-partner
services)
--help display this help and exit
--version output version information and exit
--credits print the credits and exit
--signalhelp print help about signals

Using ez-ipupdate

Through dhclient exit-hook script

reload_all() {
/sbin/shorewall restart
echo "Starting ez-ipupd from dhclient ..."
/etc/init.d/ez-ipupd start

}

Through ppp /etc/ppp/ip-up script

All you need is to add the command /etc/init.d/ez-ipupd -start to /etc/ppp/ip-up.

# Main Script starts here
#
/etc/init.d/ez-ipupd start

run-parts /etc/ppp/ip-up.d
[ -x /bin/beep ] && /bin/beep -f 600 -n -f 900 -n -f1200 -n -f1800
# last line

Configure shorewall

You need to add a rule to allow accessing port 80 from your firewall on the net zone. To make ez-ipupdate work. There for add to /etc/shorewall/rules

ACCEPT         fw       net           tcp      80

No comments: