updated version and copyright

updated documentation to reflect the migration to Gitea
correctly handle IPv4 or IPv6 addresses to be empty
added Remote, IPv4 and IPv6 addresses to the debug output
This commit is contained in:
2025-12-27 19:35:41 +01:00
parent fe6a2ec75f
commit 1e04ec37c3
3 changed files with 24 additions and 16 deletions

View File

@@ -1,6 +1,11 @@
CHANGELOG CHANGELOG
========= =========
Version 1.2 Changes (2025-12-27):
* migrated to my new Gitea instance
* correctly handle IPv4 or IPv6 addresses to be empty
* added Remote, IPv4 and IPv6 addresses to the debug output
Version 1.1 Changes (2019-08-05): Version 1.1 Changes (2019-08-05):
* Enhancements: * Enhancements:
* Added config file support and a sample config file * Added config file support and a sample config file

View File

@@ -5,10 +5,10 @@ Perl CGI-BIN script to handle Dynamic DNS updates through HTTP (e.g. from a
router), updating DNS records through secure DNS update statements to run your router), updating DNS records through secure DNS update statements to run your
own Dynamic DNS Service. own Dynamic DNS Service.
**Version 1.1**, latest version, documentation and bugtracker available on my **Version 1.2**, latest version, documentation and bugtracker available on my
[GitLab instance](https://gitlab.lindenaar.net/scripts/dyndns) [Gitea instance](https://gitea.lindenaar.net/scripts/dyndns)
Copyright (c) 2013 - 2019 Frederik Lindenaar. free for distribution under the Copyright (c) 2013 - 2025 Frederik Lindenaar. free for distribution under the
GNU License, see [below](#license) GNU License, see [below](#license)
@@ -49,17 +49,17 @@ consider using the Apache mod_perl module for highly a volatile domain.
The setup of this solution consists of the following steps: The setup of this solution consists of the following steps:
1. Ensure that the Perl modules CGI and Net::DNS are installed. 1. Ensure that the Perl modules CGI and Net::DNS are installed.
* on Debian/Ubuntu linux this can be done with: * on Debian/Ubuntu linux this can be done with:
~~~ ~~~
sudo apt-get install libcgi-pm-perl libnet-dns-perl sudo apt-get install libcgi-pm-perl libnet-dns-perl
~~~ ~~~
* or directly from CPAN (assuming that is installed): * or directly from CPAN (assuming that is installed):
~~~ ~~~
cpan CGI Net::DNS cpan CGI Net::DNS
~~~ ~~~
2. Install the file `dyndns.pl` either in your cgi-bin directory or in a 2. Install the file `dyndns.pl` either in your cgi-bin directory or in a
separate folder separate folder

View File

@@ -3,10 +3,10 @@
# #
# dyndns.pl - CGI-BIN script to handle Dynamic DNS updates through http # dyndns.pl - CGI-BIN script to handle Dynamic DNS updates through http
# #
# Version 1.1, latest version, documentation and bugtracker available at: # Version 1.2, latest version, documentation and bugtracker available at:
# https://gitlab.lindenaar.net/scripts/dyndns # https://gitea.lindenaar.net/scripts/dyndns
# #
# Copyright (c) 2013 - 2019 Frederik Lindenaar # Copyright (c) 2013 - 2025 Frederik Lindenaar
# #
# This script is free software: you can redistribute and/or modify it under the # This script is free software: you can redistribute and/or modify it under the
# terms of version 3 of the GNU General Public License as published by the Free # terms of version 3 of the GNU General Public License as published by the Free
@@ -207,6 +207,9 @@ sub DNS_Update($$$$$$$) {
my $debugmessage = ($debug) my $debugmessage = ($debug)
? "\n\n\n========================================================\n" . ? "\n\n\n========================================================\n" .
"Remote addr: ". $cgi->remote_addr . "\n".
"IPv4 addr: ". $ipv4 . "\n".
"IPv6 addr: ". $ipv6 . "\n".
$dnsupdate->string . "\n" $dnsupdate->string . "\n"
: "\n"; : "\n";
@@ -243,12 +246,12 @@ sub handle_update($$$$) {
} else { } else {
# Get ipv4, and ipv6 parameters # Get ipv4, and ipv6 parameters
my $remote_addr = $cgi->remote_addr; my $remote_addr = $cgi->remote_addr;
my $ipv4addr = $cgi->param('ipv4addr') || $cgi->param('ip'); my $ipv4addr = $cgi->param('ipv4addr') || $cgi->param('ip') || '';
if ($ipv4addr == 'auto') { if ($ipv4addr && $ipv4addr == 'auto') {
$ipv4addr = is_ipv4($remote_addr) ? $remote_addr : undef; $ipv4addr = is_ipv4($remote_addr) ? $remote_addr : undef;
} }
my $ipv6addr = $cgi->param('ipv6addr') || $cgi->param('ipv6'); my $ipv6addr = $cgi->param('ipv6addr') || $cgi->param('ipv6') || '';
if ($ipv6addr == 'auto') { if ($ipv6addr && $ipv6addr == 'auto') {
$ipv6addr = is_ipv6($remote_addr) ? $remote_addr : undef; $ipv6addr = is_ipv6($remote_addr) ? $remote_addr : undef;
} }
($statuscode, $statusmessage) = ($statuscode, $statusmessage) =