]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Hinzugefuegt:
authordelaco <delaco@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Wed, 19 Jul 2006 14:59:29 +0000 (14:59 +0000)
committerdelaco <delaco@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Wed, 19 Jul 2006 14:59:29 +0000 (14:59 +0000)
  * Interface fuer den Benutzer dial.
Geandert:
  * Standardland fuer OpenSSL-Zertifikate ist statt GB jetzt DE.
  * makegraphs gefixt.

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@214 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

config/httpd/httpd.conf
config/ssl/openssl.cnf
html/cgi-bin/dial/dial.cgi [new file with mode: 0644]
html/cgi-bin/dial/index.cgi [new file with mode: 0644]
html/html/dial.cgi [new file with mode: 0644]
make.sh
src/ROOTFILES.i386
src/scripts/makegraphs

index 5c2c6aea6f71dd07aaffacae4429a9312970d4b0..9422040eb59d291b53934765210a401f5112a980 100644 (file)
-##
-## httpd.conf -- Apache HTTP server configuration file
-##
-ServerType standalone
-ServerRoot /etc/httpd
-
-LockFile /var/lock/httpd.lock
-PidFile /var/run/httpd.pid
-ScoreBoardFile /var/run/httpd.scoreboard
-Timeout 900
-KeepAlive On
-MaxKeepAliveRequests 100
-KeepAliveTimeout 15
-MinSpareServers 1
-MaxSpareServers 2
-StartServers 2
-MaxClients 10
-MaxRequestsPerChild 100
-Port 81
-Listen 81
-Listen 444
-User nobody
-Group nobody
-ServerAdmin root@localhost
-ServerTokens Prod
-DocumentRoot /home/httpd/html
-# Limit track/trace requests
-RewriteEngine on
-RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS)
-RewriteRule .* - [F]
-
-<Directory />
-    Options None
-    AllowOverride None
-</Directory>
-<Directory /home/httpd/html>
-    Options ExecCGI
-    AllowOverride None
-    Order allow,deny
-    Allow from all
-</Directory>
-<DirectoryMatch "/home/httpd/html/(graphs|sgraph)">
-    AuthName "IPFire - Restricted"
-    AuthType Basic
-    AuthUserFile /var/ipfire/auth/users
-    Require user admin
-</DirectoryMatch>
-ScriptAlias /cgi-bin/ /home/httpd/cgi-bin/
-<Directory /home/httpd/cgi-bin>
-    AllowOverride None
-    Options None
-    AuthName "IPFire - Restricted"
-    AuthType Basic
-    AuthUserFile /var/ipfire/auth/users
-    Require user admin
-    <Files chpasswd.cgi>
-        Satisfy Any
-        Allow from All
-    </Files>
-    <Files webaccess.cgi>
-        Satisfy Any
-        Allow from All
-    </Files>
-    <Files credits.cgi>
-        Satisfy Any
-        Allow from All
-    </Files>
-    <Files dial.cgi>
-        Require user admin dial
-    </Files>
-</Directory>
-<IfModule mod_dir.c>
-    DirectoryIndex index.html index.htm index.shtml index.cgi
-</IfModule>
-AccessFileName .htaccess
-<Files ~ "^\.ht">
-    Order allow,deny
-    Deny from all
-</Files>
-<IfModule mod_mime.c>
-    TypesConfig /etc/mime.types
-</IfModule>
-DefaultType text/plain
-
-HostnameLookups Off
-ErrorLog /var/log/httpd/error_log
-LogLevel warn
-LogFormat "%h %l %u %t \"%r\" %>s %b" common
-CustomLog /var/log/httpd/access_log common
-ServerSignature Off
-AddHandler cgi-script .cgi
-<IfModule mod_setenvif.c>
-    BrowserMatch "Mozilla/2" nokeepalive
-    BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
-    BrowserMatch "RealPlayer 4\.0" force-response-1.0
-    BrowserMatch "Java/1\.0" force-response-1.0
-    BrowserMatch "JDK/1\.0" force-response-1.0
-</IfModule>
-
-###
-### SSL Configuration
-###
-AddType application/x-x509-ca-cert .crt
-AddType application/x-pkcs7-crl    .crl
-
-SSLPassPhraseDialog  builtin
-SSLSessionCache         dbm:/var/log/httpd/ssl_scache
-SSLSessionCacheTimeout  900
-SSLMutex  file:/var/log/httpd/ssl_mutex
-SSLRandomSeed startup builtin
-SSLRandomSeed connect builtin
-SSLLog      /var/log/httpd/ssl_engine_log
-SSLLogLevel info
-
-<VirtualHost _default_:444>
-    RewriteEngine on
-    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS)
-    RewriteRule .* - [F]
-    DocumentRoot /home/httpd/html
-    ServerAdmin root@localhost
-    ErrorLog /var/log/httpd/error_log
-    TransferLog /var/log/httpd/access_log
-    SSLEngine on
-    SSLProtocol all -SSLv2
-    SSLCipherSuite ALL:!ADH:!EXPORT56:!eNULL:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW:+EXP
-    SSLCertificateFile /etc/httpd/server.crt
-    SSLCertificateKeyFile /etc/httpd/server.key
-    <Files ~ "\.(cgi|shtml?)$">
-       SSLOptions +StdEnvVars
-    </Files>
-    <Directory /home/httpd/cgi-bin>
-       SSLOptions +StdEnvVars
-    </Directory>
-    SetEnv HOME /home/nobody
-    SetEnvIf User-Agent ".*MSIE.*" \
-       nokeepalive ssl-unclean-shutdown \
-       downgrade-1.0 force-response-1.0
-    CustomLog /var/log/httpd/ssl_request_log \
-       "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
-</VirtualHost>
-
-<Directory /home/httpd/html/backup>
-    Options None
-    AllowOverride None
-    AuthName "IPFire - Restricted"
-    AuthType Basic
-    AuthUserFile /var/ipfire/auth/users
-    require user admin
-</Directory>
-
-include /etc/httpd/conf/hostname.conf
+##\r
+## httpd.conf -- Apache HTTP server configuration file\r
+##\r
+ServerType standalone\r
+ServerRoot /etc/httpd\r
+\r
+LockFile /var/lock/httpd.lock\r
+PidFile /var/run/httpd.pid\r
+ScoreBoardFile /var/run/httpd.scoreboard\r
+Timeout 900\r
+KeepAlive On\r
+MaxKeepAliveRequests 100\r
+KeepAliveTimeout 15\r
+MinSpareServers 1\r
+MaxSpareServers 2\r
+StartServers 2\r
+MaxClients 10\r
+MaxRequestsPerChild 100\r
+Port 81\r
+Listen 81\r
+Listen 444\r
+User nobody\r
+Group nobody\r
+ServerAdmin root@localhost\r
+ServerTokens Prod\r
+DocumentRoot /home/httpd/html\r
+# Limit track/trace requests\r
+RewriteEngine on\r
+RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS)\r
+RewriteRule .* - [F]\r
+\r
+<Directory />\r
+    Options None\r
+    AllowOverride None\r
+</Directory>\r
+<Directory /home/httpd/html>\r
+    Options ExecCGI\r
+    AllowOverride None\r
+    Order allow,deny\r
+    Allow from all\r
+</Directory>\r
+<DirectoryMatch "/home/httpd/html/(graphs|sgraph)">\r
+    AuthName "IPFire - Restricted"\r
+    AuthType Basic\r
+    AuthUserFile /var/ipfire/auth/users\r
+    Require user admin\r
+</DirectoryMatch>\r
+ScriptAlias /cgi-bin/ /home/httpd/cgi-bin/\r
+<Directory /home/httpd/cgi-bin>\r
+    AllowOverride None\r
+    Options None\r
+    AuthName "IPFire - Restricted"\r
+    AuthType Basic\r
+    AuthUserFile /var/ipfire/auth/users\r
+    Require user admin\r
+    <Files chpasswd.cgi>\r
+        Satisfy Any\r
+        Allow from All\r
+    </Files>\r
+    <Files webaccess.cgi>\r
+        Satisfy Any\r
+        Allow from All\r
+    </Files>\r
+    <Files credits.cgi>\r
+        Satisfy Any\r
+        Allow from All\r
+    </Files>\r
+    <Files dial.cgi>\r
+        Require user admin\r
+    </Files>\r
+</Directory>\r
+<Directory /home/httpd/cgi-bin/dial>\r
+    AllowOverride None\r
+    Options None\r
+    AuthName "IPFire - Restricted"\r
+    AuthType Basic\r
+    AuthUserFile /var/ipfire/auth/users\r
+    Require user dial admin\r
+</Directory>\r
+<IfModule mod_dir.c>\r
+    DirectoryIndex index.html index.htm index.shtml index.cgi\r
+</IfModule>\r
+AccessFileName .htaccess\r
+<Files ~ "^\.ht">\r
+    Order allow,deny\r
+    Deny from all\r
+</Files>\r
+<IfModule mod_mime.c>\r
+    TypesConfig /etc/mime.types\r
+</IfModule>\r
+DefaultType text/plain\r
+\r
+HostnameLookups Off\r
+ErrorLog /var/log/httpd/error_log\r
+LogLevel warn\r
+LogFormat "%h %l %u %t \"%r\" %>s %b" common\r
+CustomLog /var/log/httpd/access_log common\r
+ServerSignature Off\r
+AddHandler cgi-script .cgi\r
+<IfModule mod_setenvif.c>\r
+    BrowserMatch "Mozilla/2" nokeepalive\r
+    BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0\r
+    BrowserMatch "RealPlayer 4\.0" force-response-1.0\r
+    BrowserMatch "Java/1\.0" force-response-1.0\r
+    BrowserMatch "JDK/1\.0" force-response-1.0\r
+</IfModule>\r
+\r
+###\r
+### SSL Configuration\r
+###\r
+AddType application/x-x509-ca-cert .crt\r
+AddType application/x-pkcs7-crl    .crl\r
+\r
+SSLPassPhraseDialog  builtin\r
+SSLSessionCache         dbm:/var/log/httpd/ssl_scache\r
+SSLSessionCacheTimeout  900\r
+SSLMutex  file:/var/log/httpd/ssl_mutex\r
+SSLRandomSeed startup builtin\r
+SSLRandomSeed connect builtin\r
+SSLLog      /var/log/httpd/ssl_engine_log\r
+SSLLogLevel info\r
+\r
+<VirtualHost _default_:444>\r
+    RewriteEngine on\r
+    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS)\r
+    RewriteRule .* - [F]\r
+    DocumentRoot /home/httpd/html\r
+    ServerAdmin root@localhost\r
+    ErrorLog /var/log/httpd/error_log\r
+    TransferLog /var/log/httpd/access_log\r
+    SSLEngine on\r
+    SSLProtocol all -SSLv2\r
+    SSLCipherSuite ALL:!ADH:!EXPORT56:!eNULL:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW:+EXP\r
+    SSLCertificateFile /etc/httpd/server.crt\r
+    SSLCertificateKeyFile /etc/httpd/server.key\r
+    <Files ~ "\.(cgi|shtml?)$">\r
+       SSLOptions +StdEnvVars\r
+    </Files>\r
+    <Directory /home/httpd/cgi-bin>\r
+       SSLOptions +StdEnvVars\r
+    </Directory>\r
+    SetEnv HOME /home/nobody\r
+    SetEnvIf User-Agent ".*MSIE.*" \\r
+       nokeepalive ssl-unclean-shutdown \\r
+       downgrade-1.0 force-response-1.0\r
+    CustomLog /var/log/httpd/ssl_request_log \\r
+       "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"\r
+</VirtualHost>\r
+\r
+<Directory /home/httpd/html/backup>\r
+    Options None\r
+    AllowOverride None\r
+    AuthName "IPFire - Restricted"\r
+    AuthType Basic\r
+    AuthUserFile /var/ipfire/auth/users\r
+    require user admin\r
+</Directory>\r
+\r
+include /etc/httpd/conf/hostname.conf\r
index e1689e26155a3312499ece6ccb90068ea396329c..f0906e5470dadb88bf4acec9acc45c5d5183f2b6 100644 (file)
@@ -10,7 +10,7 @@ default_ca    = IPFire
 [ IPFire ]
 dir            = /var/ipfire
 certs          = $dir/certs
