Free tools

Website Attack Check

Is the server under attack, or just busy? This free script reads your access log, the connection table and the SSH auth log, and answers in seconds with PASS, WARN or FAIL per check and the numbers behind each one.

Read it before you run it

It only reads. No settings change, nothing is installed, and it makes no network calls; the only writes are temp files it removes on exit. POSIX sh, so it runs with dash on Ubuntu and Debian and bash on RHEL, Alma and Rocky.

Run it

curl -fsSLO https://alertkick.com/tools/website-attack-check.sh
less website-attack-check.sh
sudo sh website-attack-check.sh

It finds the nginx or Apache access log at its default path and reads the last 20,000 requests. For another log, or a longer window:

sudo ACCESS_LOG=/var/log/nginx/shop.access.log LINES=50000 sh website-attack-check.sh

What it checks

Sample output

From a test log with a WordPress login flood, a scanner and a compromised SSH account:

host web-1 | Ubuntu 24.04.1 LTS | 2026-12-05 10:46 UTC | uid 0

PASS  load          5-min load 0.79 on 16 cores
access log /var/log/nginx/access.log: last 3000 requests, 05/Dec/2026:10:00:00 -> 05/Dec/2026:10:45:59
FAIL  top-ip        198.51.100.23 sent 44% of requests (1320 of 3000, 1212 IPs in total)
FAIL  probes        1781 probe requests (59%) for wp-login, .env, .git, phpMyAdmin and similar; top: 198.51.100.23 (1320)
WARN  status        404 15%, 401/403 44%, 5xx/499 5%: many 401/403s point to password guessing
PASS  top-path      busiest path /wp-login.php has 44%
WARN  user-agents   59% of requests have an empty or scripted user agent (curl, python, Go, scanners)
WARN  rate          peak minute 300 requests against a median of 60 per minute
PASS  syn-recv      0 half-open connections
PASS  web-conns     no established connections on :80/:443 right now
PASS  ssh-failed    3 failed or invalid-user attempts in /var/log/auth.log
FAIL  ssh-accepted  login ACCEPTED from an IP that also failed: 185.220.101.4 - treat the server as compromised: https://alertkick.com/blog/is-my-linux-server-hacked-checklist/

top web IPs:  198.51.100.23(1320) 45.155.205.4(108) 45.155.205.0(91) 45.155.205.2(90) 45.155.205.1(89) 
top SSH IPs:  185.220.101.4(3) 
look them up: dig -x <ip> +short, or https://alertkick.com/tools/ip-reputation/
before blocking, confirm a high-volume IP is not Googlebot (reverse DNS googlebot.com or google.com)

5 pass, 3 warn, 3 fail

Attack or traffic spike?

The difference is concentration. An attack shows up as a few IPs, a few paths or one login endpoint taking a share of traffic that real visitors never produce, with 404s, 401s or 5xx errors climbing and scripted user agents in the mix. A real spike spreads across many IPs, normal pages and browser user agents. The script measures each of those, so the WARN and FAIL lines tell you which kind you have.

After the script

Look up the top IPs it prints with the IP reputation checker, and confirm a busy address is not Googlebot before blocking it. Paste the SSH log into the auth.log analyzer for usernames tried and the full timeline. Check the site from outside your network with the website down checker. The full runbook, with every command the script runs and what to do next, is in how to check if your website or server is under attack.

Website attack check questions

Is it safe to run on a production server?

Yes. The script only reads: the last lines of the access log, the kernel connection table, /proc and the SSH auth log. It changes no settings, installs nothing and makes no network calls. Its only writes are temporary files it deletes when it exits. Read it before running it.

Which servers does it work on?

Linux servers running nginx or Apache with the default combined log format, on Ubuntu, Debian, RHEL, Alma or Rocky. It is POSIX sh, so it runs with dash or bash. For a log at another path, set ACCESS_LOG.

Why does it say the top address is private?

The site sits behind a CDN, load balancer or reverse proxy, so the log records the proxy address instead of the visitor. Configure the log format to record X-Forwarded-For, or CF-Connecting-IP on Cloudflare, and the IP checks become meaningful again.

What should I do when it reports a FAIL?

A FAIL on ssh-accepted means a login succeeded from an address that was also guessing passwords: treat the server as compromised and follow the post-compromise checklist. Any other FAIL points at an attack in progress: block or rate limit the top IPs after checking they are not search crawlers, and put a CDN in front for volumetric floods.

Can it run on a schedule?

Yes. It exits with code 0 when nothing fails and 1 otherwise, so cron can mail or act on a failing run. For alerts that reach a person within a minute, with escalation when nobody answers, continuous monitoring does the same job without cron.

Find out before the site slows down

The script answers when you already suspect something. The AlertKick agent watches the same signals all the time: SSH brute force and logins from new places, scanner floods, load and response time from outside, and pages the on-call person when they cross the line. Free plan, no card.

Monitor my server - free