Schlagwort: analyse

Apache: Count Visits on Console

If you use a Webserver like Apache, you can use a small script to Analyse your Logs. Create a Script with: $sudo nano /home/user/ insert: #!/bin/bash cat /var/log/apache2/access.log | awk '{ print $1 }' | sort | uniq -c exit 0 System Output: 1573 3568 .. If you change the „$1“ to other value like „$8“ you will get the count of touched files or folders! This shows you attacks on single Files by abnormal high counts! You can use cron to run it every 15Minutes and send it to mailbox of a user. And this way […]

Apache: Analyse Logs Spam Bots

If you admin a Apache Webserver, you see often weekly thousand of visits a day on your Blogs. Background: These are no real users, this visits are made by Spam Bots in my Logs like or Bots! On info pages this Company says Admins should disallow crawl by robots.txt, but they IGNORE the settings! This x-guys is in my opinion against German Law „Datenschutz“. "Mozilla/5.0 (compatible; XoviBot/2.0; +" Solution: On Linux Setup a Firewall like ufw and block these IP Ranges To find out the IPs do: $sudo cat /var/log/apache2/access.log|grep| awk '{ print $2 }' | sort | […]