less access.log | awk '{print $1}' | sort | uniq -c | sort -n | tail
Month: December 2015
-
List number of requests from specific IPs from Nginx access-Logs
-
Deny in iptables based on AS-number
iptables -N AS_DENY; iptables -I INPUT -j AS_DENY; whois -T route -i origin AS57169 | grep '^route:' | awk '{print $2}' | aggregate -q | xargs -n1 -I% iptables -A AS_DENY -s % -j DROP -
Search for entrys containing a specific string
SELECT * FROM `Liste` WHERE Webseite LIKE '%http:// http://%%' //the string in this case is "http:// http://"
-
Compress every folder in the current directory with strongest compression possible
for D in *; do [ -d "${D}" ] && tar -cf - $D | xz -9 -c - > $D.tar.xz; done