mutek / firewall Goto Github PK
View Code? Open in Web Editor NEWFirewall
Firewall
https://github.com/subaddiction/liveFirewall
https://github.com/subaddiction/liveFirewall/blob/master/wp-firewall.sh
Subaddiction ha introdotto un'analisi dei tentativi su wp-login.php
in pratica:
#!/bin/bash
# Configuration
FILE="/etc/iptables/firewall/log/wp-login.log"
DEFRULES="/etc/iptables/firewall/rules/default"
RULES="/etc/iptables/firewall/rules/wordpress"
MAXATTEMPTS=10
# Restore default iptables
iptables-restore $DEFRULES
# Count requests per ip matching a pattern
cat /var/log/apache2/other_vhosts_access.log | grep -i "wp-login.php" | awk '{print $2}' | sort | uniq -dc > $FILE
# General example
# cat /path/to/apache/logs | grep -i "malicious_pattern" | awk '{print $ip_position_in_log_line}' | sort | uniq -dc > $FILE
# Plesk example
# find /var/www/vhosts -name "access_log.processed" -print0 | xargs -0 cat |grep -i "wp-login.php" | awk '{print $1}' | sort | uniq -dc > $FILE
# Ban malicious IPs
ATTACKER=false
ATTACK=false
while read line
do
ATTACK=$(echo $line | awk '{print $1}')
#echo "$ATTACK"
ATTACKER=$(echo $line | awk '{print $2}')
#echo "$ATTACKER"
if [ "$ATTACK" -gt "$MAXATTEMPTS" ]
then
echo "$ATTACKER attempted $ATTACK times: BANNED"
iptables -A INPUT -p tcp --dport 80 -s "$ATTACKER" -j REJECT
fi
done < $FILE
iptables-save > $RULES
quando integrato riportare con precisione i crediti
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.