]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Some bugfixes for the outgoing fw and grouping feature.
authorChristian Schmidt <christian.schmidt@ipfire.org>
Fri, 3 Sep 2010 10:25:41 +0000 (12:25 +0200)
committerChristian Schmidt <christian.schmidt@ipfire.org>
Fri, 3 Sep 2010 10:25:41 +0000 (12:25 +0200)
config/outgoingfw/outgoingfw.pl
html/cgi-bin/ids.cgi
html/cgi-bin/outgoingfw.cgi
html/cgi-bin/outgoinggrp.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl
langs/es/cgi-bin/es.pl
langs/fr/cgi-bin/fr.pl

index b323c380479ab9ec1501bae75a3a8e6296dd82ec..e2f9093f0d7c091585024f15e61392de21eba85f 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2005-2010  IPTifre Team                                       #
+# Copyright (C) 2005-2010  IPFire Team                                        #
 #                                                                             #
 # 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        #
@@ -164,6 +164,7 @@ foreach $configentry (sort @configs)
                                @SOURCE = `cat /var/ipfire/outgoing/groups/ipgroups/$configline[2]`;
                        } elsif ( -e "/var/ipfire/outgoing/groups/macgroups/$configline[2]" ) {
                                @SOURCE = `cat /var/ipfire/outgoing/groups/macgroups/$configline[2]`;
+                               $configline[2] = "mac";
                        }
                        $DEV = "";
                }
@@ -188,7 +189,7 @@ foreach $configentry (sort @configs)
 
                                if ( $SOURCE eq "" ){next;}
 
