]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Merge branch 'next' of ssh://arne_f@git.ipfire.org/pub/git/ipfire-2.x into next
authorArne Fitzenreiter <arne_f@ipfire.org>
Thu, 14 Oct 2010 06:29:18 +0000 (08:29 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Thu, 14 Oct 2010 06:29:18 +0000 (08:29 +0200)
Conflicts:
doc/packages-list.txt

18 files changed:
config/guardian/guardian.pl
config/guardian/guardian_block.sh
config/guardian/guardian_unblock.sh
doc/packages-list.txt
html/cgi-bin/outgoinggrp.cgi
html/cgi-bin/urlfilter.cgi
html/cgi-bin/vpnmain.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
lfs/guardian
lfs/imspector
lfs/samba
lfs/vsftpd
src/initscripts/init.d/firewall
src/initscripts/init.d/openvmtools
src/initscripts/init.d/vdradmin

index 0c37c34f4f8e22e4bd59c44dfcf9bd9069a7029e..c7fd5f8656acdbd100c6a2009719c890f0bb0f51 100644 (file)
@@ -50,6 +50,8 @@ print "My gatewayaddess is: $gatewayaddr\n";
                        # destination was found.
        "$hostipaddr" => 1);
 
+&get_aliases;
+
 %sshhash = ();
 
 if ( -e $targetfile ) {
@@ -186,8 +188,8 @@ sub ipchain {
        my ($source, $dest, $type) = @_;
        &write_log ("$source\t$type\n");
        if ($hash{$source} eq "") {
-               &write_log ("Running '$blockpath $source'\n");
-               system ("$blockpath $source");
+               &write_log ("Running '$blockpath $source $interface'\n");
+               system ("$blockpath $source $interface");
                $hash{$source} = time() + $TimeLimit;
        } else {
 # We have already blocked this one, but snort detected another attack. So
@@ -244,6 +246,9 @@ sub load_conf {
                }
                if (/Interface\s+(.*)/) {
                        $interface = $1;
+                       if ( $interface eq "" ) {
+                               $interface = `cat /var/ipfire/ethernet/settings | grep RED_DEV | cut -d"=" -f2`;
+                       }
                }
                if (/AlertFile\s+(.*)/) {
                        $alert_file = $1;
@@ -265,16 +270,13 @@ sub load_conf {
                }
        }
 
-       if ($interface eq "") {
-               die "Fatal! Interface is undefined.. Please define it in $opt_o with keyword Interface\n";
-       }
        if ($alert_file eq "") {
                print "Warning! AlertFile is undefined.. Assuming /var/log/snort.alert\n";
                $alert_file="/var/log/snort.alert";
        }
        if ($hostipaddr eq "") {
                print "Warning! HostIpAddr is undefined! Attempting to guess..\n";
-               $hostipaddr = &get_ip($interface);
+               $hostipaddr = `cat /var/ipfire/red/local-ipaddress`;
                print "Got it.. your HostIpAddr is $hostipaddr\n";
        }
        if ($ignorefile eq "") {
@@ -345,30 +347,9 @@ sub daemonize {
        }
 }
 
-sub get_ip {
-       my ($interface) = $_[0];
-       my $ip;
-       open (IFCONFIG, "/bin/netstat -iee |grep $interface -A7 |");
-       while (<IFCONFIG>) {
-               if ($OS eq "FreeBSD") {
-                       if (/inet (\d+\.\d+\.\d+\.\d+)/) {
-                               $ip = $1;
-                       }
-               }
-               if ($OS eq "Linux") {
-                       if (/inet addr:(\d+\.\d+\.\d+\.\d+)/) {
-                               $ip = $1;
-                       }
-               }
-       }
-       close (IFCONFIG);
-
-       if ($ip eq "") { die "Couldn't figure out the ip address\n"; }
-               $ip;
-       }
-
 sub sig_handler_setup {
-       $SIG{TERM} = \&clean_up_and_exit; # kill
+       $SIG{INT} = \&clean_up_and_exit; # kill -2
+       $SIG{TERM} = \&clean_up_and_exit; # kill -9
        $SIG{QUIT} = \&clean_up_and_exit; # kill -3
 #  $SIG{HUP} = \&flush_and_reload; # kill -1
 }
@@ -387,7 +368,7 @@ sub remove_blocks {
 sub call_unblock {
        my ($source, $message) = @_;
        &write_log ("$message");
-       system ("$unblockpath $source");
+       system ("$unblockpath $source $interface");
 }
 
 sub clean_up_and_exit {
@@ -412,3 +393,22 @@ sub load_targetfile {
        close (TARG);
        print "Loaded $count addresses from $targetfile\n";
 }
+
+sub get_aliases {
+       my $ip;
+       print "Scanning for aliases on $interface and add them to the target hash...";
+
+       open (IFCONFIG, "/sbin/ip addr show $interface |");
+       my @lines = <IFCONFIG>;
+       close(IFCONFIG);
+
+       foreach $line (@lines) {
+               if ( $line =~ /inet (\d+\.\d+\.\d+\.\d+)/) {
+                       $ip = $1;
+                       print " got $ip on $interface ... ";
+                       $targethash{'$ip'} = "1";
+               }
+       }
+
+       print "done \n";
+}
\ No newline at end of file
index 0a44325f187755e5047d63a1105eb17f8fc1f3b7..a8331faaa1d2f9a5cb6869583128bef2db226a62 100644 (file)
@@ -2,10 +2,11 @@
 
 # this is a sample block script for guardian. This should work with ipchains. 
 # This command gets called by guardian as such:
-#  guardian_block.sh <source_ip>
+#  guardian_block.sh <source_ip> <interface>
 # and the script will issue a command to block all traffic from that source ip
 # address. The logic of weither or not it is safe to block that address is
 # done inside guardian itself.
 source=$1
+interface=$2
 
-/sbin/iptables -I GUARDIANINPUT -s $source -j DROP
+/sbin/iptables -I GUARDIAN -s $source -i $interface -j DROP
index e0d3b5d4812093557cf8838bce4f0f9ca24a386f..315d77195117084e535d365936f4a69f3ca902d0 100644 (file)
@@ -2,8 +2,9 @@
 
 # this is a sample unblock script for guardian. This should work with ipchains. 
 # This command gets called by guardian as such:
-#  unblock.sh <source_ip>
+#  unblock.sh <source_ip> <interface>
 # and the script will issue a command to remove the block that was created with # block.sh address. 
 source=$1
+interface=$2
 
-/sbin/iptables -D GUARDIANINPUT -s $source -j DROP
+/sbin/iptables -D GUARDIAN -s $source -i $interface -j DROP
index dac3ba473d1703a36b0d5cdd517e3ea7988286fe..4d9d11e9b673bfee26554477db1658a4ad10f7a1 100644 (file)
 * igb-2.3.4-kmod-2.6.32.24-ipfire-xen
 * igmpproxy-0.1
 * imspector-0.9
+* imspector-20101008
 * inetutils-1.4.2
 * ipaddr-1.2
 * iperf-2.0.4
 * rsync-3.0.7
 * rtorrent-0.8.6
 * samba-3.5.5
+* samba-3.5.6
 * sane-1.0.19
 * screen-4.0.3
 * sdparm-1.01
 * spandsp-0.0.6pre12
 * splix-2.0.0-rc2
 * sqlite-3.6.10
-* squid-2.7.STABLE9
+* squid-3.1.8
 * squidGuard-1.4.1
 * squidclamav-5.4
 * sshfs-fuse-2.2
 * vnstat-1.6
 * vnstati-beta3
 * vsftpd-2.1.2
+* vsftpd-2.2.2
 * w_scan-20080105
 * watchdog-5.9
 * wget-1.10.2
index f99468e4fcdec808b548641c9f4ebe1700facc33..a00db2a7411e06fb3f6322d8ab534374fc190ac5 100644 (file)
@@ -137,7 +137,7 @@ $ipgroupcontent =~ s/\n/<br \/>/g;
 &Header::openbox('100%', 'center', $Lang::tr{'outgoing firewall ip groups'});
 
 print <<END
-<a name="outgoing showipgroup"</a>
+<a name="outgoing showipgroup"></a>
 <br />
 <form method='post' action='$ENV{'SCRIPT_NAME'}#outgoing showipgroup'>
 <table width='95%' cellspacing='0'>
@@ -214,7 +214,7 @@ $macgroupcontent =~ s/\n/<br \/>/g;
 &Header::openbox('100%', 'center', $Lang::tr{'outgoing firewall mac groups'});
 
 print <<END
-<a name="outgoing showmacgroup"</a>
+<a name="outgoing showmacgroup"></a>
 <br />
 <form method='post' action='$ENV{'SCRIPT_NAME'}#outgoing showmacgroup'>
 <table width='95%' cellspacing='0'>
index eea32bff2226d4df1863b76c03937fb5318ef156..1bfc0392cd6c788cf5115f48d99538c9dded0170 100644 (file)
@@ -1213,6 +1213,10 @@ print <<END
        <td colspan='2'>$Lang::tr{'urlfilter blocked domains'}&nbsp;<img src='/blob.gif' alt='*' /></td>
        <td colspan='2'>$Lang::tr{'urlfilter blocked urls'}&nbsp;<img src='/blob.gif' alt='*' /></td>
 </tr>
+<tr>
+       <td colspan='2'>$Lang::tr{'urlfilter example'}</td>
+       <td colspan='2'>$Lang::tr{'urlfilter example ads'}</td>
+</tr>
 <tr>
        <td colspan='2' width='50%'><textarea name='CUSTOM_BLACK_DOMAINS' cols='32' rows='6' wrap='off'>
 END
@@ -1252,6 +1256,10 @@ print <<END
        <td colspan='2'>$Lang::tr{'urlfilter allowed domains'}&nbsp;<img src='/blob.gif' alt='*' /></td>
        <td colspan='2'>$Lang::tr{'urlfilter allowed urls'}&nbsp;<img src='/blob.gif' alt='*' /></td>
 </tr>
+<tr>
+       <td colspan='2'>$Lang::tr{'urlfilter example'}</td>
+       <td colspan='2'>$Lang::tr{'urlfilter example ads'}</td>
+</tr>
 <tr>
        <td colspan='2' width='50%'><textarea name='CUSTOM_WHITE_DOMAINS' cols='32' rows='6' wrap='off'>
 END
index 8a740635a01f0eb5e3e3f02d2682d417a532a7c4..f303cfbc2cb0ead196690353b841788b1efe57e9 100644 (file)
@@ -1988,7 +1988,7 @@ END
        print <<END
        <table width='100%' cellpadding='0' cellspacing='5' border='0'>
        <tr><td class='base' width='50%'>$Lang::tr{'use a pre-shared key'}</td>
-           <td class='base' width='50%'><input type='text' name='PSK' size='30' value='$cgiparams{'PSK'}' /></td>
+           <td class='base' width='50%'><input type='password' name='PSK' size='30' value='$cgiparams{'PSK'}' /></td>
        </tr>
        </table>
 END
@@ -2006,7 +2006,7 @@ END
        <table width='100%' cellpadding='0' cellspacing='5' border='0'>
        <tr><td width='5%'><input type='radio' name='AUTH' value='psk' $checked{'AUTH'}{'psk'} $pskdisabled/></td>
            <td class='base' width='55%'>$Lang::tr{'use a pre-shared key'}</td>
-           <td class='base' width='40%'><input type='text' name='PSK' size='30' value='$cgiparams{'PSK'}' $pskdisabled/></td></tr>
+           <td class='base' width='40%'><input type='password' name='PSK' size='30' value='$cgiparams{'PSK'}' $pskdisabled/></td></tr>
        <tr><td colspan='3' bgcolor='#000000'></td></tr>
        <tr><td><input type='radio' name='AUTH' value='certreq' $checked{'AUTH'}{'certreq'} $cakeydisabled /></td>
            <td class='base'><hr />$Lang::tr{'upload a certificate request'}</td>
index 6b01831d5a8833b92f5dd6137fd65e13d472c079..0936af009cd6d9c8fc173fcb77cacf63da532f3a 100644 (file)
 'urlfilter enable log' => 'Aktiviere Protokoll',
 'urlfilter enable rewrite rules' => 'Aktiviere lokale Dateiumleitung',
 'urlfilter enabled' => 'Aktiviert:',
+'urlfilter example' => 'Beispiel: www.domain.com',
+'urlfilter example ads' => 'Beispiel: www.domain.com/ads/',
 'urlfilter export blacklist' => 'Blacklist exportieren',
 'urlfilter export error' => 'Kann Exportdatei nicht erstellen',
 'urlfilter expressions' => 'Ausdrücke (einen pro Zeile)',
index 907de5d800d8a8eef9f60bf052592f0dda8e6c2c..b35a23a7818e56eb72b400c141914cfe26c6fb4d 100644 (file)
 'urlfilter enable log' => 'Enable log',
 'urlfilter enable rewrite rules' => 'Enable local file redirection',
 'urlfilter enabled' => 'Enabled:',
+'urlfilter example' => 'Example: www.domain.com',
+'urlfilter example ads' => 'Example: www.domain.com/ads/',
 'urlfilter export blacklist' => 'Export blacklist',
 'urlfilter export error' => 'Unable to create export file',
 'urlfilter expressions' => 'Expressions (one per line)',
index 8074cd29dc95a7bb78c547d724ae98fe00239275..ca2b9348dc7dffd707768ed27ad4e1170e20509c 100644 (file)
 'urlfilter enable log' => 'Activar registro',
 'urlfilter enable rewrite rules' => 'Activar redirección de archivos locales',
 'urlfilter enabled' => 'Activado:',
+'urlfilter example' => 'Ejemplo: www.domain.com',
+'urlfilter example ads' => 'Ejemplo: www.domain.com/ads/',
 'urlfilter export blacklist' => 'Exportar lista negra',
 'urlfilter export error' => 'Imposible crear archivo de exportación',
 'urlfilter expressions' => 'Frases (una por línea)',
index 7904bb631d2ec812384513181d219989dcdc02aa..0179e73da8100c0e9c3e4300ca0a16cfef895742 100644 (file)
 'urlfilter enable log' => 'Activer log',
 'urlfilter enable rewrite rules' => 'Activer fichier local de redirection',
 'urlfilter enabled' => 'Activé:',
+'urlfilter example' => 'Exemple: www.domain.com',
+'urlfilter example ads' => 'Exemple: www.domain.com/ads/',
 'urlfilter export blacklist' => 'Exporter Blackliste',
 'urlfilter export error' => 'Impossible de créer fichier d\'exportation',
 'urlfilter expressions' => 'Expressions (une par ligne)',
index 6cec09bd9dcc498ed0f790b4e6accc16f1f6d15c..251a56f2aade641f08eea6e8bcad7a1da14c1c02 100644 (file)
@@ -30,7 +30,7 @@ THISAPP    = guardian-$(VER)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = guardian
-PAK_VER    = 6
+PAK_VER    = 7
 
 DEPS       = ""
 
index 31e358dcbd97f39bc4917ac46ed7d6aa48e7a1e3..092211bc8c9b8398fd2ce8f8a3b4a4dca990e0fe 100644 (file)
@@ -24,7 +24,7 @@
 
 include Config
 
-VER        = 0.9
+VER        = 20101008
 
 THISAPP    = imspector-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
@@ -32,7 +32,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = imspector
-PAK_VER    = 1
+PAK_VER    = 2
 
 DEPS       = ""
 
@@ -44,7 +44,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = 626abf7c2b8f15d56df679ad66624575
+$(DL_FILE)_MD5 = 032407bb13ccddb77328f83eded102ee
 
 install : $(TARGET)
 
@@ -77,9 +77,10 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
-       cd $(DIR_APP) && make install
+       cd $(DIR_SRC)/imspector && make install
        -mv /usr/etc/imspector /etc/imspector
-       install -v -m 755  $(DIR_CONF)/imspector/imspector.conf /etc/imspector.conf
+       -mv /etc/imspector/imspector /etc/imspector
+       install -v -m 755 $(DIR_CONF)/imspector/imspector.conf /etc/imspector.conf
        install -v -m 644 $(DIR_SRC)/config/backup/includes/imspector /var/ipfire/backup/addons/includes/imspector
        chmod 755 /srv/web/ipfire/cgi-bin/imspector.cgi
        chown nobody:nobody -R /var/log/imspector
index 496a2bf06e7690407195855f38600304ef1d8820..8a354d85dff61410d7b768d91c4932b478cae326 100644 (file)
--- a/lfs/samba
+++ b/lfs/samba
@@ -24,7 +24,7 @@
 
 include Config
 
-VER        = 3.5.5
+VER        = 3.5.6
 
 THISAPP    = samba-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
@@ -32,7 +32,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = samba
-PAK_VER    = 30
+PAK_VER    = 31
 
 DEPS       = "cups"
 
@@ -44,7 +44,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = 278728aeeef9db7e27fa6a2ce5b43509
+$(DL_FILE)_MD5 = bf6c09ea497a166df8bd672db1d8da8f
 
 install : $(TARGET)
 
index e4cb67c4e55b4014e383b581d2a084f43126d845..d5e809399e185525202c7400110b8798a2089b1d 100644 (file)
@@ -24,7 +24,7 @@
 
 include Config
 
-VER        = 2.1.2
+VER        = 2.2.2
 
 THISAPP    = vsftpd-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
@@ -32,7 +32,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = vsftpd
-PAK_VER    = 5
+PAK_VER    = 6
 
 DEPS       = ""
 
@@ -44,7 +44,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = 6a8c8579d50adf0d0fc07226c03bfb52
+$(DL_FILE)_MD5 = 6d6bc136af14c23f8fef6f1a51f55418
 
 install : $(TARGET)
 
index 366ae071c83f52e20598991997f0799c413b7e6a..f4d5611d3694efdbbe059ff91b4dac6b977c8c84 100644 (file)
@@ -140,8 +140,9 @@ case "$1" in
        # CUSTOM chains, can be used by the users themselves
        /sbin/iptables -N CUSTOMINPUT
        /sbin/iptables -A INPUT -j CUSTOMINPUT
-       /sbin/iptables -N GUARDIANINPUT
-       /sbin/iptables -A INPUT -j GUARDIANINPUT
+       /sbin/iptables -N GUARDIAN
+       /sbin/iptables -A INPUT -j GUARDIAN
+       /sbin/iptables -A FORWARD -j GUARDIAN
        /sbin/iptables -N CUSTOMFORWARD
        /sbin/iptables -A FORWARD -j CUSTOMFORWARD
        /sbin/iptables -N CUSTOMOUTPUT
index c1588e1dcbdedbed287bcf98c140fe97b62b031e..a3bd0736ecf66fdf0128e4c9140f8171fdc757e3 100755 (executable)
@@ -4,9 +4,9 @@
 #
 # Description : init-script for open-vm-tools
 #
-# Authors     : earl
+# Authors     : Jan Paul Tuecking (earl@ipfire.org)
 #
-# Version     : 00.01
+# Version     : 1.00
 #
 # Notes       :
 #
index c7a565d0ec1afaea43d62a62ee3d0e0a13d385fd..a0858de35f8077275f141d02b2ab1991cb2a36bc 100644 (file)
@@ -8,7 +8,8 @@
 #
 # Version     : 01.00
 #
-# Notes       :
+# Notes       : Changes in 01.01
+#             : v.2.6.7 needs /var/run/vdradmin dir (earl@ipfire.org)
 #
 ########################################################################
 
@@ -18,6 +19,7 @@
 case "${1}" in
        start)
                boot_mesg "Starting VDR Webadministration Tool..."
+               mkdir /var/run/vdradmin -p
                loadproc /usr/bin/vdradmind > /dev/null
                evaluate_retval
                ;;