-crl_dir                = $dir/crls
+crl_dir        = $dir/crls
 database       = $dir/certs/index.txt
 new_certs_dir  = $dir/certs
 certificate    = $dir/ca/cacert.pem
@@ -44,9 +44,9 @@ string_mask = nombstr
 
 [ req_distinguished_name ]
 countryName                    = Country Name (2 letter code)
-countryName_default            = GB
-countryName_min                        = 2
-countryName_max                        = 2
+countryName_default            = DE
+countryName_min                = 2
+countryName_max                = 2
 
 stateOrProvinceName            = State or Province Name (full name)
 stateOrProvinceName_default    = 
@@ -55,21 +55,21 @@ localityName                        = Locality Name (eg, city)
 #localityName_default          = 
 
 0.organizationName             = Organization Name (eg, company)
-0.organizationName_default     = My Company Ltd
+0.organizationName_default     = IPFire
 
 organizationalUnitName         = Organizational Unit Name (eg, section)
 #organizationalUnitName_default        =
 
 commonName                     = Common Name (eg, your name or your server\'s hostname)
-commonName_max                 = 64
+commonName_max         = 64
 
 emailAddress                   = Email Address
 emailAddress_max               = 40
 
 [ req_attributes ]
 challengePassword              = A challenge password
-challengePassword_min          = 4
-challengePassword_max          = 20
+challengePassword_min  = 4
+challengePassword_max  = 20
 unstructuredName               = An optional company name
 
 [ usr_cert ]
diff --git a/html/cgi-bin/dial/dial.cgi b/html/cgi-bin/dial/dial.cgi
new file mode 100644 (file)
index 0000000..77e4260
--- /dev/null
@@ -0,0 +1,70 @@
+#!/usr/bin/perl
+#
+# SmoothWall CGIs
+#
+# This code is distributed under the terms of the GPL
+#
+# (c) The SmoothWall Team
+#
+# $Id: dial.cgi,v 1.4.2.3 2005/02/22 22:21:55 gespinasse Exp $
+#
+
+use strict;
+
+# enable only the following on debugging purpose
+#use warnings;
+#use CGI::Carp 'fatalsToBrowser';
+
+require '/var/ipfire/general-functions.pl';
+require "${General::swroot}/lang.pl";
+require "${General::swroot}/header.pl";
+
+my %cgiparams=();
+
+$cgiparams{'ACTION'} = '';
+&Header::getcgihash(\%cgiparams);
+
+if ($cgiparams{'ACTION'} eq $Lang::tr{'dial profile'})
+{
+       my $profile = $cgiparams{'PROFILE'};
+       my %tempcgiparams = ();
+       $tempcgiparams{'PROFILE'} = '';
+       &General::readhash("${General::swroot}/ppp/settings-$cgiparams{'PROFILE'}",
+               \%tempcgiparams);
+
+       # make a link from the selected profile to the "default" one.
+       unlink("${General::swroot}/ppp/settings");
+       link("${General::swroot}/ppp/settings-$cgiparams{'PROFILE'}",
+               "${General::swroot}/ppp/settings");
+       system ("/bin/touch", "${General::swroot}/ppp/updatesettings");
+
+       # read in the new params "early" so we can write secrets.
+       %cgiparams = ();
+       &General::readhash("${General::swroot}/ppp/settings", \%cgiparams);
+       $cgiparams{'PROFILE'} = $profile;
+       $cgiparams{'BACKUPPROFILE'} = $profile;
+       &General::writehash("${General::swroot}/ppp/settings-$cgiparams{'PROFILE'}",
+               \%cgiparams);
+
+       # write secrets file.
+       open(FILE, ">/${General::swroot}/ppp/secrets") or die "Unable to write secrets file.";
+       flock(FILE, 2);
+       my $username = $cgiparams{'USERNAME'};
+       my $password = $cgiparams{'PASSWORD'};
+       print FILE "'$username' * '$password'\n";
+       chmod 0600, "${General::swroot}/ppp/secrets";
+       close FILE;
+
+       &General::log("$Lang::tr{'profile made current'} $tempcgiparams{'PROFILENAME'}"); 
+       $cgiparams{'ACTION'} = "$Lang::tr{'dial'}";
+}
+
+if ($cgiparams{'ACTION'} eq $Lang::tr{'dial'}) {
+       system('/etc/rc.d/rc.red','start') == 0
+       or &General::log("Dial failed: $?"); }
+elsif ($cgiparams{'ACTION'} eq $Lang::tr{'hangup'}) {
+       system('/etc/rc.d/rc.red','stop') == 0
+       or &General::log("Hangup failed: $?"); }
+sleep 1;
+
+print "Status: 302 Moved\nLocation: /cgi-bin/dial/index.cgi\n\n";
diff --git a/html/cgi-bin/dial/index.cgi b/html/cgi-bin/dial/index.cgi
new file mode 100644 (file)
index 0000000..5ee1652
--- /dev/null
@@ -0,0 +1,244 @@
+#!/usr/bin/perl
+#
+# SmoothWall CGIs
+#
+# This code is distributed under the terms of the GPL
+#
+# (c) The SmoothWall Team
+#
+
+use strict;
+
+# enable only the following on debugging purpose
+#use warnings;
+#use CGI::Carp 'fatalsToBrowser';
+
+require '/var/ipfire/general-functions.pl';
+require "${General::swroot}/lang.pl";
+require "${General::swroot}/header.pl";
+
+my %cgiparams=();
+my %pppsettings=();
+my %modemsettings=();
+my %netsettings=();
+my %ddnssettings=();
+my $warnmessage = '';
+my $refresh = '';
+my $ipaddr='';
+
+&Header::showhttpheaders();
+
+$cgiparams{'ACTION'} = '';
+&Header::getcgihash(\%cgiparams);
+$pppsettings{'VALID'} = '';
+$pppsettings{'PROFILENAME'} = 'None';
+&General::readhash("${General::swroot}/ppp/settings", \%pppsettings);
+&General::readhash("${General::swroot}/modem/settings", \%modemsettings);
+&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
+&General::readhash("${General::swroot}/ddns/settings", \%ddnssettings);
+my $death = 0;
+my $rebirth = 0;
+
+if ($cgiparams{'ACTION'} eq $Lang::tr{'shutdown'}) {
+       $death = 1;
+       &General::log($Lang::tr{'shutting down ipfire'});
+       system '/usr/local/bin/ipfirereboot down';
+} elsif ($cgiparams{'ACTION'} eq $Lang::tr{'reboot'}) {
+       $rebirth = 1;
+       &General::log($Lang::tr{'rebooting ipfire'});
+       system '/usr/local/bin/ipfirereboot boot';
+}
+
+my $connstate = &Header::connectionstatus();
+if ($connstate =~ /$Lang::tr{'dod waiting'}/ || -e "${General::swroot}/main/refreshindex") {
+       $refresh = "<meta http-equiv='refresh' content='30;'>";
+} elsif ($connstate =~ /$Lang::tr{'connecting'}/) {
+       $refresh = "<meta http-equiv='refresh' content='5;'>";
+}
+
+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'";
+my $dialButtonDisabled = "disabled='disabled'";
+
+
+&Header::openpagewithoutmenu($Lang::tr{'main page'}, 1, $refresh);
+&Header::openbigbox('', 'center');
+&Header::openbox('100%', 'center', &Header::cleanhtml(`/bin/uname -n`,"y"));
+
+if ( ( $pppsettings{'VALID'} eq 'yes' && $modemsettings{'VALID'} eq 'yes' ) || ( $netsettings{'CONFIG_TYPE'} =~ /^(2|3|6|7)$/ && $netsettings{'RED_TYPE'} =~ /^(DHCP|STATIC)$/ )) {
+       if (open(IPADDR,"${General::swroot}/ddns/ipcache")) {
+           $ipaddr = <IPADDR>;
+           close IPADDR;
+           chomp ($ipaddr);
+       }
+       if (open(IPADDR,"${General::swroot}/red/local-ipaddress")) {
+           my $ipaddr = <IPADDR>;
+           close IPADDR;
+           chomp ($ipaddr);
+       }
+} elsif ($modemsettings{'VALID'} eq 'no') {
+       print "$Lang::tr{'modem settings have errors'}\n </b></font>\n";
+} else {
+       print "$Lang::tr{'profile has errors'}\n </b></font>\n";
+}
+
+if ( $netsettings{'RED_TYPE'} =~ /^(DHCP|STATIC)$/ ) {
+       $ipaddr = $netsettings{'RED_ADDRESS'};
+}
+
+print <<END;
+<table border='0'>
+<tr>
+       <td align='center'><form method='post' action="$ENV{'SCRIPT_NAME'}">
+               <input type='submit' name='ACTION' value='$Lang::tr{'refresh'}' />
+       </form></td>
+</tr></table>
+
+<!-- Table of networks -->
+<table border='0' width=80%>
+  <tr> <th bgcolor='lightgrey'>$Lang::tr{'network'}
+       <th bgcolor='lightgrey'>IP
+       <th bgcolor='lightgrey'>$Lang::tr{'status'}
+  <tr> <td bgcolor='$Header::colourred' width='25%'><font size='2' color='white'><b>$Lang::tr{'internet'}:</b></font><br>
+       <td width='30%'>$ipaddr 
+       <td width='45%'>$connstate
+       <tr><td colspan='2'>
+               <form method='post' action='/cgi-bin/dial/dial.cgi'>$Lang::tr{'profile'}:
+                       <select name='PROFILE'>
+END
+       for ($c = 1; $c <= $maxprofiles; $c++)
+       {
+               if ($profilenames[$c] ne '') {
+                       $dialButtonDisabled = "";
+                       print "\t<option value='$c' $selected{'PROFILE'}{$c}>$c. $profilenames[$c]</option>\n";
+               }
+       }
+       $dialButtonDisabled = "disabled='disabled'" if (-e '/var/run/ppp-ipcop.pid' || -e "${General::swroot}/red/active");
+       if ( ( $pppsettings{'VALID'} eq 'yes' ) || ( $netsettings{'CONFIG_TYPE'} =~ /^(2|3|6|7)$/ && $netsettings{'RED_TYPE'} =~ /^(DHCP|STATIC)$/ ) ) {
+               print <<END;
+                               </select>
+                               <input type='submit' name='ACTION' value='$Lang::tr{'dial profile'}' $dialButtonDisabled />
+                       </form>
+                       <td align='center'>
+                               <table width='100%' border='0'>
+                                       <tr>
+                                       <td width='50%' align='right'>  <form method='post' action='/cgi-bin/dial/dial.cgi'>
+                                                                                       <input type='submit' name='ACTION' value='$Lang::tr{'dial'}'>
+                                                                               </form>
+                                       <td width='50%' align='left'>   <form method='post' action='/cgi-bin/dial/dial.cgi'>
+                                                                                       <input type='submit' name='ACTION' value='$Lang::tr{'hangup'}'>
+                                                                               </form>
+                               </table>
+END
+       } else {
+       print "$Lang::tr{'profile has errors'}\n </b></font>\n";
+       }
+
+       if ( $netsettings{'GREEN_DEV'} ) { print <<END;
+               <tr><td bgcolor='$Header::colourgreen' width='25%'><font size='2' color='white'><b>$Lang::tr{'lan'}:</b></font>
+               <td width='30%'>$netsettings{'GREEN_ADDRESS'}
+               <td width='45%'>
+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 <<END;
+               <tr><td bgcolor='$Header::colourblue' width='25%'><font size='2' color='white'><b>$Lang::tr{'wireless'}:</b></font><br>
+               <td width='30%'>$netsettings{'BLUE_ADDRESS'}
+               <td width='45%'>
+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 <<END;
+               <tr><td bgcolor='$Header::colourorange' width='25%'><font size='2' color='white'><b>$Lang::tr{'dmz'}:</b></font><br>
+               <td width='30%'>$netsettings{'ORANGE_ADDRESS'}
+               <td width='45%'><font color=$Header::colourgreen>Online</font>
+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-`;
+               print <<END;
+               <tr><td bgcolor='$Header::colourvpn' width='25%'><font size='2' color='white'><b>$Lang::tr{'vpn'}:</b></font><br>
+               <td width='30%'>$ipsecip
+               <td width='45%'><font color=$Header::colourgreen>Online</font>
+END
+       }
+       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 <<END;
+               <tr><td bgcolor='$Header::colourovpn' width='25%'><font size='2' color='white'><b>OpenVPN:</b></font><br>
+               <td width='30%'>$ovpnip
+               <td width='45%'><font color=$Header::colourgreen>Online</font>
+END
+       }
+       if ( $netsettings{'DNS1'} ) { print <<END;
+       <tr><td>DNS-Server: <td>$netsettings{'DNS1'}
+END
+       }
+       if ( $netsettings{'DNS2'} ) { print <<END;
+       <td>$netsettings{'DNS2'}
+END
+       }
+print <<END;
+</table>
+END
+
+&Header::closebox();
+
+&Header::openbox('100%', 'left', $Lang::tr{'shutdown2'});
+
+if ($death == 0 && $rebirth == 0) {
+               print <<END
+               <form method='post' action='$ENV{'SCRIPT_NAME'}'>
+               <table width='100%'>
+               <tr>
+                       <td width='50%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'reboot'}' /></td>
+                       <td width='50%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'shutdown'}' /></td>
+               </tr>
+               </table>
+               </form>
+END
+;
+} else {
+       my $message='';
+       my $title='';
+       if ($death) {
+               $title = $Lang::tr{'shutting down'};
+               $message = $Lang::tr{'ipfire has now shutdown'};
+       } else {
+               $title = $Lang::tr{'rebooting'};
+               $message = $Lang::tr{'ipfire has now rebooted'};
+       }
+       print <<END
+               <font size='6'><center>$message</center></font>
+END
+;
+}
+
+&Header::closebox();
+
+&Header::closebigbox();
+
+&Header::closepage();
diff --git a/html/html/dial.cgi b/html/html/dial.cgi
new file mode 100644 (file)
index 0000000..7c7b7db
--- /dev/null
@@ -0,0 +1,4 @@
+#!/usr/bin/perl
+
+print "Status: 302 Moved\n";
+print "Location: /cgi-bin/dial/index.cgi\n\n";
diff --git a/make.sh b/make.sh
index 1073e0e3214edb9bf7174624c067b6d8e3876a5c..66e821ff284b8eb851c776efd6dc98b5ad18d98c 100644 (file)
--- a/make.sh
+++ b/make.sh
@@ -25,7 +25,7 @@
 
   NAME="IPFire"                        # Software name
   SNAME="ipfire"                       # Short name
-  VERSION="1.4"                        # Version number
+  VERSION="2.0"                        # Version number
   SLOGAN="We secure your network"      # Software slogan
   CONFIG_ROOT=/var/ipfire              # Configuration rootdir
   NICE=10
index e5ccd172e4f4a5870768e21e220f8afd2d40bb2b..813595968ea20f3b36189414043aee86522fdfba 100644 (file)
@@ -21025,6 +21025,7 @@ home/httpd/cgi-bin/country.cgi
 home/httpd/cgi-bin/credits.cgi
 home/httpd/cgi-bin/ddns.cgi
 home/httpd/cgi-bin/dhcp.cgi
+home/httpd/cgi-bin/dial
 home/httpd/cgi-bin/dial.cgi
 home/httpd/cgi-bin/dmzholes.cgi
 home/httpd/cgi-bin/graphs.cgi
@@ -27209,7 +27210,7 @@ usr/bin/wget
 usr/etc/wgetrc
 ##
 ## xmbmon205
-/usr/bin/mbmon
+usr/bin/mbmon
 ##
 ##
 ## mc
index bcac55346d366eec28aefbbea59cb17753adb826..9c680a8996cdd5694c0e54396b3cbb1217d36a9a 100644 (file)
@@ -34,8 +34,6 @@ my (%settings, @ipacsum, $iface, $ERROR);
 my %mbmon_settings = ();
 &General::readhash("${General::swroot}/mbmon/settings", \%mbmon_settings);
 
-
-
 # Added for conversion of utf-8 characters
 use Encode 'from_to';
 my %tr=();
@@ -68,9 +66,8 @@ my @args = ();
 my $count = 0;
 my $ERROR;
 my $dbg = 0;
-my $path_rrd = "/var/log/rrd";
-my $path_graphs = "/home/httpd/html/graphs";
 my $path_smartctl = "/usr/sbin/smartctl";
+my $path_hddtemp = "/usr/sbin/hddtemp";
 
 my %colors = ();
 $colors{"1"} = "#0000FF";
@@ -715,10 +712,10 @@ sub updatelqgraph {
 
 sub updatehdddata 
 {
-  if ( ! -e "$path_rrd/hddtemp.rrd") 
+  if ( ! -e "$rrdlog/hddtemp.rrd") 
   {
     # database did not exist -> create
-    RRDs::create ("$path_rrd/hddtemp.rrd", "--step=300",
+    RRDs::create ("$rrdlog/hddtemp.rrd", "--step=300",
       "DS:temperature:GAUGE:600:0:100",
       "RRA:AVERAGE:0.5:1:576",
       "RRA:AVERAGE:0.5:6:672",
@@ -781,7 +778,7 @@ sub updatehdddata
 #  print "hdd  $hdd_output \n";
 #  print "temp $temp \n";
 
-  RRDs::update ("$path_rrd/hddtemp.rrd", "-t", "temperature", "N:$temp");
+  RRDs::update ("$rrdlog/hddtemp.rrd", "-t", "temperature", "N:$temp");
 
   $ERROR = RRDs::error;
   print "Error in RRD::update for hdd: $ERROR\n" if $ERROR;
@@ -809,11 +806,11 @@ sub updatehddgraph {
 
 sub updatembmondata 
 {
-  if ( ! -e "$path_rrd/mbmon.rrd" )
+  if ( ! -e "$rrdlog/mbmon.rrd" )
   {
     # database did not exist -> create
 
-    @args = ("$path_rrd/mbmon.rrd");
+    @args = ("$rrdlog/mbmon.rrd");
 
     push(@args, "--step=300");
     foreach $key ( sort(keys %mbmon_values) ) 
@@ -848,7 +845,7 @@ sub updatembmondata
   print("update template = '$template'\n") if ( $dbg );
   print("update value    = '$value'\n") if ( $dbg );
 
-  RRDs::update("$path_rrd/mbmon.rrd", "-t", $template, $value);
+  RRDs::update("$rrdlog/mbmon.rrd", "-t", $template, $value);
   $ERROR = RRDs::error;
   print("Error in RRD::update for mbmon: $ERROR\n") if $ERROR;
 }
@@ -858,7 +855,7 @@ sub updatetempgraph
   my $type   = "temp";
   my $period = $_[0];
 
-  @args = ("$path_graphs/mbmon-$type-$period.png", "--start", "-1$period", "-aPNG", "-i", "-z",
+  @args = ("$graphs/mbmon-$type-$period.png", "--start", "-1$period", "-aPNG", "-i", "-z",
     "--alt-y-grid", "-w 600", "-h 100", "--alt-autoscale",
     "--color", "SHADEA#EAE9EE",
     "--color", "SHADEB#EAE9EE",
@@ -875,7 +872,7 @@ sub updatetempgraph
         $mbmon_settings{'LABEL-'.$key} = $key;
       }
 
-      push(@args, "DEF:$key=$path_rrd/mbmon.rrd:$key:AVERAGE");
+      push(@args, "DEF:$key=$rrdlog/mbmon.rrd:$key:AVERAGE");
       push(@args, "LINE2:$key$colors{$count}:$mbmon_settings{'LABEL-'.$key} $tr{'mbmon temp in'} °C");
       push(@args, "GPRINT:$key:MAX:$tr{'maximal'}\\:%5.1lf °C");
       push(@args, "GPRINT:$key:AVERAGE:$tr{'average'}\\:%5.1lf °C");
@@ -898,7 +895,7 @@ sub updatefangraph
   my $type   = "fan";
   my $period = $_[0];
 
-  @args = ("$path_graphs/mbmon-$type-$period.png", "--start", "-1$period", "-aPNG", "-i", "-z",
+  @args = ("$graphs/mbmon-$type-$period.png", "--start", "-1$period", "-aPNG", "-i", "-z",
     "--alt-y-grid", "-w 600", "-h 100", "--alt-autoscale",
     "--color", "SHADEA#EAE9EE",
     "--color", "SHADEB#EAE9EE",
@@ -915,7 +912,7 @@ sub updatefangraph
         $mbmon_settings{'LABEL-'.$key} = $key;
       }
 
-      push(@args, "DEF:$key=$path_rrd/mbmon.rrd:$key:AVERAGE");
+      push(@args, "DEF:$key=$rrdlog/mbmon.rrd:$key:AVERAGE");
       push(@args, "LINE2:$key$colors{$count}:$mbmon_settings{'LABEL-'.$key} $tr{'mbmon fan in'} rpm");
       push(@args, "GPRINT:$key:MAX:$tr{'maximal'}\\:%5.0lf rpm");
       push(@args, "GPRINT:$key:AVERAGE:$tr{'average'}\\:%5.0lf rpm");
@@ -938,7 +935,7 @@ sub updatevoltgraph
   my $type   = "volt";
   my $period = $_[0];
 
-  @args = ("$path_graphs/mbmon-$type-$period.png", "--start", "-1$period", "-aPNG", "-i", "-z",
+  @args = ("$graphs/mbmon-$type-$period.png", "--start", "-1$period", "-aPNG", "-i", "-z",
     "--alt-y-grid", "-w 600", "-h 100", "--alt-autoscale",
     "--color", "SHADEA#EAE9EE",
     "--color", "SHADEB#EAE9EE",
@@ -956,7 +953,7 @@ sub updatevoltgraph
         $mbmon_settings{'LABEL-'.$key} = $key;
       }
 
-      push(@args, "DEF:$key=$path_rrd/mbmon.rrd:$key:AVERAGE");
+      push(@args, "DEF:$key=$rrdlog/mbmon.rrd:$key:AVERAGE");
       push(@args, "LINE2:$key$colors{$count}:$mbmon_settings{'LABEL-'.$key} V");
       push(@args, "GPRINT:$key:MAX:$tr{'maximal'}\\:%5.2lf V");
       push(@args, "GPRINT:$key:AVERAGE:$tr{'average'}\\:%5.2lf V");