No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
DBH.pm
LICENSE
README.md
apply_ddns
ddns_client
ddns_init.sql
update_ddns

README.md

DDNS Management

This is just for my private use.

Required Packages

  • DateTime
  • DBI
  • DBD::mysql
  • Config::Pit
  • Net::DNS
  • (optional) Smart::Comments

update_ddns

Perl script that updates DDNS database. All configurations are done through Pit (Config::Pit in Perl). This requires MySQL database and a table as ddns_init.sql.

Usage

update_dns

$ ./update_dns $DOMAIN $NAME $DATA

will update the $NAME.$DOMAIN record with $DATA. For instance, when you update foobar.example.com with 192.168.0.12 the command will be

$ ./update_ddns example.com foobar 192.168.0.12

ddns_client

Shell script that invokes update_dns. It can be configured by envdir.

$ENVDIR/IP_URL

The script knows the global IP address through accessing this URL. This IP_URL returns text/plain formatted IP address string.

$ENVDIR/UPDATE_HOST

Hostname of the DDNS server.

$ENVDIR/UPDATE_USER

The login name for SSH command.

$ENVDIR/SSH_OPTS

The command-line options for SSH access to the DDNS server. It is inteded to specify SSH private key (-i $KEY)

$ENVDIR/TARGET_DOMAIN

The DNS domain of the client. It must be contained in zone record in DDNS database.

$ENVDIR/TARGET_NAME

The DNS name of the client. It will be name record in the DDNS database.

$ENVDIR/UPDATE_CMD

DDNS update command invoked in the DDNS server. It is intended to launch update_ddns.

apply_ddns

$ ./apply_ddns

on the named server will send DDNS packet (RFC 2136) and set zone.applied 1 if successed.