+ | + | + |
$Lang::tr{'network'} + | IP + | $Lang::tr{'status'} + | |||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
$Lang::tr{'internet'}: + | $ipaddr + | $connstate
+END
+if ( $netsettings{'RED_TYPE'} ne "STATIC" && $netsettings{'RED_TYPE'} ne "DHCP" ){
+print `/usr/local/bin/dialctrl.pl show`;
+print <
+
+ |
+ |
Hostname: | $HOSTNAME |
+END
+ }
+
+ if ( -e "/var/ipfire/red/remote-ipaddress" ) {
+ my $GATEWAY = `cat /var/ipfire/red/remote-ipaddress`;
+ chomp($GATEWAY);
+ print < | Gateway: | $GATEWAY |
+END
+ }
+
+ my $DNS1 = `cat /var/ipfire/red/dns1`;
+ my $DNS2 = `cat /var/ipfire/red/dns2`;
+ chomp($DNS1);
+ chomp($DNS1);
+
+ if ( $DNS1 ) { print < | DNS-Server: | $DNS1
+END
+ }
+ if ( $DNS2 ) { print < | $Lang::tr{'lan'}:
+ | $netsettings{'GREEN_ADDRESS'}
+ |
+END
+ if ( `cat /var/ipfire/proxy/advanced/settings | grep ^ENABLE=on` ) {
+ print "Proxy an";
+ if ( `cat /var/ipfire/proxy/advanced/settings | grep ^TRANSPARENT=on` ) { print " (transparent)"; }
+ } else { print "Proxy aus"; }
+ }
+ if ( $netsettings{'BLUE_DEV'} ) { print < | $Lang::tr{'wireless'}: | + $netsettings{'BLUE_ADDRESS'}
+ |
+END
+ if ( `cat /var/ipfire/proxy/advanced/settings | grep ^ENABLE_BLUE=on` ) {
+ print "Proxy an";
+ if ( `cat /var/ipfire/proxy/advanced/settings | grep ^TRANSPARENT_BLUE=on` ) { print " (transparent)"; }
+ } else { print "Proxy aus"; }
+ }
+ if ( $netsettings{'ORANGE_DEV'} ) { print < | $Lang::tr{'dmz'}: | + $netsettings{'ORANGE_ADDRESS'}
+ | Online
+END
+ }
+ if ( `cat /var/ipfire/vpn/settings | grep ^ENABLED=on` ||
+ `cat /var/ipfire/vpn/settings | grep ^ENABLED_BLUE=on` ) {
+ my $ipsecip = `cat /var/ipfire/vpn/settings | grep ^VPN_IP= | cut -c 8-`;
+ my @status = `/usr/sbin/ipsec auto --status`;
+ my %confighash = ();
+ &General::readhasharray("${General::swroot}/vpn/config", \%confighash);
+ print < | $Lang::tr{'vpn'}: | + $ipsecip
+ | Online
+END
+ my $id = 0;
+ my $gif;
+ foreach my $key (keys %confighash) {
+ if ($confighash{$key}[0] eq 'on') { $gif = 'on.gif'; } else { $gif = 'off.gif'; }
+
+ if ($id % 2) {
+ print " | | $confighash{$key}[1] / " . $Lang::tr{"$confighash{$key}[3]"} . " (" . $Lang::tr{"$confighash{$key}[4]"} . ") | ";
+ } else {
+ print " | $confighash{$key}[1] / " . $Lang::tr{"$confighash{$key}[3]"} . " (" . $Lang::tr{"$confighash{$key}[4]"} . ") | ";
+ }
+
+ my $active = "
$active | ";
+ }
+ }
+ if ( `cat /var/ipfire/ovpn/settings | grep ^ENABLED=on` ||
+ `cat /var/ipfire/ovpn/settings | grep ^ENABLED_BLUE=on` ||
+ `cat /var/ipfire/ovpn/settings | grep ^ENABLED_ORANGE=on`) {
+ my $ovpnip = `cat /var/ipfire/ovpn/settings | grep ^DOVPN_SUBNET= | cut -c 14- | sed -e 's\/\\/255.255.255.0\/\/'`;
+ print <OpenVPN: | + $ovpnip
+ | Online
+END
+ }
# Memory usage warning
my @free = `/usr/bin/free`;
@@ -132,7 +351,7 @@ foreach my $line (@df) {
if ($1<5) {
# available:plain value in MB, and not %used as 10% is too much to waste on small disk
# and root size should not vary during time
- $warnmessage .= " | "; -while(
$warnmessage | |
"; -system('/usr/bin/uptime'); -print "
\n"; - -&Header::closebox(); - -&Header::openbox('100%', 'left', $Lang::tr{'quick control'}); -# read in the profile names into @profilenames. -my $c; -my $maxprofiles = 5; -my @profilenames = (); - -for ($c = 1; $c <= $maxprofiles; $c++) -{ - my %temppppsettings = (); - $temppppsettings{'PROFILENAME'} = ''; - &General::readhash("${General::swroot}/ppp/settings-$c", \%temppppsettings); - $profilenames[$c] = $temppppsettings{'PROFILENAME'}; -} -my %selected; -for ($c = 1; $c <= $maxprofiles; $c++) { - $selected{'PROFILE'}{$c} = ''; -} -$selected{'PROFILE'}{$pppsettings{'PROFILE'}} = "selected='selected'"; - print <
+ + |