]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/outgoingfw.cgi
Added GRE and ESP protocoll to outgoing fw.
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / outgoingfw.cgi
index f3cf581a6a06aae27b9b817bd264e0e7b3a3f7f5..1632f909207b726f5df7152976425833d9bb0065 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2009  Michael Tremer & Christian Schmidt                      #
+# Copyright (C) 2010  Michael Tremer & Christian Schmidt                      #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -21,8 +21,8 @@
 
 use strict;
 # enable only the following on debugging purpose
-use warnings;
-use CGI::Carp 'fatalsToBrowser';
+#use warnings;
+#use CGI::Carp 'fatalsToBrowser';
 
 require '/var/ipfire/general-functions.pl';
 require "${General::swroot}/lang.pl";
@@ -111,6 +111,23 @@ if ($outfwsettings{'POLICY'} eq 'MODE0'){ $selected{'POLICY'}{'MODE0'} = 'select
 if ($outfwsettings{'POLICY'} eq 'MODE1'){ $selected{'POLICY'}{'MODE1'} = 'selected'; } else { $selected{'POLICY'}{'MODE1'} = ''; }
 if ($outfwsettings{'POLICY'} eq 'MODE2'){ $selected{'POLICY'}{'MODE2'} = 'selected'; } else { $selected{'POLICY'}{'MODE2'} = ''; }
 
+if ( $outfwsettings{'TIME_MON'} eq "" &&
+     $outfwsettings{'TIME_TUE'} eq "" &&
+        $outfwsettings{'TIME_WED'} eq "" &&
+        $outfwsettings{'TIME_THU'} eq "" &&
+        $outfwsettings{'TIME_FRI'} eq "" &&
+        $outfwsettings{'TIME_SAT'} eq "" &&
+        $outfwsettings{'TIME_SUN'} eq "" )
+        {
+               $outfwsettings{'TIME_MON'} = "on";
+               $outfwsettings{'TIME_TUE'} = "on";
+               $outfwsettings{'TIME_WED'} = "on";
+               $outfwsettings{'TIME_THU'} = "on";
+               $outfwsettings{'TIME_FRI'} = "on";
+               $outfwsettings{'TIME_SAT'} = "on";
+               $outfwsettings{'TIME_SUN'} = "on";
+        }
+
 &Header::openpage('Ausgehende Firewall', 1, '');
 &Header::openbigbox('100%', 'left', '', $errormessage);
 
@@ -441,7 +458,7 @@ END
 if ($outfwsettings{'POLICY'} eq 'MODE1'){
 print <<END
                                        <tr bgcolor='$color{'color20'}'><form method='post' action='$ENV{'SCRIPT_NAME'}'>
-                                           <td align='center'>tcp&udp
+                                           <td align='center'>all
                                            <td align='center'>all
                                            <td align='center'>ALL
                                            <td align='center'>drop
@@ -560,7 +577,15 @@ sub addrule
                    <td width='20%' align='right' colspan='2'>$Lang::tr{'active'}:
                    <td width='30%' align='left' colspan='2'><input type='checkbox' name='ENABLED' $selected{'ENABLED'} />
                <tr><td width='20%' align='right'>$Lang::tr{'protocol'}:
-                   <td width='30%' align='left'><select name='PROT'><option value='all' $selected{'PROT'}{'all'}>All</option><option value='tcp' $selected{'PROT'}{'tcp'}>TCP</option><option value='tcp&udp' $selected{'PROT'}{'tcp&udp'}>TCP & UDP</option><option value='udp' $selected{'PROT'}{'udp'}>UDP</option></select>
+                   <td width='30%' align='left'>
+                       <select name='PROT'>
+                               <option value='all' $selected{'PROT'}{'all'}>All</option>
+                               <option value='tcp' $selected{'PROT'}{'tcp'}>TCP</option>
+                               <option value='udp' $selected{'PROT'}{'udp'}>UDP</option>
+                               <option value='gre' $selected{'PROT'}{'gre'}>GRE</option>
+                               <option value='esp' $selected{'PROT'}{'esp'}>ESP</option>
+                               <option value='tcp&udp' $selected{'PROT'}{'tcp&udp'}>TCP & UDP</option>
+                       </select>
                    <td width='20%' align='right' colspan='2'>$Lang::tr{'policy'}:
                    <td width='30%' align='left' colspan='2'>
 END