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:
@@ -1,6 +1,11 @@
|
||||
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):
|
||||
* Enhancements:
|
||||
* Added config file support and a sample config file
|
||||
|
||||
14
README.md
14
README.md
@@ -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
|
||||
own Dynamic DNS Service.
|
||||
|
||||
**Version 1.1**, latest version, documentation and bugtracker available on my
|
||||
[GitLab instance](https://gitlab.lindenaar.net/scripts/dyndns)
|
||||
**Version 1.2**, latest version, documentation and bugtracker available on my
|
||||
[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)
|
||||
|
||||
|
||||
@@ -51,15 +51,15 @@ The setup of this solution consists of the following steps:
|
||||
1. Ensure that the Perl modules CGI and Net::DNS are installed.
|
||||
* on Debian/Ubuntu linux this can be done with:
|
||||
|
||||
~~~
|
||||
~~~
|
||||
sudo apt-get install libcgi-pm-perl libnet-dns-perl
|
||||
~~~
|
||||
~~~
|
||||
|
||||
* or directly from CPAN (assuming that is installed):
|
||||
|
||||
~~~
|
||||
~~~
|
||||
cpan CGI Net::DNS
|
||||
~~~
|
||||
~~~
|
||||
|
||||
2. Install the file `dyndns.pl` either in your cgi-bin directory or in a
|
||||
separate folder
|
||||
|
||||
17
dyndns.pl
17
dyndns.pl
@@ -3,10 +3,10 @@
|
||||
#
|
||||
# dyndns.pl - CGI-BIN script to handle Dynamic DNS updates through http
|
||||
#
|
||||
# Version 1.1, latest version, documentation and bugtracker available at:
|
||||
# https://gitlab.lindenaar.net/scripts/dyndns
|
||||
# Version 1.2, latest version, documentation and bugtracker available at:
|
||||
# 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
|
||||
# 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)
|
||||
? "\n\n\n========================================================\n" .
|
||||
"Remote addr: ". $cgi->remote_addr . "\n".
|
||||
"IPv4 addr: ". $ipv4 . "\n".
|
||||
"IPv6 addr: ". $ipv6 . "\n".
|
||||
$dnsupdate->string . "\n"
|
||||
: "\n";
|
||||
|
||||
@@ -243,12 +246,12 @@ sub handle_update($$$$) {
|
||||
} else {
|
||||
# Get ipv4, and ipv6 parameters
|
||||
my $remote_addr = $cgi->remote_addr;
|
||||
my $ipv4addr = $cgi->param('ipv4addr') || $cgi->param('ip');
|
||||
if ($ipv4addr == 'auto') {
|
||||
my $ipv4addr = $cgi->param('ipv4addr') || $cgi->param('ip') || '';
|
||||
if ($ipv4addr && $ipv4addr == 'auto') {
|
||||
$ipv4addr = is_ipv4($remote_addr) ? $remote_addr : undef;
|
||||
}
|
||||
my $ipv6addr = $cgi->param('ipv6addr') || $cgi->param('ipv6');
|
||||
if ($ipv6addr == 'auto') {
|
||||
my $ipv6addr = $cgi->param('ipv6addr') || $cgi->param('ipv6') || '';
|
||||
if ($ipv6addr && $ipv6addr == 'auto') {
|
||||
$ipv6addr = is_ipv6($remote_addr) ? $remote_addr : undef;
|
||||
}
|
||||
($statuscode, $statusmessage) =
|
||||
|
||||
Reference in New Issue
Block a user