menuimage

Description

Conffile

Options

Dependency

Changelog

Download

My_Other_Sites

My_Programs

Comments

123-dns-sync v0.8 [06 Jan 2017] by Dominic

Description

Compare local machine's current external ip address with the DNS records pointing to it on ns.123-reg.co.uk, then use 123-dns-manager.sh to fix latter if different. Also compare external reverse DNS with internal FQDN and update internal FQDN (in /etc/hosts) if different.

Intended for running as regular cron job on a machine with dynamic external ip whose DNS records - held at ns.123-reg.co.uk - and local FQDN need to be kept accurate. Example: a mail server.

Conffile

123-dns-sync.sh requires a conf file (see options) which must contain 2 definitions:
DOMAIN="[put your DNS domain here]"
SUBDOMAINS="[put one or more subdomain names here, space-separated]"

For example -

DOMAIN="mydomain.com"
SUBDOMAINS="vps32 mail1"

Options

-c [conffile] - use the named conffile instead of the default (which is 123-dns-sync-[hostname].conf in the same directory as 123-dns-sync.sh)
-h show this help and exit
-l show changelog and exit
-q be quiet unless ip mismatch is found or there is a problem
-t test mode (force running the code to try to fix changes, but don't really make the changes)

Dependency

123-dns-manager.sh - see https://www.timedicer.co.uk/programs/help/123-dns-manager.sh - should be in same directory as 123-dns-sync.sh

Changelog

0.8 [06 Jan 2017]: minor tweak to text output if there is a problem
0.7 [04 Dec 2016]: make generic, rename from rose-cottage-ip-updated.sh to 123-dns-sync.sh
0.6 [28 Nov 2016]: add test for internal fqdn vs reversedns, rename from rose-cottage-ip-notify.sh to rose-cottage-ip-updated.sh
0.5 [31 Oct 2016]: add test for valid ip for rc/timedicer2.stocktonflats.co.uk
0.4 [16 Oct 2016]: retrieve current ip from opendns.com by default, fall back to log entry by noip2 script
0.3 [24 May 2016]: retrieve ips from authoritative nameservers not cache
0.2 [20 May 2016]: add use of /home/z-shares/scripts/123-dns-manager.sh and option -t
0.1 [14 Apr 2016]: first version

Download 123-dns-sync.sh

My Other Sites

My Programs

Here is a selection of some (other) programs I have written, most of which run from the command line (CLI), are freely available and can be obtained by clicking on the links. Dependencies are shown and while in most cases written for a conventional Linux server, they should run even on a Raspberry Pi, and many can run under Windows using Cygwin. Email me if you have problems or questions, or if you think I could help with a programming requirement.

Backup Utilities

Debian/Ubuntu kernel and LVM Utilities

Dellmont / Three / Giffgaff / Vodafone - VoIP and Mobile Phone Account Utilities

Miscellaneous Programs

Comments

No comments yet
*Name:
Email:
Hide my email
*Text:
 
Powered by Scriptsmill Comments Script