-                               if ( $configline[6] ne "" ){
+                               if ( $configline[6] ne "" || $configline[2] eq 'mac' ){
                                        $SOURCE =~ s/[^a-zA-Z0-9]/:/gi;
                                        $CMD = "/sbin/iptables -A OUTGOINGFWMAC -m mac --mac-source $SOURCE -d $DESTINATION -p $PROTO";
                                } else {
index 4d66d22d76bee20635896603b64031b50c78ef52..1b70ca693b7b173d547beb19897c39bf2d66b6a8 100644 (file)
@@ -264,11 +264,11 @@ if (-e "/etc/snort/snort.conf") {
 
 if ($snortsettings{'RULES'} eq 'subscripted') {
        #$url="http://dl.snort.org/sub-rules/snortrules-snapshot-2.8_s.tar.gz?oink_code=$snortsettings{'OINKCODE'}";
-       $url=" http://www.snort.org/reg-rules/snortrules-snapshot-2860_s.tar.gz/$snortsettings{'OINKCODE'}";
+       $url=" http://www.snort.org/reg-rules/snortrules-snapshot-2861_s.tar.gz/$snortsettings{'OINKCODE'}";
        #$url="http://www.snort.org/pub-bin/oinkmaster.cgi/$snortsettings{'OINKCODE'}/snortrules-snapshot-2.8_s.tar.gz";
 } elsif ($snortsettings{'RULES'} eq 'registered') {
        #$url="http://dl.snort.org/reg-rules/snortrules-snapshot-2.8.tar.gz?oink_code=$snortsettings{'OINKCODE'}";
-       $url=" http://www.snort.org/reg-rules/snortrules-snapshot-2860.tar.gz/$snortsettings{'OINKCODE'}";
+       $url=" http://www.snort.org/reg-rules/snortrules-snapshot-2861.tar.gz/$snortsettings{'OINKCODE'}";
        #$url="http://www.snort.org/pub-bin/oinkmaster.cgi/$snortsettings{'OINKCODE'}/snortrules-snapshot-2.8.tar.gz";
 } else {
        $url="http://www.emergingthreats.net/rules/emerging.rules.tar.gz";
index 3482f35f0f2c1cb7995eb08c263dd200a149ef62..07fcb39cbbd43258288476217fc455b63f8d3414 100644 (file)
@@ -567,13 +567,13 @@ END
                if ($p2pline[2] eq 'on') {
                        print <<END
                                <input type='hidden' name='ACTION' value='disable' />
-                               <input type='image' name='submit' src='/images/stock_ok.png' alt='$Lang::tr{'outgoingfw p2p allow'}' title='$Lang::tr{'outgoingfw p2p allow'}'/>
+                               <input type='image' name='submit' src='/images/stock_ok.png' alt='$Lang::tr{'outgoing firewall p2p allow'}' title='$Lang::tr{'outgoing firewall p2p allow'}'/>
 END
 ;
                } else {
                        print <<END
                                <input type='hidden' name='ACTION' value='enable' />
-                               <input type='image' name='submit' src='/images/stock_stop.png' alt='$Lang::tr{'outgoingfw p2p deny'}' title='$Lang::tr{'outgoingfw p2p deny'}' />
+                               <input type='image' name='submit' src='/images/stock_stop.png' alt='$Lang::tr{'outgoing firewall p2p deny'}' title='$Lang::tr{'outgoing firewall p2p deny'}' />
 END
 ;
                }
@@ -584,7 +584,7 @@ END
        }
        print <<END
        </table>
-  <br />$Lang::tr{'outgoingfw p2p description 1'} <img src='/images/stock_ok.png' align='absmiddle' alt='$Lang::tr{'outgoingfw p2p deny'}'> $Lang::tr{'outgoingfw p2p description 2'} <img src='/images/stock_stop.png' align='absmiddle' alt='$Lang::tr{'outgoingfw p2p deny'}'> $Lang::tr{'outgoingfw p2p description 3'}
+  <br />$Lang::tr{'outgoing firewall p2p description 1'} <img src='/images/stock_ok.png' align='absmiddle' alt='$Lang::tr{'outgoing firewall p2p deny'}'> $Lang::tr{'outgoing firewall p2p description 2'} <img src='/images/stock_stop.png' align='absmiddle' alt='$Lang::tr{'outgoing firewall p2p deny'}'> $Lang::tr{'outgoing firewall p2p description 3'}
 END
 ;
        &Header::closebox();
@@ -594,9 +594,9 @@ END
 print <<END
        <form method='post' action='$ENV{'SCRIPT_NAME'}'>
        <table width='100%'>
-               <tr><td width='10%' align='left'><b>$Lang::tr{'mode'} 0:</b><td width='90%' align='left' colspan='2'>$Lang::tr{'outgoingfw mode0'}</td></tr>
-               <tr><td width='10%' align='left'><b>$Lang::tr{'mode'} 1:</b><td width='90%' align='left' colspan='2'>$Lang::tr{'outgoingfw mode1'}</td></tr>
-               <tr><td width='10%' align='left'><b>$Lang::tr{'mode'} 2:</b><td width='90%' align='left' colspan='2'>$Lang::tr{'outgoingfw mode2'}</td></tr>
+               <tr><td width='10%' align='left'><b>$Lang::tr{'mode'} 0:</b><td width='90%' align='left' colspan='2'>$Lang::tr{'outgoing firewall mode0'}</td></tr>
+               <tr><td width='10%' align='left'><b>$Lang::tr{'mode'} 1:</b><td width='90%' align='left' colspan='2'>$Lang::tr{'outgoing firewall mode1'}</td></tr>
+               <tr><td width='10%' align='left'><b>$Lang::tr{'mode'} 2:</b><td width='90%' align='left' colspan='2'>$Lang::tr{'outgoing firewall mode2'}</td></tr>
                <tr><td colspan='3'><hr /></td></tr>
                <tr><td width='10%' align='left'>       <select name='POLICY' style="width: 85px"><option value='MODE0' $selected{'POLICY'}{'MODE0'}>$Lang::tr{'mode'} 0</option><option value='MODE1' $selected{'POLICY'}{'MODE1'}>$Lang::tr{'mode'} 1</option><option value='MODE2' $selected{'POLICY'}{'MODE2'}>$Lang::tr{'mode'} 2</option></select>
                    <td width='45%' align='left'><input type='submit' name='ACTION' value=$Lang::tr{'save'} />
@@ -605,7 +605,7 @@ END
 ;
        if ($outfwsettings{'POLICY'} ne 'MODE0') {
                print <<END
-                   $Lang::tr{'outgoingfw reset'}: <input type='submit' name='ACTION' value=$Lang::tr{'reset'} />
+                   $Lang::tr{'outgoing firewall reset'}: <input type='submit' name='ACTION' value=$Lang::tr{'reset'} />
 END
 ;
        }
@@ -705,7 +705,7 @@ END
                                        </optgroup>
                                </select>
                        </td>
-                       <td align='right' colspan='4'><font color='red'>$Lang::tr{'outgoingfw warning'}</font></td>
+                       <td align='right' colspan='4'><font color='red'>$Lang::tr{'outgoing firewall warning'}</font></td>
                </tr>
                <tr>
                        <td align='right' colspan='4' >$Lang::tr{'source ip or net'}<img src='/blob.gif' /></td>
index 28e52611826dd62aa4505c6baddcfedada5b2210..f99468e4fcdec808b548641c9f4ebe1700facc33 100644 (file)
@@ -84,6 +84,10 @@ if ($outgrpsettings{'ACTION'} eq 'newipgroup')
 
        if ( -e "$configpath/macgroups/$outgrpsettings{'ipgroup'}" ){
                $errormessage =  "$Lang::tr{'outgoing firewall group error'}";
+       } elsif ( $outgrpsettings{'ipgroup'} eq "all" || $outgrpsettings{'ipgroup'} eq "red" || $outgrpsettings{'ipgroup'} eq "blue" ||
+                       $outgrpsettings{'ipgroup'} eq "green" || $outgrpsettings{'ipgroup'} eq "orange" || $outgrpsettings{'ipgroup'} eq "ip" ||
+                       $outgrpsettings{'ipgroup'} eq "mac" || $outgrpsettings{'ipgroup'} eq "ovpn" || $outgrpsettings{'ipgroup'} eq "ipsec" ) {
+               $errormessage =  "$Lang::tr{'outgoing firewall reserved groupname'}";
        } else {
                open (FILE, ">$configpath/ipgroups/$outgrpsettings{'ipgroup'}") or die "Can't save $outgrpsettings{'ipgroup'} settings $!";
                flock (FILE, 2);
@@ -101,6 +105,10 @@ if ($outgrpsettings{'ACTION'} eq 'newmacgroup')
 
        if ( -e "$configpath/ipgroups/$outgrpsettings{'macgroup'}" ){
                $errormessage =  "$Lang::tr{'outgoing firewall group error'}";
+       } elsif ( $outgrpsettings{'macgroup'} eq "all" || $outgrpsettings{'macgroup'} eq "red" || $outgrpsettings{'macgroup'} eq "blue" ||
+                       $outgrpsettings{'macgroup'} eq "green" || $outgrpsettings{'macgroup'} eq "orange" || $outgrpsettings{'macgroup'} eq "ip" ||
+                       $outgrpsettings{'macgroup'} eq "mac" || $outgrpsettings{'macgroup'} eq "ovpn" || $outgrpsettings{'macgroup'} eq "ipsec" ) {
+               $errormessage =  "$Lang::tr{'outgoing firewall reserved groupname'}";
        } else {
                open (FILE, ">$configpath/macgroups/$outgrpsettings{'macgroup'}") or die "Can't save $outgrpsettings{'macgroup'} settings $!";
                flock (FILE, 2);
index aa09abe3ad1e6c9725848459f30d528135b68d48..6b01831d5a8833b92f5dd6137fd65e13d472c079 100644 (file)
@@ -22,7 +22,8 @@
 'ConnSched scheduled actions' => 'Geplante Aktionen',
 'ConnSched scheduler' => 'Scheduler',
 'ConnSched select profile' => 'Wähle Profil',
-'outgoingfw warning' => 'Nur die Auswahl Quell IP / MAC aktiviert diese',
+'outgoing firewall warning' => 'Nur die Auswahl Quell IP / MAC aktiviert diese',
+'outgoing firewall outgoing firewall reserved groupname' => 'Bitte einen anderen Gruppennamen verwenden, dieser ist ein reserviertes Wort.',
 'ConnSched time' => 'Zeit:',
 'ConnSched up' => 'Hoch',
 'ConnSched weekdays' => 'Wochentage:',
index 2c053daf90aea9b4d5435c50c5d29f04ba4d64f3..907de5d800d8a8eef9f60bf052592f0dda8e6c2c 100644 (file)
@@ -19,7 +19,8 @@
 'ConnSched ipsecstop' => 'IPSec stop',
 'ConnSched reconnect' => 'Reconnect',
 'ConnSched scheduled actions' => 'Scheduled actions',
-'outgoingfw warning' => 'Not selecting source ip or mac ignores them',
+'outgoing firewall warning' => 'Not selecting source ip or mac ignores them',
+'outgoing firewall outgoing firewall reserved groupname' => 'Please use another group name, this name is reserved.',
 'ConnSched scheduler' => 'Scheduler',
 'ConnSched select profile' => 'Select profile',
 'modify' => 'Modify',
index 8b7d2937acf8248c59b2716cd018575f2d47db0e..8074cd29dc95a7bb78c547d724ae98fe00239275 100644 (file)
@@ -18,7 +18,8 @@
 'ConnSched ipsecstop' => 'Detener IPSec',
 'ConnSched reconnect' => 'Reconectar',
 'ConnSched scheduled actions' => 'Acciones planificadas',
-'outgoingfw warning' => 'No seleccionar ip origen o mac las ignora',
+'outgoing firewall warning' => 'No seleccionar ip origen o mac las ignora',
+'outgoing firewall outgoing firewall reserved groupname' => 'Por favor, utilice otro nombre de grupo, este nombre está reservado',
 'ConnSched scheduler' => 'Planificador',
 'ConnSched select profile' => 'Elegir Perfil',
 'modify' => 'Modificar',
index 7d76c78d0c52151291994631c7a0aceaad30d476..7904bb631d2ec812384513181d219989dcdc02aa 100644 (file)
@@ -18,7 +18,8 @@
 'ConnSched ipsecstart' => 'IPSec (re)démarrage',
 'ConnSched ipsecstop' => 'IPSec arrêt',
 'ConnSched reconnect' => 'Reconnecter',
-'outgoingfw warning' => 'Ne pas choisir IP source ou Mac ignore les',
+'outgoing firewall warning' => 'Ne pas choisir IP source ou Mac ignore les',
+'outgoing firewall outgoing firewall reserved groupname' => 'S il vous plaît utilisez un autre nom de groupe, ce nom est réservé.',
 'ConnSched scheduled actions' => 'Actions planifiées',
 'ConnSched scheduler' => 'Planificateur',
 'ConnSched select profile' => 'Sélectionner profil',