-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
78f8f85
commit cef0716
Showing
31 changed files
with
217 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# ufw-php-gui | ||
UFW (Universal Firewall) PHP GUI | ||
# ufw-php-gui | ||
UFW (Universal Firewall) PHP GUI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#/bin/bash | ||
src_ip=$1 | ||
|
||
echo "You are inserting SOURCE IP: $src_ip" > /var/log/php_ufw_insert_specific_ip.txt | ||
ufw insert 1 deny from $src_ip to any >> /var/log/php_ufw_insert_specific_ip.txt | ||
if [ $? -eq 0 ] | ||
then | ||
echo "UFW rule inserted succesfully" >> /var/log/php_ufw_insert_specific_ip.txt | ||
cat /var/log/php_ufw_insert_specific_ip.txt | ||
exit 0 | ||
else | ||
echo "UFW rule insertion aborted" >&2 >> /var/log/php_ufw_insert_specific_ip.txt | ||
cat /var/log/php_ufw_insert_specific_ip.txt | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#/bin/bash | ||
src_ip=$1 | ||
|
||
echo "You are inserting SOURCE IP: $src_ip" > /var/log/php_ufw_insert_specific_ip.txt | ||
ufw insert 1 deny from $src_ip to any >> /var/log/php_ufw_insert_specific_ip.txt | ||
if [ $? -eq 0 ] | ||
then | ||
echo "UFW rule inserted succesfully" >> /var/log/php_ufw_insert_specific_ip.txt | ||
cat /var/log/php_ufw_insert_specific_ip.txt | ||
exit 0 | ||
else | ||
echo "UFW rule insertion aborted" >&2 >> /var/log/php_ufw_insert_specific_ip.txt | ||
cat /var/log/php_ufw_insert_specific_ip.txt | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#/bin/bash | ||
src_ip=$1 | ||
|
||
echo "You are inserting SOURCE IP: $src_ip" > /var/log/php_ufw_insert_specific_ip.txt | ||
ufw insert 1 deny from $src_ip to any >> /var/log/php_ufw_insert_specific_ip.txt | ||
if [ $? -eq 0 ] | ||
then | ||
echo "UFW rule inserted succesfully" >> /var/log/php_ufw_insert_specific_ip.txt | ||
cat /var/log/php_ufw_insert_specific_ip.txt | ||
exit 0 | ||
else | ||
echo "UFW rule insertion aborted" >&2 >> /var/log/php_ufw_insert_specific_ip.txt | ||
cat /var/log/php_ufw_insert_specific_ip.txt | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#/bin/bash | ||
src_ip=$1 | ||
total_ports=`zgrep -i $src_ip /var/log/syslog* | cut -d " " -f21 | cut -d "=" -f2 | egrep -v "(^\s*$|^#)" | sort -nr | uniq -c | sort -nk2 | wc -l` | ||
|
||
echo "You are looking for SOURCE IP: $src_ip" > /var/log/php_ufw_list_blocked_ports_for_specific_ip.txt | ||
echo "Total ports scanned: $total_ports" >> /var/log/php_ufw_list_blocked_ports_for_specific_ip.txt | ||
echo `zgrep -i $src_ip /var/log/syslog* | cut -d " " -f21 | cut -d "=" -f2 | egrep -v "(^\s*$|^#)" | sort -nr | uniq -c | sort -nk2 >> /var/log/php_ufw_list_blocked_ports_for_specific_ip.txt` | ||
|
||
cat /var/log/php_ufw_list_blocked_ports_for_specific_ip.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#/bin/bash | ||
src_ip=$1 | ||
total_ports=`zgrep -i $src_ip /var/log/syslog* | cut -d " " -f21 | cut -d "=" -f2 | egrep -v "(^\s*$|^#)" | sort -nr | uniq -c | sort -nk2 | wc -l` | ||
|
||
echo "You are looking for SOURCE IP: $src_ip" > /var/log/php_ufw_list_blocked_ports_for_specific_ip.txt | ||
echo "Total ports scanned: $total_ports" >> /var/log/php_ufw_list_blocked_ports_for_specific_ip.txt | ||
echo `zgrep -i $src_ip /var/log/syslog* | cut -d " " -f21 | cut -d "=" -f2 | egrep -v "(^\s*$|^#)" | sort -nr | uniq -c | sort -nk2 >> /var/log/php_ufw_list_blocked_ports_for_specific_ip.txt` | ||
|
||
cat /var/log/php_ufw_list_blocked_ports_for_specific_ip.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#/bin/bash | ||
src_ip=$1 | ||
total_ports=`zgrep -i $src_ip /var/log/syslog* | cut -d " " -f21 | cut -d "=" -f2 | egrep -v "(^\s*$|^#)" | sort -nr | uniq -c | sort -nk2 | wc -l` | ||
|
||
echo "You are looking for SOURCE IP: $src_ip" > /var/log/php_ufw_list_blocked_ports_for_specific_ip.txt | ||
echo "Total ports scanned: $total_ports" >> /var/log/php_ufw_list_blocked_ports_for_specific_ip.txt | ||
echo `zgrep -i $src_ip /var/log/syslog* | cut -d " " -f21 | cut -d "=" -f2 | egrep -v "(^\s*$|^#)" | sort -nr | uniq -c | sort -nk2 >> /var/log/php_ufw_list_blocked_ports_for_specific_ip.txt` | ||
|
||
cat /var/log/php_ufw_list_blocked_ports_for_specific_ip.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#/bin/bash | ||
#echo "You are looking for SOURCE IP: $src_ip" > /var/log/php_ufw_list_deny_rules.txt | ||
echo `ufw status numbered | egrep "DENY IN" -B4 > /var/log/php_ufw_list_deny_rules.txt` | ||
|
||
cat /var/log/php_ufw_list_deny_rules.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#/bin/bash | ||
# This Script lists the UFW TOP 10 SOURCE IPs | ||
echo `zcat -f /var/log/syslog* | awk ' /'SRC='/ {print $12} ' | cut -d "=" -f2 | egrep -v "(^\s*$|^#)" | sort -nr | uniq -c | sort -nr | head -10 > /var/log/php_ufw_overall_top10_blocked_src_ip_output.txt` | ||
cat /var/log/php_ufw_overall_top10_blocked_src_ip_output.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#/bin/bash | ||
# This Script lists the UFW TOP 10 SOURCE IPs per day | ||
echo `zcat -f /var/log/syslog | awk ' /'SRC='/ {print $12} ' | cut -d "=" -f2 | egrep -v "(^\s*$|^#)" | sort -nr | uniq -c | sort -nr | head -10 > /var/log/php_ufw_overall_top10_blocked_src_ip_per_day_output.txt` | ||
cat /var/log/php_ufw_overall_top10_blocked_src_ip_per_day_output.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#/bin/bash | ||
# This Script lists the UFW TOP 10 SOURCE IPs per day | ||
echo `zcat -f /var/log/syslog | awk ' /'SRC='/ {print $12} ' | cut -d "=" -f2 | egrep -v "(^\s*$|^#)" | sort -nr | uniq -c | sort -nr | head -10 > /var/log/php_ufw_overall_top10_blocked_src_ip_per_day_output.txt` | ||
cat /var/log/php_ufw_overall_top10_blocked_src_ip_per_day_output.txt |
4 changes: 4 additions & 0 deletions
4
php_ufw_list_overall_top_10_blocked_sources_per_day_v1.0.sh.ORIG
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#/bin/bash | ||
# This Script lists the UFW TOP 10 SOURCE IPs per day | ||
echo `zcat -f /var/log/syslog | awk ' /'SRC='/ {print $12} ' | cut -d "=" -f2 | egrep -v "(^\s*$|^#)" | sort -nr | uniq -c | sort -nr | head -10 > /var/log/php_ufw_overall_top10_blocked_src_ip_per_day_output.txt` | ||
cat /var/log/php_ufw_overall_top10_blocked_src_ip_per_day_output.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#/bin/bash | ||
# This Script lists the UFW TOP 10 SOURCE IPs | ||
echo `zcat -f /var/log/syslog* | awk ' /'SRC='/ {print $12} ' | cut -d "=" -f2 | egrep -v "(^\s*$|^#)" | sort -nr | uniq -c | sort -nr | head -10 > /var/log/php_ufw_overall_top10_blocked_src_ip_output.txt` | ||
cat /var/log/php_ufw_overall_top10_blocked_src_ip_output.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#/bin/bash | ||
# This Script lists the UFW TOP 10 SOURCE IPs | ||
echo `zcat -f /var/log/syslog* | awk ' /'SRC='/ {print $12} ' | cut -d "=" -f2 | egrep -v "(^\s*$|^#)" | sort -nr | uniq -c | sort -nr | head -10 > /var/log/php_ufw_overall_top10_blocked_src_ip_output.txt` | ||
cat /var/log/php_ufw_overall_top10_blocked_src_ip_output.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<form action="seite2.php" method="post"> | ||
Vorname: <input type="text" name="vorname" /><br /> | ||
Namename: <input type="text" name="nachname" /><br /> | ||
<input type="Submit" value="Absenden" /> | ||
</form |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<form action="seite2_ufw.php" method="post"> | ||
Please enter your source IP: <input type="text" name="src_ip" /><br /> | ||
<input type="Submit" value="Submit" /> | ||
</form |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<form action="seite2_ufw.php" method="post"> | ||
Source IP: <input type="text" name="src_ip" /><br /> | ||
<input type="Submit" value="Absenden" /> | ||
</form |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
$vorname = $_POST["vorname"]; | ||
$nachname = $_POST["nachname"]; | ||
echo "Hallo $vorname $nachname"; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
$src_ip = $_POST["src_ip"]; | ||
if(!filter_var($src_ip, FILTER_VALIDATE_IP)) { | ||
echo "Not a valid IP address!"; | ||
exit(); | ||
} | ||
$src_ip = $_POST["src_ip"]; | ||
echo "You are searching for blocked ports from source IP: $src_ip"; | ||
|
||
echo "Lists the blocked ports by UFW from source IP address $src_ip"; | ||
$result1 = shell_exec("sudo /var/www/scripts/php_ufw_list_blocked_ports_for_specific_ip.sh {$_POST["src_ip"]}"); | ||
|
||
echo "<pre>$result1</pre>"; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
$src_ip = $_POST["src_ip"]; | ||
echo "You are searching for blocked ports from source IP: $src_ip"; | ||
|
||
echo "Lists the blocked ports from source IP addresses from UFW"; | ||
$result1 = shell_exec('sudo /var/www/scripts/php_ufw_list_blocked_ports_for_specific_ip.sh "$src_ip"'); | ||
|
||
echo "<pre>$result1</pre>"; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
$script = "sudo /var/www/scripts/php_ufw_list_overall_top_10_sources.sh"; | ||
$run=`$script`; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<form action="form2.php" method="post"> | ||
<input type="text" size="17" name="Inhalt"> | ||
<input type="submit" value="OK"> | ||
echo $_POST["Inhalt"]; | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
$vorname = $_GET['vorname']; | ||
$nachname = $_GET['nachname']; | ||
echo "Hallo $vorname $nachname"; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
$vorname = $_GET['vorname']; | ||
$nachname = $_GET['nachname']; | ||
echo "Hallo $vorname $nachname"; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
$vorname = $_GET['vorname']; | ||
$nachname = $_GET['nachname']; | ||
echo "Hallo $vorname $nachname"; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
$result = shell_exec('sudo /var/www/scripts/php_ufw_list_overall_top_10_sources.sh'); | ||
echo "<pre>$result</pre>"; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
echo "Lists the TOP 10 blocked source IP addresses including the overall hitcount from UFW"; | ||
$result1 = shell_exec('sudo /var/www/scripts/php_ufw_list_overall_top_10_blocked_sources.sh'); | ||
echo "<pre>$result1</pre>"; | ||
|
||
echo "Lists the TOP 10 blocked source IP addresses per day including the overall hitcount from UFW"; | ||
$result1 = shell_exec('sudo /var/www/scripts/php_ufw_list_overall_top_10_blocked_sources_per_day.sh'); | ||
echo "<pre>$result1</pre>"; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
echo "Lists the TOP 10 UFW blocked source IP addresses including the overall hitcount from ONE WEEK"; | ||
$result1 = shell_exec('sudo /var/www/scripts/php_ufw_list_overall_top_10_blocked_sources.sh'); | ||
echo "<pre>$result1</pre>"; | ||
|
||
echo "Lists the TOP 10 UFW blocked source IP addresses including the overall hitcount from TODAY"; | ||
$result1 = shell_exec('sudo /var/www/scripts/php_ufw_list_overall_top_10_blocked_sources_per_day.sh'); | ||
echo "<pre>$result1</pre>"; | ||
?> | ||
<form action="seite2_ufw.php" method="post"> | ||
Please enter your source IP: <input type="text" name="src_ip" /><br /> | ||
<input type="Submit" value="Submit" /> | ||
</form |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<form action="ufw_deny_rules.php" method="post"> | ||
Do you want to see your UFW deny rules?: <input type="button" name="YES" value="YES" /><br /> | ||
<input type="Submit" value="Submit" /> | ||
</form |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
$YES = $_POST["YES"]; | ||
$result1 = shell_exec("sudo /var/www/scripts/php_ufw_list_deny_rules.sh"); | ||
echo "<pre>$result1</pre>" | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
echo "Lists the TOP 10 UFW blocked source IP addresses including the overall hitcount from ONE WEEK"; | ||
$result1 = shell_exec('sudo /var/www/scripts/php_ufw_list_overall_top_10_blocked_sources.sh'); | ||
echo "<pre>$result1</pre>"; | ||
|
||
echo "Lists the TOP 10 UFW blocked source IP addresses including the overall hitcount from TODAY"; | ||
$result1 = shell_exec('sudo /var/www/scripts/php_ufw_list_overall_top_10_blocked_sources_per_day.sh'); | ||
echo "<pre>$result1</pre>"; | ||
?> | ||
<form action="seite2_ufw.php" method="post"> | ||
You want to lookup for scanned ports? | ||
Please enter your source IP: <input type="text" name="src_ip" /><br /> | ||
<input type="Submit" value="Submit" /> | ||
</form |