Abuse detection

Detect servers sending spam, flooding packets, scanning ports or overusing CPU and disks, and set VMStack to alert, throttle or suspend them.

Abuse detection watches every server for five kinds of abuse and lists what it finds under Security › Abuse, with the readings as evidence. A policy says what each detector does: nothing, alert the administrators, throttle the server or suspend it. By default every detector only alerts; nothing is throttled or suspended until you change the policy.

What is detected#

Detector Measures Default threshold Default minutes Actions
Outbound mail New connections a minute to TCP port 25 30 10 Alert, throttle, suspend
Packet flood Packets a second sent 50,000 5 Alert, throttle, suspend
Port scan Destinations that do not answer 500 5 Alert, throttle, suspend
Sustained CPU % of the server's vCPUs 95 120 Alert, suspend
Disk I/O MB/s read and written together 300 60 Alert, suspend

Where the figures come from:

  • Outbound mail, packet flood and port scan are read by the node's agent every minute. Mail counts new connections to port 25 only: a server that relays through a smarthost on 587 or 465 is not counted. The agent counts them from the kernel's connection-tracking events, so connections the far end refuses are counted too. Packets come from the server's network card counters (private-network cards are left out). Scans are the distinct address and port pairs the server's connections get no answer from.
  • Sustained CPU and disk I/O come from the panel's five-minute usage samples.

The agent only reads. It adds no firewall rule, no counter and loads no kernel module. The panel collects the readings every five minutes.

Note: Mail and scan figures need connection tracking (/proc/net/nf_conntrack) on the node. It is loaded when the node does NAT or runs a firewall. Without it, the node reports packets only. Traffic of bridged servers is usually not connection-tracked, so their mail and scan figures read zero.

Sustained, not spikes#

A reading at or over the threshold starts a streak; readings under it, or a gap of more than two readings, end it. When a streak lasts the policy's minutes, an event opens and the administrators are alerted. When it lasts the action minutes (for throttle or suspend), the policy acts, once per event. An open event not seen for 30 minutes (the server stopped, the node went away) is ended automatically.

The Abuse page#

Security › Abuse lists the events: the server, the detector, severity, status (open, ended or cleared), the peak and last values, when it started and when it was last seen. Filter by status, detector or server. Click an event to see the readings over the threshold that led to it, the policy in force and what was done.

  • Administrators see every event and can clear events, exempt servers and change the policy.
  • Resellers see the events and exemptions of their own customers' servers, read-only.
  • Customers have no abuse page. They are mailed when something is done to their server.

An event is critical when the policy acts on it or the value reaches twice the threshold. Open events also show on the administrators' dashboard. An event that opened and ended between two looks is still listed for an hour, as "(over now)".

Setting the policy#

  1. Go to Security › Abuse and click Policy.
  2. For each detector, choose What it does: Off, Alert, Alert, then throttle (mail, flood, scan) or Alert, then suspend.
  3. Set the Threshold and Alert after (minutes). When you choose throttle or suspend, also set Throttle after (minutes) or Suspend after (minutes). It counts from the start of the streak and must be at least the alert minutes.
  4. Under Throttle, set Speed (Mbit/s, both ways) (default 10) and Lasts (hours after it was last seen) (default 24).
  5. Click Save.

The panel's policy applies to every server whose plan has no policy of its own. A reseller's plans always follow the panel's policy.

To give one plan its own policy: go to Customers › Hosting plans, open the plan, click Abuse policy and auto-scaling, tick This plan has a policy of its own, set the detectors and save. The same page holds the plan's auto-scaling.

What the actions do#

Actions reuse the panel's existing controls; nothing new is applied on the node.

Action Effect How it ends
Throttle, outbound mail The server's own SMTP network rule blocks outbound TCP port 25. Its previous setting is kept and put back afterwards. The throttle hours after the abuse was last seen, or when the event is cleared.
Throttle, flood or scan The server's speed is limited to the throttle speed, both ways, beside any traffic speed limit. The throttle hours after the abuse was last seen, or when the event is cleared.
Suspend The server is suspended with the reason, for example "Suspended for abuse: Packet flood (… packets a second sent) for 15 minutes. Contact support." Only an administrator lifts it, on the server's page or through the API. Clearing the event does not lift it.

The owner is mailed when their server is throttled, has its mail blocked or is suspended, and again when a throttle ends. While a throttle or mail block is in force, the server's Usage tab says so, for example "Outbound mail (port 25) is blocked for abuse until … UTC". A server that is already suspended is left as it is.

There is no throttle for CPU and disk I/O: use the plan's CPU and I/O limits for that.

Clearing an event#

Clearing marks an event as handled. It lifts the throttle it placed and resets the streak, so a new event needs the policy's minutes again.

  1. Open the event from Security › Abuse.
  2. Click Clear, add an optional note, and click Clear event to confirm.

A suspension placed by the event stays: lift it on the server's page.

Exempting a server#

An exempted server is not watched: no event, no alert, no throttle or suspension. Use it for servers that legitimately send mail or do heavy work, such as your own mail relay or a monitoring host.

  1. Open one of the server's events and click Exempt the server.
  2. Under From, choose this event's detector only or Every detector. Enter the reason under Why, and optionally a date under Until (optional, UTC). Without a date, the exemption has no end.
  3. Click Exempt. The server's open events for those detectors are cleared and their throttles lifted.

Exemptions are listed under Exempted servers on the Abuse page. To remove one, click Remove and confirm.

Alerts, webhooks and the API#

  • Administrators get abuse alerts by mail in the group Abuse: servers sending spam, flooding, scanning, or keeping CPU or disks busy (instant by default, or in the daily digest). See Alerts and notifications.
  • Webhooks: abuse.detected, abuse.actioned and abuse.cleared, for administrators and resellers. See Webhooks.
  • API: GET /api/v1/abuse-events, GET /api/v1/abuse-events/{id}, POST /api/v1/abuse-events/{id}/clear, and GET, POST, DELETE on /api/v1/abuse-exemptions. Reading needs servers:read; clearing and exempting need servers:provision.
  • Ended and cleared events are kept for a year.

With staff roles, seeing the Abuse page needs the security view permission, clearing and exempting the security manage permission, and changing the panel's policy the settings permission.

Not supported#

  • Per-server policy overrides (use plans and exemptions).
  • Abuse figures in the server's usage charts.
  • A customer-facing notice inside the panel; customers are told by mail only.