GoAdmio Command Line: posttop with /go/posttop

/go/posttop finds the IP addresses that sent the most POST requests to the server. Login forms, contact forms, and APIs receive POST requests, so a flood of them is a common sign of brute-force, spam, or application-layer attacks. The command: No setup is needed. GoAdmio's default cron jobs already run posttop block every hour. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Top POST senders in the last 24 hours. Nothing is blocked.
/go/posttop

# Show the last hour and block offenders (what cron runs)
/go/posttop block

Options

Item Required Default Notes
block (argument) No Report only Turns on blocking and notifications. Uses a one-hour window.
<seconds> (argument) No 86400 Length of the report window in seconds. Digits only. Never blocks.
/var/go/etc/posttop (file) No 300 A whole number: the number of POST requests at which an IP is blocked. See Threshold.

Examples

# Who sent the most POST requests in the last 5 minutes?
/go/posttop 300

# Last 7 days (604800 seconds)
/go/posttop 604800

# Report and block, as cron does every hour
/go/posttop block

# Block at 1000 POST requests per hour instead of 300
echo 1000 | sudo tee /var/go/etc/posttop

# Go back to the default threshold
sudo rm /var/go/etc/posttop

# Read the history of runs and their arguments
sudo tail /var/log/go/posttop.log

Output

Outcome What you get
Report A table of up to 20 IPs with visits, country, city, and company.
block mode, IPs blocked The same table, then an email and a WhatsApp message listing the blocked IPs.
block mode, nothing over the threshold The table only. No message is sent.
block mode, another instance running Instance (<name>) already running. and exit code 1.

Report

The columns are aligned with column. This sample is illustrative.

IP VISITS COUNTRY CITY COMPANY
-- ------ ------- ---- -------
203.0.113.7 1840 US Chicago Example Hosting LLC
198.51.100.22 95 DE Berlin Example Telecom

The server’s own IPv4 address, its IPv6 address, and 127.0.0.1 are never listed.

Notification

Sent only in block mode, and only if at least one IP was blocked in that run.

Channel Subject or title
Email, through sendmail Automated Block: Excessive POST Requests Detected (<N> IPs)
WhatsApp, through sendwhatsapp *Automated Block: Excessive POST Requests Detected (<N> IPs)*

The body explains what happened, then lists one line per blocked IP:

- POST Traffic 203.0.113.7 (1840 Visits / Hour) - Country: US, Company: Example Hosting LLC.

The email ends by saying that legitimate API clients may need whitelisting. See Whitelist before relying on that.

[!WARNING]
Blocking is automatic and unattended. Busy sites, APIs, webhooks, and payment or chat integrations can send hundreds of legitimate POST requests per hour from one IP. Check whether your own services reach the threshold before relying on the default of 300, and read the notification emails after any change.

See the full reference at /go/posttop and the GoAdmio command index.

GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.

By:

Posted in:


Leave a Reply

Your email address will not be published. Required fields are marked *