ServerPilot-DigitalOcean notes - review access log and block suspicious IP
Logs
- where’s the http access logs?
/srv/users/serverpilot/log/APPNAME/APPNAME_apache.access.log
- how to sort by source IP address?
cat access.log | awk '{print $1}' | sort -n | uniq -c | sort -nr | head -20
Blocking IP
- how to block IP address?
sudo iptables -I INPUT -s ip.address.1.2 -j DROP
- 2017-08-20
edit