mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
DMZ Pinholes korrigiert
Kleine Anpassung am Guardian Skript Samba init beim restart das sleep verlängert git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@744 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -67,7 +67,6 @@ $counter=0;
|
|||||||
open (ALERT2, "/var/log/messages" ) or die "can't open /var/log/messages: $!\n";
|
open (ALERT2, "/var/log/messages" ) or die "can't open /var/log/messages: $!\n";
|
||||||
seek (ALERT2, 0, 2); # set the position to EOF.
|
seek (ALERT2, 0, 2); # set the position to EOF.
|
||||||
# this is the same as a tail -f :)
|
# this is the same as a tail -f :)
|
||||||
$counter2=0;
|
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
sleep 1;
|
sleep 1;
|
||||||
@@ -85,14 +84,7 @@ for (;;) {
|
|||||||
my @array=split(/ /,$_);&checkem ($array[5], $hostipaddr, "Portscan was detected.");}
|
my @array=split(/ /,$_);&checkem ($array[5], $hostipaddr, "Portscan was detected.");}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# Run this stuff every 30 seconds..
|
|
||||||
if ($counter == 30) {
|
|
||||||
&remove_blocks; # This might get moved elsewhere, depending on how much load
|
|
||||||
# it puts on the system..
|
|
||||||
&check_log_name;
|
|
||||||
$counter=0;
|
|
||||||
} else { $counter=$counter+1; }
|
|
||||||
|
|
||||||
sleep 1;
|
sleep 1;
|
||||||
if (seek(ALERT2,0,1)){
|
if (seek(ALERT2,0,1)){
|
||||||
while (<ALERT2>) {
|
while (<ALERT2>) {
|
||||||
@@ -102,12 +94,12 @@ for (;;) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
# Run this stuff every 30 seconds..
|
# Run this stuff every 30 seconds..
|
||||||
if ($counter2 == 30) {
|
if ($counter == 30) {
|
||||||
&remove_blocks; # This might get moved elsewhere, depending on how much load
|
&remove_blocks; # This might get moved elsewhere, depending on how much load
|
||||||
# it puts on the system..
|
# it puts on the system..
|
||||||
&check_log_name;
|
&check_log_name;
|
||||||
$counter2=0;
|
$counter=0;
|
||||||
} else { $counter2=$counter2+1; }
|
} else { $counter=$counter+1; }
|
||||||
}
|
}
|
||||||
|
|
||||||
sub check_log_name {
|
sub check_log_name {
|
||||||
|
|||||||
@@ -423,18 +423,14 @@ sub validNet
|
|||||||
|
|
||||||
sub haveOrangeNet
|
sub haveOrangeNet
|
||||||
{
|
{
|
||||||
if ($netsettings{'CONFIG_TYPE'} == 1) {return 1;}
|
if ($netsettings{'CONFIG_TYPE'} == 2) {return 1;}
|
||||||
if ($netsettings{'CONFIG_TYPE'} == 3) {return 1;}
|
if ($netsettings{'CONFIG_TYPE'} == 4) {return 1;}
|
||||||
if ($netsettings{'CONFIG_TYPE'} == 5) {return 1;}
|
|
||||||
if ($netsettings{'CONFIG_TYPE'} == 7) {return 1;}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub haveBlueNet
|
sub haveBlueNet
|
||||||
{
|
{
|
||||||
|
if ($netsettings{'CONFIG_TYPE'} == 3) {return 1;}
|
||||||
if ($netsettings{'CONFIG_TYPE'} == 4) {return 1;}
|
if ($netsettings{'CONFIG_TYPE'} == 4) {return 1;}
|
||||||
if ($netsettings{'CONFIG_TYPE'} == 5) {return 1;}
|
|
||||||
if ($netsettings{'CONFIG_TYPE'} == 6) {return 1;}
|
|
||||||
if ($netsettings{'CONFIG_TYPE'} == 7) {return 1;}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ case "$1" in
|
|||||||
|
|
||||||
restart)
|
restart)
|
||||||
$0 stop
|
$0 stop
|
||||||
sleep 3
|
sleep 5
|
||||||
$0 start
|
$0 start
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user