Message ID | 20171115224900.2422e927.peter.mueller@link38.eu |
---|---|
State | Accepted |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (unknown [172.28.1.200]) by web02.ipfire.org (Postfix) with ESMTP id E8B566129C for <patchwork@ipfire.org>; Wed, 15 Nov 2017 22:49:11 +0100 (CET) Received: from mail01.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 0369B310; Wed, 15 Nov 2017 22:49:10 +0100 (CET) Received: from mx.link38.eu (mx.link38.eu [188.68.43.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx.link38.eu", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id CE4652F0 for <development@lists.ipfire.org>; Wed, 15 Nov 2017 22:49:07 +0100 (CET) X-Virus-Scanned: ClamAV at mx.link38.eu Received: from mx-fra.brokers.link38.eu (mx-fra.brokers.link38.eu [10.141.75.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx.link38.eu (Postfix) with ESMTPS id CE6FF4016A for <development@lists.ipfire.org>; Wed, 15 Nov 2017 22:49:00 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx-fra.brokers.link38.eu (Postfix) with ESMTPSA id 4D7189F4A5 for <development@lists.ipfire.org>; Wed, 15 Nov 2017 22:49:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=link38.eu; s=201711; t=1510782540; bh=bfTE9otNeH14zkkxm0qMb9w4/me60CIV3JmnzetVaEE=; h=Date:From:To:Subject:From; b=Xjgo+0kW/JFfh6mVb8hUyB2VDG39a0DGBAemi8DzC6M7jYGmxnTM2J01XnSjFqtAQ KJfh7os+Op9Dne+6JngWammGffxIzaivDVWAnKDtY2DhXbr6B16KncISkRKzCbgv6Z JQnMOQfExhX32cBiSSzNbO21UlfD6B9CgVQm6Tg/8UzYVGU3Y4EVDEwN9yZ54LQe6D dzoBDTRUF3VM0yOPDTM9rCoSbrbdDtreFnHLY8sRjV60acqshFF6CEAA9gkl2PLpvS Z/nnsfF8XjWAW5IBTXAZQfme0tN/9HeRJc037RA3xLqa8Lk94oxP/p4bfDkyWX4gX1 V52mZM8ky5iWw== Date: Wed, 15 Nov 2017 22:49:00 +0100 From: Peter =?utf-8?q?M=C3=BCller?= <peter.mueller@link38.eu> To: "development@lists.ipfire.org" <development@lists.ipfire.org> Subject: [PATCH v2] add GeoIP and rDNS information to used nameservers Message-ID: <20171115224900.2422e927.peter.mueller@link38.eu> Organization: Link38 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> List-Unsubscribe: <https://lists.ipfire.org/mailman/options/development>, <mailto:development-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <https://lists.ipfire.org/pipermail/development/> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Subscribe: <https://lists.ipfire.org/mailman/listinfo/development>, <mailto:development-request@lists.ipfire.org?subject=subscribe> Errors-To: development-bounces@lists.ipfire.org Sender: "Development" <development-bounces@lists.ipfire.org> |
Series |
[v2] add GeoIP and rDNS information to used nameservers
|
|
Commit Message
Peter Müller
Nov. 16, 2017, 8:49 a.m. UTC
Add GeoIP and rDNS information to DNS nameserver list at netexternal.cgi
Use newly implemented GeoIP function in /var/ipfire/geoip-functions.pl
Signed-off-by: Peter Müller <peter.mueller@link38.eu>
---
html/cgi-bin/netexternal.cgi | 27 ++++++++++++++++++++++++++-
langs/de/cgi-bin/de.pl | 1 +
langs/en/cgi-bin/en.pl | 1 +
3 files changed, 28 insertions(+), 1 deletion(-)
Comments
Hi, On Wed, 2017-11-15 at 22:49 +0100, Peter Müller wrote: > Add GeoIP and rDNS information to DNS nameserver list at netexternal.cgi > > Use newly implemented GeoIP function in /var/ipfire/geoip-functions.pl > > Signed-off-by: Peter Müller <peter.mueller@link38.eu> > --- > html/cgi-bin/netexternal.cgi | 27 ++++++++++++++++++++++++++- > langs/de/cgi-bin/de.pl | 1 + > langs/en/cgi-bin/en.pl | 1 + > 3 files changed, 28 insertions(+), 1 deletion(-) > > diff --git a/html/cgi-bin/netexternal.cgi b/html/cgi-bin/netexternal.cgi > index 299612d4c..4393393e0 100644 > --- a/html/cgi-bin/netexternal.cgi > +++ b/html/cgi-bin/netexternal.cgi > @@ -25,9 +25,12 @@ use strict; > #use warnings; > #use CGI::Carp 'fatalsToBrowser'; > > +use IO::Socket; > + For what is this module being loaded? > require '/var/ipfire/general-functions.pl'; > require "${General::swroot}/lang.pl"; > require "${General::swroot}/header.pl"; > +require "${General::swroot}/geoip-functions.pl"; > require "${General::swroot}/graphs.pl"; > > my %color = (); > @@ -99,6 +102,12 @@ if ( $querry[0] ne~ ""){ > <strong>$Lang::tr{'nameserver > '}</strong> > </th> > <th align="center"> > + <strong>$Lang::tr{'country'}< > /strong> > + </th> > + <th align="center"> > + <strong>$Lang::tr{'rdns'}</st > rong> > + </th> > + <th align="center"> > <strong>$Lang::tr{'status'}</ > strong> > </th> > </tr> > @@ -139,9 +148,25 @@ END > > my $table_colour = ($id++ % 2) ? $color{'color22'} : > $color{'color20'}; > > + # collect more information about name server (rDNS, GeoIP > country code) > + my $ccode = &GeoIP::lookup($nameserver); > + my $flag_icon = &GeoIP::get_flag_icon($ccode); > + > + my $iaddr = inet_aton($nameserver); > + my $rdns = gethostbyaddr($iaddr, AF_INET); > + if (!$rdns) { $rdns = $Lang::tr{'lookup failed'}; } > + > print <<END; > <tr bgcolor="$table_colour"> > - <td>$nameserver</td> > + <td> > + $nameserver > + </td> > + <td align="center"> > + <a href='country.cgi#$ccode'><img > src="$flag_icon" border="0" alt="$ccode" title="$ccode" /></a> > + </td> > + <td align="center"> > + $rdns > + </td> > <td bgcolor="$bgcolour" align="center"> > <font > color="$colour"><strong>$message</strong></font> > </td> > diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl > index 6dff5d781..ae87464d2 100644 > --- a/langs/de/cgi-bin/de.pl > +++ b/langs/de/cgi-bin/de.pl > @@ -1962,6 +1962,7 @@ > 'read bytes' => 'Gelesene Bytes', > 'read list' => 'Liste der Leseberechtigten', > 'real address' => 'Reale Addresse', > +'rdns' => 'rDNS', > 'reboot' => 'Neustart', > 'reboot ask' => 'Neustart?', > 'reboot question' => 'Extra Abfrage bei neustart und herunterfahren > einschalten', > diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl > index 4efff6e65..3af17d5dc 100644 > --- a/langs/en/cgi-bin/en.pl > +++ b/langs/en/cgi-bin/en.pl > @@ -1997,6 +1997,7 @@ > 'quick playlist' => 'Quick Playlist', > 'ram' => 'RAM', > 'random number generator daemon' => 'Random Number Generator Daemon', > +'rdns' => 'rDNS', > 'read bytes' => 'Read Bytes', > 'read list' => 'list with readonly hosts', > 'real address' => 'Real Address',
Hello Michael, > Hi, > > On Wed, 2017-11-15 at 22:49 +0100, Peter Müller wrote: > > Add GeoIP and rDNS information to DNS nameserver list at netexternal.cgi > > > > Use newly implemented GeoIP function in /var/ipfire/geoip-functions.pl > > > > Signed-off-by: Peter Müller <peter.mueller@link38.eu> > > --- > > html/cgi-bin/netexternal.cgi | 27 ++++++++++++++++++++++++++- > > langs/de/cgi-bin/de.pl | 1 + > > langs/en/cgi-bin/en.pl | 1 + > > 3 files changed, 28 insertions(+), 1 deletion(-) > > > > diff --git a/html/cgi-bin/netexternal.cgi b/html/cgi-bin/netexternal.cgi > > index 299612d4c..4393393e0 100644 > > --- a/html/cgi-bin/netexternal.cgi > > +++ b/html/cgi-bin/netexternal.cgi > > @@ -25,9 +25,12 @@ use strict; > > #use warnings; > > #use CGI::Carp 'fatalsToBrowser'; > > > > +use IO::Socket; > > + > > For what is this module being loaded? It is necessary to perform the DNS query. Without it, Perl returns an error. Best regards, Peter Müller > > > require '/var/ipfire/general-functions.pl'; > > require "${General::swroot}/lang.pl"; > > require "${General::swroot}/header.pl"; > > +require "${General::swroot}/geoip-functions.pl"; > > require "${General::swroot}/graphs.pl"; > > > > my %color = (); > > @@ -99,6 +102,12 @@ if ( $querry[0] ne~ ""){ > > <strong>$Lang::tr{'nameserver > > '}</strong> > > </th> > > <th align="center"> > > + <strong>$Lang::tr{'country'}< > > /strong> > > + </th> > > + <th align="center"> > > + <strong>$Lang::tr{'rdns'}</st > > rong> > > + </th> > > + <th align="center"> > > <strong>$Lang::tr{'status'}</ > > strong> > > </th> > > </tr> > > @@ -139,9 +148,25 @@ END > > > > my $table_colour = ($id++ % 2) ? $color{'color22'} : > > $color{'color20'}; > > > > + # collect more information about name server (rDNS, GeoIP > > country code) > > + my $ccode = &GeoIP::lookup($nameserver); > > + my $flag_icon = &GeoIP::get_flag_icon($ccode); > > + > > + my $iaddr = inet_aton($nameserver); > > + my $rdns = gethostbyaddr($iaddr, AF_INET); > > + if (!$rdns) { $rdns = $Lang::tr{'lookup failed'}; } > > + > > print <<END; > > <tr bgcolor="$table_colour"> > > - <td>$nameserver</td> > > + <td> > > + $nameserver > > + </td> > > + <td align="center"> > > + <a href='country.cgi#$ccode'><img > > src="$flag_icon" border="0" alt="$ccode" title="$ccode" /></a> > > + </td> > > + <td align="center"> > > + $rdns > > + </td> > > <td bgcolor="$bgcolour" align="center"> > > <font > > color="$colour"><strong>$message</strong></font> > > </td> > > diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl > > index 6dff5d781..ae87464d2 100644 > > --- a/langs/de/cgi-bin/de.pl > > +++ b/langs/de/cgi-bin/de.pl > > @@ -1962,6 +1962,7 @@ > > 'read bytes' => 'Gelesene Bytes', > > 'read list' => 'Liste der Leseberechtigten', > > 'real address' => 'Reale Addresse', > > +'rdns' => 'rDNS', > > 'reboot' => 'Neustart', > > 'reboot ask' => 'Neustart?', > > 'reboot question' => 'Extra Abfrage bei neustart und herunterfahren > > einschalten', > > diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl > > index 4efff6e65..3af17d5dc 100644 > > --- a/langs/en/cgi-bin/en.pl > > +++ b/langs/en/cgi-bin/en.pl > > @@ -1997,6 +1997,7 @@ > > 'quick playlist' => 'Quick Playlist', > > 'ram' => 'RAM', > > 'random number generator daemon' => 'Random Number Generator Daemon', > > +'rdns' => 'rDNS', > > 'read bytes' => 'Read Bytes', > > 'read list' => 'list with readonly hosts', > > 'real address' => 'Real Address',
On Thu, 2017-11-16 at 17:23 +0100, Peter Müller wrote: > Hello Michael, > > > Hi, > > > > On Wed, 2017-11-15 at 22:49 +0100, Peter Müller wrote: > > > Add GeoIP and rDNS information to DNS nameserver list at netexternal.cgi > > > > > > Use newly implemented GeoIP function in /var/ipfire/geoip-functions.pl > > > > > > Signed-off-by: Peter Müller <peter.mueller@link38.eu> > > > --- > > > html/cgi-bin/netexternal.cgi | 27 ++++++++++++++++++++++++++- > > > langs/de/cgi-bin/de.pl | 1 + > > > langs/en/cgi-bin/en.pl | 1 + > > > 3 files changed, 28 insertions(+), 1 deletion(-) > > > > > > diff --git a/html/cgi-bin/netexternal.cgi b/html/cgi-bin/netexternal.cgi > > > index 299612d4c..4393393e0 100644 > > > --- a/html/cgi-bin/netexternal.cgi > > > +++ b/html/cgi-bin/netexternal.cgi > > > @@ -25,9 +25,12 @@ use strict; > > > #use warnings; > > > #use CGI::Carp 'fatalsToBrowser'; > > > > > > +use IO::Socket; > > > + > > > > For what is this module being loaded? > > It is necessary to perform the DNS query. Without it, Perl returns > an error. Oh, so inet_aton() is from that package. Would it not be better to call that by it's full name (IO::Socket::inet_aton)? -Michael > > Best regards, > Peter Müller > > > > > require '/var/ipfire/general-functions.pl'; > > > require "${General::swroot}/lang.pl"; > > > require "${General::swroot}/header.pl"; > > > +require "${General::swroot}/geoip-functions.pl"; > > > require "${General::swroot}/graphs.pl"; > > > > > > my %color = (); > > > @@ -99,6 +102,12 @@ if ( $querry[0] ne~ ""){ > > > <strong>$Lang::tr{'namese > > > rver > > > '}</strong> > > > </th> > > > <th align="center"> > > > + <strong>$Lang::tr{'countr > > > y'}< > > > /strong> > > > + </th> > > > + <th align="center"> > > > + <strong>$Lang::tr{'rdns'} > > > </st > > > rong> > > > + </th> > > > + <th align="center"> > > > <strong>$Lang::tr{'status > > > '}</ > > > strong> > > > </th> > > > </tr> > > > @@ -139,9 +148,25 @@ END > > > > > > my $table_colour = ($id++ % 2) ? $color{'color22'} : > > > $color{'color20'}; > > > > > > + # collect more information about name server (rDNS, GeoIP > > > country code) > > > + my $ccode = &GeoIP::lookup($nameserver); > > > + my $flag_icon = &GeoIP::get_flag_icon($ccode); > > > + > > > + my $iaddr = inet_aton($nameserver); > > > + my $rdns = gethostbyaddr($iaddr, AF_INET); > > > + if (!$rdns) { $rdns = $Lang::tr{'lookup failed'}; } > > > + > > > print <<END; > > > <tr bgcolor="$table_colour"> > > > - <td>$nameserver</td> > > > + <td> > > > + $nameserver > > > + </td> > > > + <td align="center"> > > > + <a href='country.cgi#$ccode'><img > > > src="$flag_icon" border="0" alt="$ccode" title="$ccode" /></a> > > > + </td> > > > + <td align="center"> > > > + $rdns > > > + </td> > > > <td bgcolor="$bgcolour" align="center"> > > > <font > > > color="$colour"><strong>$message</strong></font> > > > </td> > > > diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl > > > index 6dff5d781..ae87464d2 100644 > > > --- a/langs/de/cgi-bin/de.pl > > > +++ b/langs/de/cgi-bin/de.pl > > > @@ -1962,6 +1962,7 @@ > > > 'read bytes' => 'Gelesene Bytes', > > > 'read list' => 'Liste der Leseberechtigten', > > > 'real address' => 'Reale Addresse', > > > +'rdns' => 'rDNS', > > > 'reboot' => 'Neustart', > > > 'reboot ask' => 'Neustart?', > > > 'reboot question' => 'Extra Abfrage bei neustart und herunterfahren > > > einschalten', > > > diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl > > > index 4efff6e65..3af17d5dc 100644 > > > --- a/langs/en/cgi-bin/en.pl > > > +++ b/langs/en/cgi-bin/en.pl > > > @@ -1997,6 +1997,7 @@ > > > 'quick playlist' => 'Quick Playlist', > > > 'ram' => 'RAM', > > > 'random number generator daemon' => 'Random Number Generator Daemon', > > > +'rdns' => 'rDNS', > > > 'read bytes' => 'Read Bytes', > > > 'read list' => 'list with readonly hosts', > > > 'real address' => 'Real Address', > >
Hello Michael, > On Thu, 2017-11-16 at 17:23 +0100, Peter Müller wrote: > > Hello Michael, > > > > > Hi, > > > > > > On Wed, 2017-11-15 at 22:49 +0100, Peter Müller wrote: > > > > Add GeoIP and rDNS information to DNS nameserver list at netexternal.cgi > > > > > > > > Use newly implemented GeoIP function in /var/ipfire/geoip-functions.pl > > > > > > > > Signed-off-by: Peter Müller <peter.mueller@link38.eu> > > > > --- > > > > html/cgi-bin/netexternal.cgi | 27 ++++++++++++++++++++++++++- > > > > langs/de/cgi-bin/de.pl | 1 + > > > > langs/en/cgi-bin/en.pl | 1 + > > > > 3 files changed, 28 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/html/cgi-bin/netexternal.cgi b/html/cgi-bin/netexternal.cgi > > > > index 299612d4c..4393393e0 100644 > > > > --- a/html/cgi-bin/netexternal.cgi > > > > +++ b/html/cgi-bin/netexternal.cgi > > > > @@ -25,9 +25,12 @@ use strict; > > > > #use warnings; > > > > #use CGI::Carp 'fatalsToBrowser'; > > > > > > > > +use IO::Socket; > > > > + > > > > > > For what is this module being loaded? > > > > It is necessary to perform the DNS query. Without it, Perl returns > > an error. > > Oh, so inet_aton() is from that package. Would it not be better to call that by > it's full name (IO::Socket::inet_aton)? > > -Michael Probably, but since PTR lookups are performed this way in other CGIs such as ipinfo.cgi, I wanted to stay consistent here. All other patches of the GeoIP bundle are not affected by this. Best regards, Peter Müller > > > > > Best regards, > > Peter Müller > > > > > > > require '/var/ipfire/general-functions.pl'; > > > > require "${General::swroot}/lang.pl"; > > > > require "${General::swroot}/header.pl"; > > > > +require "${General::swroot}/geoip-functions.pl"; > > > > require "${General::swroot}/graphs.pl"; > > > > > > > > my %color = (); > > > > @@ -99,6 +102,12 @@ if ( $querry[0] ne~ ""){ > > > > <strong>$Lang::tr{'namese > > > > rver > > > > '}</strong> > > > > </th> > > > > <th align="center"> > > > > + <strong>$Lang::tr{'countr > > > > y'}< > > > > /strong> > > > > + </th> > > > > + <th align="center"> > > > > + <strong>$Lang::tr{'rdns'} > > > > </st > > > > rong> > > > > + </th> > > > > + <th align="center"> > > > > <strong>$Lang::tr{'status > > > > '}</ > > > > strong> > > > > </th> > > > > </tr> > > > > @@ -139,9 +148,25 @@ END > > > > > > > > my $table_colour = ($id++ % 2) ? $color{'color22'} : > > > > $color{'color20'}; > > > > > > > > + # collect more information about name server (rDNS, GeoIP > > > > country code) > > > > + my $ccode = &GeoIP::lookup($nameserver); > > > > + my $flag_icon = &GeoIP::get_flag_icon($ccode); > > > > + > > > > + my $iaddr = inet_aton($nameserver); > > > > + my $rdns = gethostbyaddr($iaddr, AF_INET); > > > > + if (!$rdns) { $rdns = $Lang::tr{'lookup failed'}; } > > > > + > > > > print <<END; > > > > <tr bgcolor="$table_colour"> > > > > - <td>$nameserver</td> > > > > + <td> > > > > + $nameserver > > > > + </td> > > > > + <td align="center"> > > > > + <a href='country.cgi#$ccode'><img > > > > src="$flag_icon" border="0" alt="$ccode" title="$ccode" /></a> > > > > + </td> > > > > + <td align="center"> > > > > + $rdns > > > > + </td> > > > > <td bgcolor="$bgcolour" align="center"> > > > > <font > > > > color="$colour"><strong>$message</strong></font> > > > > </td> > > > > diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl > > > > index 6dff5d781..ae87464d2 100644 > > > > --- a/langs/de/cgi-bin/de.pl > > > > +++ b/langs/de/cgi-bin/de.pl > > > > @@ -1962,6 +1962,7 @@ > > > > 'read bytes' => 'Gelesene Bytes', > > > > 'read list' => 'Liste der Leseberechtigten', > > > > 'real address' => 'Reale Addresse', > > > > +'rdns' => 'rDNS', > > > > 'reboot' => 'Neustart', > > > > 'reboot ask' => 'Neustart?', > > > > 'reboot question' => 'Extra Abfrage bei neustart und herunterfahren > > > > einschalten', > > > > diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl > > > > index 4efff6e65..3af17d5dc 100644 > > > > --- a/langs/en/cgi-bin/en.pl > > > > +++ b/langs/en/cgi-bin/en.pl > > > > @@ -1997,6 +1997,7 @@ > > > > 'quick playlist' => 'Quick Playlist', > > > > 'ram' => 'RAM', > > > > 'random number generator daemon' => 'Random Number Generator Daemon', > > > > +'rdns' => 'rDNS', > > > > 'read bytes' => 'Read Bytes', > > > > 'read list' => 'list with readonly hosts', > > > > 'real address' => 'Real Address', > > > >
diff --git a/html/cgi-bin/netexternal.cgi b/html/cgi-bin/netexternal.cgi index 299612d4c..4393393e0 100644 --- a/html/cgi-bin/netexternal.cgi +++ b/html/cgi-bin/netexternal.cgi @@ -25,9 +25,12 @@ use strict; #use warnings; #use CGI::Carp 'fatalsToBrowser'; +use IO::Socket; + require '/var/ipfire/general-functions.pl'; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; +require "${General::swroot}/geoip-functions.pl"; require "${General::swroot}/graphs.pl"; my %color = (); @@ -99,6 +102,12 @@ if ( $querry[0] ne~ ""){ <strong>$Lang::tr{'nameserver'}</strong> </th> <th align="center"> + <strong>$Lang::tr{'country'}</strong> + </th> + <th align="center"> + <strong>$Lang::tr{'rdns'}</strong> + </th> + <th align="center"> <strong>$Lang::tr{'status'}</strong> </th> </tr> @@ -139,9 +148,25 @@ END my $table_colour = ($id++ % 2) ? $color{'color22'} : $color{'color20'}; + # collect more information about name server (rDNS, GeoIP country code) + my $ccode = &GeoIP::lookup($nameserver); + my $flag_icon = &GeoIP::get_flag_icon($ccode); + + my $iaddr = inet_aton($nameserver); + my $rdns = gethostbyaddr($iaddr, AF_INET); + if (!$rdns) { $rdns = $Lang::tr{'lookup failed'}; } + print <<END; <tr bgcolor="$table_colour"> - <td>$nameserver</td> + <td> + $nameserver + </td> + <td align="center"> + <a href='country.cgi#$ccode'><img src="$flag_icon" border="0" alt="$ccode" title="$ccode" /></a> + </td> + <td align="center"> + $rdns + </td> <td bgcolor="$bgcolour" align="center"> <font color="$colour"><strong>$message</strong></font> </td> diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index 6dff5d781..ae87464d2 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -1962,6 +1962,7 @@ 'read bytes' => 'Gelesene Bytes', 'read list' => 'Liste der Leseberechtigten', 'real address' => 'Reale Addresse', +'rdns' => 'rDNS', 'reboot' => 'Neustart', 'reboot ask' => 'Neustart?', 'reboot question' => 'Extra Abfrage bei neustart und herunterfahren einschalten', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index 4efff6e65..3af17d5dc 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -1997,6 +1997,7 @@ 'quick playlist' => 'Quick Playlist', 'ram' => 'RAM', 'random number generator daemon' => 'Random Number Generator Daemon', +'rdns' => 'rDNS', 'read bytes' => 'Read Bytes', 'read list' => 'list with readonly hosts', 'real address' => 'Real Address',