HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!
- I do not know if this is the right forum section
Kod:
https://youtu.be/DXji_JiuTdo
- Yes, I noticed after the video had been released, that the code I wrote had two errors.
I also recommend adding a captcha for registration, login and display of the full ranking. The site also has an advanced administrator system.
Website (one change - 99% of original files from BombWorkStudio):
Kod:
https://www23.zippyshare.com/v/eo4JElK4/file.html
Scan:
Kod:
https://www.virustotal.com/#/file-analysis/YzJjNDUyOGY0MzJlZGI5ZDgwMWFlYWVmMzBmYzE0OGY6MTUzMDQ2NDcwNQ==
Layout:
Kod:
https://www.mpcforum.pl/applications/core/interface/imageproxy/imageproxy.php?img=http://i.imgur.com/jySgsmk.jpg&key=6f9f51e6dc2b4695eef338e253b46d36f714e9f3ae3b035c720b15909e791c07
Web server protection against two idiots (Internet terror - DejmieN & Komar1911)
## CHECKING IP, WHICH MAKE THE BIGGEST ATTACKS ##
Kod:
cat /var/log/apache2/access.log |awk '{print $1}' |sort |uniq -c |sort -n
## CHECKING IPs WHICH MAKE THE BIGGEST ATTACKS AND BLOCKING THEIR ##
Kod:
FILE=/var/log/apache2/access.log; for ip in `cat $FILE |cut -d ' ' -f 1 |sort |uniq`; do { COUNT=`grep ^$ip $FILE |wc -l`; if [[ "$COUNT" -gt "500" ]]; then iptables -A INPUT -s $ip -j DROP; fi }; done
## DISPLAYING ALL IP ADDRESSES AND NUMBER OF ATTACKS FROM ANY IP ##
Kod:
FILE=/var/log/apache2/access.log; for ip in `cat $FILE |cut -d ' ' -f 1 |sort |uniq`; do { COUNT=`grep ^$ip $FILE |wc -l`; if [[ "$COUNT" -gt "500" ]]; then echo "$COUNT : $ip"; fi }; done
## BLOCKING ENTRIES ON THE WEBSITE + CLOUDFLARE UNLOCKING ##
Kod:
iptables -A INPUT -s YOUR_IP_MACHINE_THAT_YOU_WILL_PROTECT -j DROP iptables -A INPUT -p tcp -m multiport --dports http,https -j DROP ip6tables -A INPUT -p tcp -m multiport --dports http,https -j DROP
You enter the IP addresses one by one
Kod:
https://www.cloudflare.com/ips-v4
Kod:
iptables -I INPUT -p tcp -m multiport --dports http,https -s HERE_IPV4_ADRESS -j ACCEPT
Kod:
https://www.cloudflare.com/ips-v6
Kod:
iptables -I INPUT -p tcp -m multiport --dports http,https -s HERE_IPV6_ADRESS -j ACCEPT
## CONFIGURATION jail.local - FAIL2BAN ##
Kod:
[apache]
enabled = true
filter = apache-auth
action = iptables-multiport[name=auth, port="http,https"]
logpath = /var/log/apache2/access.log
bantime = 9600
maxretry = 1
ignoreip = 103.21.244.0/22,103.22.200.0/22,103.31.4.0/22,104.16.0.0/12,108.162.192.0/18,131.0.72.0/22,141.101.64.0/18,162.158.0.0/15,172.64.0.0/13,173.245.48.0/20,188.114.96.0/20,190.93.240.0/20,197.234.240.0/22,198.41.128.0/17
[apache-badbots]
enabled = true
filter = apache-badbots
action = iptables-multiport[name=badbots, port="http,https"]
logpath = /var/log/apache2/access.log
bantime = 9600
maxretry = 1
ignoreip = 103.21.244.0/22,103.22.200.0/22,103.31.4.0/22,104.16.0.0/12,108.162.192.0/18,131.0.72.0/22,141.101.64.0/18,162.158.0.0/15,172.64.0.0/13,173.245.48.0/20,188.114.96.0/20,190.93.240.0/20,197.234.240.0/22,198.41.128.0/17
[apache-noscript]
enabled = true
filter = apache-noscript
action = iptables-multiport[name=noscript, port="http,https"]
logpath = /var/log/apache2/access.log
bantime = 9600
maxretry = 1
ignoreip = 103.21.244.0/22,103.22.200.0/22,103.31.4.0/22,104.16.0.0/12,108.162.192.0/18,131.0.72.0/22,141.101.64.0/18,162.158.0.0/15,172.64.0.0/13,173.245.48.0/20,188.114.96.0/20,190.93.240.0/20,197.234.240.0/22,198.41.128.0/17
[apache-overflows]
enabled = true
filter = apache-overflows
action = iptables-multiport[name=overflows, port="http,https"]
logpath = /var/log/apache2/access.log
bantime = 9600
maxretry = 1
ignoreip = 103.21.244.0/22,103.22.200.0/22,103.31.4.0/22,104.16.0.0/12,108.162.192.0/18,131.0.72.0/22,141.101.64.0/18,162.158.0.0/15,172.64.0.0/13,173.245.48.0/20,188.114.96.0/20,190.93.240.0/20,197.234.240.0/22,198.41.128.0/17
## BLOCKING EMPTY GETS VIA .htaccess ##
Kod:
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^-?$
RewriteRule ^ - [F]
