]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/optionsfw.cgi
firewall options: Fix translation and spelling of new ALG section
[ipfire-2.x.git] / html / cgi-bin / optionsfw.cgi
index 73a2f59a6a3879676a55169576be9c1076e8613f..7a0e8e0c4ebc4cc455a239e84455c808e41b2e45 100644 (file)
@@ -11,7 +11,6 @@
 # $Id: optionsfw.cgi,v 1.1.2.10 2005/10/03 00:34:10 gespinasse Exp $
 #
 #
-
 # enable only the following on debugging purpose
 #use warnings;
 #use CGI::Carp 'fatalsToBrowser';
@@ -27,13 +26,13 @@ my %fwdfwsettings=();
 my %configfwdfw=();
 my %configoutgoingfw=();
 
-my $configfwdfw                = "${General::swroot}/forward/config";
-my $configoutgoing     = "${General::swroot}/forward/outgoing";
+my $configfwdfw                = "${General::swroot}/firewall/config";
+my $configoutgoing     = "${General::swroot}/firewall/outgoing";
 my $errormessage = '';
 my $warnmessage = '';
 my $filename = "${General::swroot}/optionsfw/settings";
 
-&General::readhash("${General::swroot}/forward/settings", \%fwdfwsettings);
+&General::readhash("${General::swroot}/firewall/settings", \%fwdfwsettings);
 &Header::showhttpheaders();
 
 #Get GUI values
