Merge 9fe36a55f9 into bec4521ecd
This commit is contained in:
commit
917c76fa27
3 changed files with 73 additions and 27 deletions
38
README.md
38
README.md
|
|
@ -8,25 +8,25 @@ on many dynamic DNS services.
|
||||||
|
|
||||||
Dynamic DNS services currently supported include:
|
Dynamic DNS services currently supported include:
|
||||||
|
|
||||||
DynDNS.com - See http://www.dyndns.com for details on obtaining a free account.
|
DynDNS.com - See http://www.dyndns.com for details on obtaining a free account.
|
||||||
Hammernode - See http://www.hn.org for details on obtaining a free account.
|
Hammernode - See http://www.hn.org for details on obtaining a free account.
|
||||||
Zoneedit - See http://www.zoneedit.com for details.
|
Zoneedit - See http://www.zoneedit.com for details.
|
||||||
EasyDNS - See http://www.easydns.com for details.
|
EasyDNS - See http://www.easydns.com for details.
|
||||||
NameCheap - See http://www.namecheap.com for details
|
NameCheap - See http://www.namecheap.com for details
|
||||||
ConCont - See http://www.dydns.za.net for details
|
ConCont - See http://www.dydns.za.net for details
|
||||||
DnsPark - See http://www.dnspark.com for details
|
DnsPark - See http://www.dnspark.com for details
|
||||||
DslReports - See http://www.dslreports.com for details
|
DslReports - See http://www.dslreports.com for details
|
||||||
Sitelutions - See http://www.sitelutions.com for details
|
Sitelutions - See http://www.sitelutions.com for details
|
||||||
Loopia - See http://www.loopia.se for details
|
Loopia - See http://www.loopia.se for details
|
||||||
Noip - See http://www.noip.com/ for details
|
Noip - See http://www.noip.com/ for details
|
||||||
Freedns - See http://freedns.afraid.org/ for details
|
Freedns - See http://freedns.afraid.org/ for details
|
||||||
ChangeIP - See http://www.changeip.com/ for details
|
ChangeIP - See http://www.changeip.com/ for details
|
||||||
dtdns - See http://www.dtdns.com/ for details
|
dtdns - See http://www.dtdns.com/ for details
|
||||||
nsupdate - See nsupdate(1) and ddns-confgen(8) for details
|
nsupdate - See nsupdate(1) and ddns-confgen(8) for details
|
||||||
CloudFlare - See https://www.cloudflare.com/ for details
|
CloudFlare - See https://www.cloudflare.com/ for details
|
||||||
Google - See http://www.google.com/domains for details
|
Google - See http://www.google.com/domains for details
|
||||||
Duckdns - See https://duckdns.org/ for details
|
Duckdns - See https://duckdns.org/ for details
|
||||||
woima.fi - See https://woima.fi/ for details
|
woima.fi - See https://woima.fi/ for details
|
||||||
|
|
||||||
DDclient now supports many of cable/dsl broadband routers.
|
DDclient now supports many of cable/dsl broadband routers.
|
||||||
|
|
||||||
|
|
|
||||||
53
ddclient
53
ddclient
|
|
@ -349,8 +349,8 @@ my %variables = (
|
||||||
'syslog' => setv(T_BOOL, 0, 0, 1, 0, undef),
|
'syslog' => setv(T_BOOL, 0, 0, 1, 0, undef),
|
||||||
'facility' => setv(T_STRING,0, 0, 1, 'daemon', undef),
|
'facility' => setv(T_STRING,0, 0, 1, 'daemon', undef),
|
||||||
'priority' => setv(T_STRING,0, 0, 1, 'notice', undef),
|
'priority' => setv(T_STRING,0, 0, 1, 'notice', undef),
|
||||||
'mail' => setv(T_EMAIL, 0, 0, 1, '', undef),
|
'mail' => setv(T_EMAIL, 0, 0, 1, '', undef),
|
||||||
'mail-failure' => setv(T_EMAIL, 0, 0, 1, '', undef),
|
'mail-failure' => setv(T_EMAIL, 0, 0, 1, '', undef),
|
||||||
|
|
||||||
'exec' => setv(T_BOOL, 0, 0, 1, 1, undef),
|
'exec' => setv(T_BOOL, 0, 0, 1, 1, undef),
|
||||||
'debug' => setv(T_BOOL, 0, 0, 1, 0, undef),
|
'debug' => setv(T_BOOL, 0, 0, 1, 0, undef),
|
||||||
|
|
@ -903,8 +903,10 @@ sub update_nics {
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if ($ip !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) {
|
if ($ip !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) {
|
||||||
warning("malformed IP address (%s)", $ip);
|
if( !ipv6_match($ip) ) {
|
||||||
next;
|
warning("malformed IP address (%s)", $ip);
|
||||||
|
next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$iplist{$use}{$arg_ip}{$arg_fw}{$arg_if}{$arg_web}{$arg_cmd} = $ip;
|
$iplist{$use}{$arg_ip}{$arg_fw}{$arg_if}{$arg_web}{$arg_cmd} = $ip;
|
||||||
}
|
}
|
||||||
|
|
@ -1850,7 +1852,9 @@ sub check_value {
|
||||||
# return undef if $value =~ /:/;
|
# return undef if $value =~ /:/;
|
||||||
|
|
||||||
} elsif ($type eq T_IP) {
|
} elsif ($type eq T_IP) {
|
||||||
return undef if $value !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;
|
if( !ipv6_match($value) ) {
|
||||||
|
return undef if $value !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
@ -2192,9 +2196,14 @@ sub get_ip {
|
||||||
$reply =~ s/^.*?${skip}//is;
|
$reply =~ s/^.*?${skip}//is;
|
||||||
}
|
}
|
||||||
if ($reply =~ /^.*?\b(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\b.*/is) {
|
if ($reply =~ /^.*?\b(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\b.*/is) {
|
||||||
$ip = $1;
|
$ip = $1;
|
||||||
$ip = un_zero_pad($ip);
|
$ip = un_zero_pad($ip);
|
||||||
$ip = filter_local($ip) if opt('fw-banlocal', $h);
|
$ip = filter_local($ip) if opt('fw-banlocal', $h);
|
||||||
|
} elsif ( $ip = ipv6_match($reply) ) {
|
||||||
|
$ip = un_zero_pad($ip);
|
||||||
|
$ip = filter_local($ip) if opt('fw-banlocal', $h);
|
||||||
|
} else {
|
||||||
|
warning("found neither ipv4 nor ipv6 address");
|
||||||
}
|
}
|
||||||
if (($use ne 'ip') && (define($ip,'') eq '0.0.0.0')) {
|
if (($use ne 'ip') && (define($ip,'') eq '0.0.0.0')) {
|
||||||
$ip = undef;
|
$ip = undef;
|
||||||
|
|
@ -2204,6 +2213,34 @@ sub get_ip {
|
||||||
return $ip;
|
return $ip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
## ipv6_match determine ipv6 address from given string and return them
|
||||||
|
######################################################################
|
||||||
|
sub ipv6_match {
|
||||||
|
my $content = shift;
|
||||||
|
my $omits;
|
||||||
|
my $ip = "";
|
||||||
|
my $linenumbers = 0;
|
||||||
|
|
||||||
|
my @values = split('\n', $content);
|
||||||
|
foreach my $val (@values) {
|
||||||
|
next unless $val =~ /((:{0,2}[A-F0-9]{1,4}){0,7}:{1,2}[A-F0-9]{1,4})/ai; # invalid char
|
||||||
|
my $parsed = $1;
|
||||||
|
|
||||||
|
# check for at least 7 colons
|
||||||
|
my $count_colon = () = $parsed =~ /:/g;
|
||||||
|
if ($count_colon != 7) {
|
||||||
|
# or one double colon
|
||||||
|
my $count_double_colon = () = $parsed =~ /::/g;
|
||||||
|
if ($count_double_colon != 1) {
|
||||||
|
next
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $parsed;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
## group_hosts_by
|
## group_hosts_by
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
|
||||||
|
|
@ -221,3 +221,12 @@ ssl=yes # use ssl-support. Works with
|
||||||
# password=my-auto-generated-password
|
# password=my-auto-generated-password
|
||||||
# protocol=duckdns hostwithoutduckdnsorg
|
# protocol=duckdns hostwithoutduckdnsorg
|
||||||
|
|
||||||
|
##
|
||||||
|
## MyOnlinePortal (http://myonlineportal.net)
|
||||||
|
##
|
||||||
|
# protocol=dyndns2
|
||||||
|
# ssl=yes
|
||||||
|
# use=web, web=myonlineportal.net/checkip
|
||||||
|
# login=your-myonlineportal-username
|
||||||
|
# password=your-myonlineportal-password
|
||||||
|
# domain.myonlineportal.net
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue