Help Center/ Host Security Service/ FAQs/ Brute-force Attack Defense/ Incomplete Brute-Force IP Blocking (Ubuntu)
Updated on 2026-11-05 GMT+08:00

Incomplete Brute-Force IP Blocking (Ubuntu)

Symptom

In Ubuntu, journald traffic limiting causes HSS to miss or fail to block all attacking IP addresses during brute-force attacks.

Cause Analysis

By default, brute-force login detection is implemented based on rsyslog. If the rsyslog service is unavailable, the agent uses the journald service for brute-force login detection. Journald has a traffic limiting mechanism. To ensure comprehensive detection and blocking, you must tune the default journald rate-limiting parameters.

Solution

Adjust the traffic limiting configuration of the journald service to ensure log collection meets the brute-force login attack detection requirements.

Procedure

  1. Log in to the target Ubuntu server and go to the /etc/systemd directory.
  2. Run the vi journald.conf command and press I to enter the editing mode.
  3. Modify the RateLimitIntervalSec (or RateLimitInterval in earlier versions) and RateLimitBurst parameters.

    Example 1: A maximum of 5000 logs can be recorded within 10 seconds. Excess logs are suppressed.

    RateLimitIntervalSec=10s
    RateLimitBurst=5000

    Example 2: All logs are recorded without any restrictions. (This is recommended for security audit.)

    RateLimitIntervalSec=0
    RateLimitBurst=0

  4. After confirming that the modification is correct, press Esc, enter :wq, and press Enter to save the configuration.
  5. Restart the service for the configuration to take effect.

    • Restart the journald service: systemctl restart systemd-journald
    • Restart the HSS agent: /etc/init.d/hostguard restart