@@ -42,7 +41,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'save'}) {
        if ($settings{'defpol'} ne '1'){
                $errormessage .= $Lang::tr{'new optionsfw later'};
                &General::writehash($filename, \%settings);             # Save good settings
-               system("/usr/local/bin/forwardfwctrl");
+               system("/usr/local/bin/firewallctrl");
        }else{
                if ($settings{'POLICY'} ne ''){
                        $fwdfwsettings{'POLICY'} = $settings{'POLICY'};
@@ -55,9 +54,9 @@ if ($settings{'ACTION'} eq $Lang::tr{'save'}) {
                %fwdfwsettings = ();
                $fwdfwsettings{'POLICY'} = "$MODE";
                $fwdfwsettings{'POLICY1'} = "$MODE1";
-               &General::writehash("${General::swroot}/forward/settings", \%fwdfwsettings);
-               &General::readhash("${General::swroot}/forward/settings", \%fwdfwsettings);
-               system("/usr/local/bin/forwardfwctrl");
+               &General::writehash("${General::swroot}/firewall/settings", \%fwdfwsettings);
+               &General::readhash("${General::swroot}/firewall/settings", \%fwdfwsettings);
+               system("/usr/local/bin/firewallctrl");
        }
        &General::readhash($filename, \%settings);             # Load good settings
 }
@@ -71,6 +70,17 @@ if ($errormessage) {
         &Header::closebox();
 }
 
+# Set new defaults
+if (!$settings{'MASQUERADE_GREEN'}) {
+       $settings{'MASQUERADE_GREEN'} = 'on';
+}
+if (!$settings{'MASQUERADE_ORANGE'}) {
+       $settings{'MASQUERADE_ORANGE'} = 'on';
+}
+if (!$settings{'MASQUERADE_BLUE'}) {
+       $settings{'MASQUERADE_BLUE'} = 'on';
+}
+
 $checked{'DROPNEWNOTSYN'}{'off'} = '';
 $checked{'DROPNEWNOTSYN'}{'on'} = '';
 $checked{'DROPNEWNOTSYN'}{$settings{'DROPNEWNOTSYN'}} = "checked='checked'";
@@ -110,15 +120,87 @@ $checked{'SHOWTABLES'}{$settings{'SHOWTABLES'}} = "checked='checked'";
 $checked{'SHOWDROPDOWN'}{'off'} = '';
 $checked{'SHOWDROPDOWN'}{'on'} = '';
 $checked{'SHOWDROPDOWN'}{$settings{'SHOWDROPDOWN'}} = "checked='checked'";
+$checked{'CONNTRACK_FTP'}{'off'} = '';
+$checked{'CONNTRACK_FTP'}{'on'} = '';
+$checked{'CONNTRACK_FTP'}{$settings{'CONNTRACK_FTP'}} = "checked='checked'";
+$checked{'CONNTRACK_H323'}{'off'} = '';
+$checked{'CONNTRACK_H323'}{'on'} = '';
+$checked{'CONNTRACK_H323'}{$settings{'CONNTRACK_H323'}} = "checked='checked'";
+$checked{'CONNTRACK_IRC'}{'off'} = '';
+$checked{'CONNTRACK_IRC'}{'on'} = '';
+$checked{'CONNTRACK_IRC'}{$settings{'CONNTRACK_IRC'}} = "checked='checked'";
+$checked{'CONNTRACK_SIP'}{'off'} = '';
+$checked{'CONNTRACK_SIP'}{'on'} = '';
+$checked{'CONNTRACK_SIP'}{$settings{'CONNTRACK_SIP'}} = "checked='checked'";
+$checked{'CONNTRACK_TFTP'}{'off'} = '';
+$checked{'CONNTRACK_TFTP'}{'on'} = '';
+$checked{'CONNTRACK_TFTP'}{$settings{'CONNTRACK_TFTP'}} = "checked='checked'";
 $selected{'FWPOLICY'}{$settings{'FWPOLICY'}}= 'selected';
 $selected{'FWPOLICY1'}{$settings{'FWPOLICY1'}}= 'selected';
 $selected{'FWPOLICY2'}{$settings{'FWPOLICY2'}}= 'selected';
+$selected{'MASQUERADE_GREEN'}{'off'} = '';
+$selected{'MASQUERADE_GREEN'}{'on'} = '';
+$selected{'MASQUERADE_GREEN'}{$settings{'MASQUERADE_GREEN'}} = 'selected="selected"';
+$selected{'MASQUERADE_ORANGE'}{'off'} = '';
+$selected{'MASQUERADE_ORANGE'}{'on'} = '';
+$selected{'MASQUERADE_ORANGE'}{$settings{'MASQUERADE_ORANGE'}} = 'selected="selected"';
+$selected{'MASQUERADE_BLUE'}{'off'} = '';
+$selected{'MASQUERADE_BLUE'}{'on'} = '';
+$selected{'MASQUERADE_BLUE'}{$settings{'MASQUERADE_BLUE'}} = 'selected="selected"';
 
-&Header::openbox('100%', 'center', $Lang::tr{'options fw'});
+&Header::openbox('100%', 'center',);
 print "<form method='post' action='$ENV{'SCRIPT_NAME'}'>";
 
-print <<END
+print <<END;
 <form method='post' action='$ENV{'SCRIPT_NAME'}'>
+       <table width='95%' cellspacing='0'>
+               <tr bgcolor='$color{'color20'}'>
+                       <td colspan='2' align='left'><b>$Lang::tr{'masquerading'}</b></td>
+               </tr>
+               <tr>
+                       <td align='left' width='60%'>$Lang::tr{'masquerade green'}</td>
+                       <td>
+                               <select name='MASQUERADE_GREEN'>
+                                       <option value='on' $selected{'MASQUERADE_GREEN'}{'on'}>$Lang::tr{'masquerading enabled'}</option>
+                                       <option value='off' $selected{'MASQUERADE_GREEN'}{'off'}>$Lang::tr{'masquerading disabled'}</option>
+                               </select>
+                       </td>
+               </tr>
+END
+
+       if (&Header::orange_used()) {
+               print <<END;
+                       <tr>
+                               <td align='left' width='60%'>$Lang::tr{'masquerade orange'}</td>
+                               <td>
+                                       <select name='MASQUERADE_ORANGE'>
+                                               <option value='on' $selected{'MASQUERADE_ORANGE'}{'on'}>$Lang::tr{'masquerading enabled'}</option>
+                                               <option value='off' $selected{'MASQUERADE_ORANGE'}{'off'}>$Lang::tr{'masquerading disabled'}</option>
+                                       </select>
+                               </td>
+                       </tr>
+END
+       }
+
+       if (&Header::blue_used()) {
+               print <<END;
+                       <tr>
+                               <td align='left' width='60%'>$Lang::tr{'masquerade blue'}</td>
+                               <td>
+                                       <select name='MASQUERADE_BLUE'>
+                                               <option value='on' $selected{'MASQUERADE_BLUE'}{'on'}>$Lang::tr{'masquerading enabled'}</option>
+                                               <option value='off' $selected{'MASQUERADE_BLUE'}{'off'}>$Lang::tr{'masquerading disabled'}</option>
+                                       </select>
+                               </td>
+                       </tr>
+END
+       }
+
+       print <<END
+       </table>
+
+       <br>
+
 <table width='95%' cellspacing='0'>
 <tr bgcolor='$color{'color20'}'><td colspan='2' align='left'><b>$Lang::tr{'fw logging'}</b></td></tr>
 <tr><td align='left' width='60%'>$Lang::tr{'drop newnotsyn'}</td><td align='left'>on <input type='radio' name='DROPNEWNOTSYN' value='on' $checked{'DROPNEWNOTSYN'}{'on'} />/
@@ -156,7 +238,22 @@ print <<END
                                                                                                                                                                                <input type='radio' name='SHOWTABLES' value='off' $checked{'SHOWTABLES'}{'off'} /> off</td></tr>
 <tr><td align='left' width='60%'>$Lang::tr{'fw settings dropdown'}</td><td align='left'>on <input type='radio' name='SHOWDROPDOWN' value='on' $checked{'SHOWDROPDOWN'}{'on'} />/
                                                                                                                                                                                <input type='radio' name='SHOWDROPDOWN' value='off' $checked{'SHOWDROPDOWN'}{'off'} /> off</td></tr>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
-</table>                                                                                                                                                                               
+</table>
+<br />
+<table width='95%' cellspacing='0'>
+<tr bgcolor='$color{'color20'}'><td colspan='2' align='left'><b>$Lang::tr{'application layer gateways'}</b></td></tr>
+<tr><td align='left' width='60%'>FTP</td><td align='left'>on <input type='radio' name='CONNTRACK_FTP' value='on' $checked{'CONNTRACK_FTP'}{'on'} />/
+                                                                                                                                                                               <input type='radio' name='CONNTRACK_FTP' value='off' $checked{'CONNTRACK_FTP'}{'off'} /> off</td></tr>
+<tr><td align='left' width='60%'>H.323</td><td align='left'>on <input type='radio' name='CONNTRACK_H323' value='on' $checked{'CONNTRACK_H323'}{'on'} />/
+                                                                                                                                                                               <input type='radio' name='CONNTRACK_H323' value='off' $checked{'CONNTRACK_H323'}{'off'} /> off</td></tr>
+<tr><td align='left' width='60%'>IRC</td><td align='left'>on <input type='radio' name='CONNTRACK_IRC' value='on' $checked{'CONNTRACK_IRC'}{'on'} />/
+                                                                                                                                                                               <input type='radio' name='CONNTRACK_IRC' value='off' $checked{'CONNTRACK_IRC'}{'off'} /> off</td></tr>
+<tr><td align='left' width='60%'>SIP</td><td align='left'>on <input type='radio' name='CONNTRACK_SIP' value='on' $checked{'CONNTRACK_SIP'}{'on'} />/
+                                                                                                                                                                               <input type='radio' name='CONNTRACK_SIP' value='off' $checked{'CONNTRACK_SIP'}{'off'} /> off</td></tr>
+<tr><td align='left' width='60%'>TFTP</td><td align='left'>on <input type='radio' name='CONNTRACK_TFTP' value='on' $checked{'CONNTRACK_TFTP'}{'on'} />/
+                                                                                                                                                                               <input type='radio' name='CONNTRACK_TFTP' value='off' $checked{'CONNTRACK_TFTP'}{'off'} /> off</td></tr>
+
+</table>
 <br />
 <table width='95%' cellspacing='0'>
 <tr bgcolor='$color{'color20'}'><td colspan='2' align='left'><b>$Lang::tr{'fw default drop'}</b></td></tr>
@@ -175,8 +272,8 @@ print <<END
 </table>
 
 <br />
-<table width='10%' cellspacing='0'>
-<tr><td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'>
+<table width='100%' cellspacing='0'>
+<tr><td align='right'><form method='post' action='$ENV{'SCRIPT_NAME'}'>
 <input type='submit' name='ACTION' value=$Lang::tr{'save'} />
 </form></td></tr>
 </table>