GoAdmio Command Line: ddos with /go/ddos

/go/ddos finds the IP addresses sending the most requests to your web server and, if you ask it to, blocks the ones that go over a limit. It: It never blocks IPs belonging to Google, Bing, or Cloudflare (see Protected companies). Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Show the top 25 IPs. Nothing is blocked.
/go/ddos

# Show the top 25 IPs and block any that reach the limit
/go/ddos block

Arguments

Argument Required Notes
block No Turns on blocking. Also takes the lock so two blocking runs don’t overlap.
<ipv4> No A dotted IPv4 address such as 203.0.113.7. IPv6 addresses are not recognized.

Examples

# Check who is hitting the server right now, without blocking
/go/ddos

# Look up a suspicious address
/go/ddos 203.0.113.7

# Lower the limit, then block
echo 3000 | sudo tee /var/go/etc/ddos
/go/ddos block

# Example cron entry: check and block every 5 minutes
*/5 * * * * /go/ddos block

Check whether cron has already scheduled this command before adding your own entry.

Output

The report is a table, sorted by visits, highest first. The example below is illustrative.

IP VISITS COUNTRY CITY COMPANY
-- ------ ------- ---- -------
203.0.113.7 48210 US Ashburn Example Hosting LLC
198.51.100.23 22544 DE Frankfurt Sample Cloud GmbH
192.0.2.88 1310 EG Cairo Example Telecom

Column Meaning
IP The client IP address.
VISITS Number of requests from that IP in the access log.
COUNTRY Country of the IP.
CITY City of the IP.
COMPANY Owner of the IP, from a whois lookup.

Country and city come from a different source depending on how you run the command, so they can differ between a terminal and cron. See Country and city lookup.

When another run is active

Instance (ddos) already running.

The command exits with status 1. See Locking.

Alerts

If at least one IP was blocked in this run, the administrator receives an email and a WhatsApp message titled:

DDoS Protection Mitigated on Your Server (<n> IPs)

The message lists each blocked IP with its visit count, country, and company. IPs that already have a block record are not blocked or reported again.

See the full reference at /go/ddos 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 *