]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/outgoingfw.cgi
Readded the mac filter to the outgoing firewall. Added mac groups.
[ipfire-2.x.git] / html / cgi-bin / outgoingfw.cgi
index b746a8e36b2cbc1890bd82ad2de54133e5615f6c..3482f35f0f2c1cb7995eb08c263dd200a149ef62 100644 (file)
@@ -321,7 +321,7 @@ END
                $outfwsettings{'ACTION'} = 'Add rule';
        }
 }
-if ($outfwsettings{'ACTION'} eq 'Add rule')
+if ($outfwsettings{'ACTION'} eq $Lang::tr{'Add Rule'})
 {
        &addrule();
        exit
@@ -343,7 +343,7 @@ if ($outfwsettings{'POLICY'} ne 'MODE0'){
        &Header::openbox('100%', 'center', 'Rules');
                print <<END
        <form method='post' action='$ENV{'SCRIPT_NAME'}'>
-               <input type='submit' name='ACTION' value='Add rule' />
+               <input type='submit' name='ACTION' value='$Lang::tr{'Add Rule'}' />
        </form>
 END
 ;
@@ -462,14 +462,22 @@ END
 END
 ;
                                        if (($outfwsettings{'SIP'}) || ($outfwsettings{'SMAC'})) {
-                                               unless ($outfwsettings{'SIP'}) { $outfwsettings{'DISPLAY_SIP'} = 'ALL'; } else { $outfwsettings{'DISPLAY_SIP'} = $outfwsettings{'SIP'}; }
-                                               unless ($outfwsettings{'SMAC'}) { $outfwsettings{'DISPLAY_SMAC'} = 'ALL'; } else { $outfwsettings{'DISPLAY_SMAC'} = $outfwsettings{'SMAC'}; }
-                                               print <<END
-                                               <tr><td width='14%' align='right'>$Lang::tr{'source ip or net'}:
-                                                   <td width='14%' align='left'>$outfwsettings{'DISPLAY_SIP'}
-                                                   <td width='44%' colspan='2' align='center'>
-END
-;
+
+                                               unless ($outfwsettings{'SIP'}) {
+                                                       $outfwsettings{'DISPLAY_SIP'} = 'ALL';
+                                               } else {
+                                                       $outfwsettings{'DISPLAY_SIP'} = $outfwsettings{'SIP'};
+                                               }
+
+                                               unless ($outfwsettings{'SMAC'}) {
+                                                       $outfwsettings{'DISPLAY_SMAC'} = 'ALL';
+                                                       print "<tr><td /><td align='left'>$Lang::tr{'source ip or net'}: </td>";
+                                                       print "<td align='left' colspan='2'>$outfwsettings{'DISPLAY_SIP'}</td>";
+                                               } else {
+                                                       $outfwsettings{'DISPLAY_SMAC'} = $outfwsettings{'SMAC'};
+                                                       print "<tr><td /><td align='left'>$Lang::tr{'source'} $Lang::tr{'mac address'}: </td>";
+                                                       print "<td align='left' colspan='2'>$outfwsettings{'DISPLAY_SMAC'}</td>";
+                                               }
                                        }
                                                print <<END
                                                <tr><td width='14%' align='right'>$Lang::tr{'time'} -  </td>
@@ -627,7 +635,7 @@ print <<END
                        <td width='30%' align='left' colspan='2'><input type='checkbox' name='ENABLED' $selected{'ENABLED'} /></td>
                </tr>
                <tr>
-                       <td width='20%' align='right'>$Lang::tr{'protocol'}:</td>
+                       <td width='20%' align='right'>$Lang::tr{'protocol'}</td>
                        <td width='30%' align='left'>
                                <select name='PROT'>
                                        <option value='all' $selected{'PROT'}{'all'}>All</option>
@@ -655,6 +663,9 @@ END
                                <select name='SNET'>
                                        <optgroup label='---'>
                                                <option value='all' $selected{'SNET'}{'ALL'}>$Lang::tr{'all'}</option>
+                                       <optgroup label='$Lang::tr{'mac address'}'>
+                                               <option value='mac' $selected{'SNET'}{'mac'}>$Lang::tr{'source'} $Lang::tr{'mac address'}</option>
+                                       </optgroup>
                                        <optgroup label='$Lang::tr{'ip address'}'>
                                                <option value='ip' $selected{'SNET'}{'ip'}>$Lang::tr{'source ip or net'}</option>
                                                <option value='red' $selected{'SNET'}{'red'}>$Lang::tr{'red'} IP</option>
@@ -674,19 +685,35 @@ END
        }
        print <<END
                                        </optgroup>
-                                       <optgroup label='$Lang::tr{'advproxy NCSA group'}'>
+                                       <optgroup label='IP $Lang::tr{'advproxy NCSA group'}'>
 END
 ;
        my @ipgroups = qx(ls $configpath/ipgroups/);
        foreach (sort @ipgroups){
                print "\t\t\t\t\t<option value='$_' $selected{'SNET'}{'$_'}>$_</option>\n";
        }
+       print <<END
+                                       </optgroup>
+                                       <optgroup label='MAC $Lang::tr{'advproxy NCSA group'}'>
+END
+;
+       my @macgroups = qx(ls $configpath/macgroups/);
+       foreach (sort @macgroups){
+               print "\t\t\t\t\t<option value='$_' $selected{'SNET'}{'$_'}>$_</option>\n";
+       }
        print <<END
                                        </optgroup>
                                </select>
                        </td>
-                       <td width='20%' align='right' colspan='2'>$Lang::tr{'source ip or net'}<img src='/blob.gif' /></td>
-                       <td width='30%' align='left' colspan='2'><input type='text' name='SIP' value='$outfwsettings{'SIP'}' /></td>
+                       <td align='right' colspan='4'><font color='red'>$Lang::tr{'outgoingfw warning'}</font></td>
+               </tr>
+               <tr>
+                       <td align='right' colspan='4' >$Lang::tr{'source ip or net'}<img src='/blob.gif' /></td>
+                       <td align='left' colspan='4' ><input type='text' name='SIP' value='$outfwsettings{'SIP'}' /></td>
+               </tr>
+               <tr>
+                       <td align='right' colspan='4' >$Lang::tr{'source'} $Lang::tr{'mac address'}: <img src='/blob.gif' />
+                       <td align='left' colspan='4' ><input type='text' name='SMAC' maxlength='23' value='$outfwsettings{'SMAC'}' />
                </tr>
                <tr>
                        <td width='20%' align='right'>$Lang::tr{'logging'}:</td>