Apparent Packet Loss on VPS with cPanel and CSF Firewall
If you purchased a VPS with cPanel and the CSF (ConfigServer Security & Firewall), you might notice what appears to be packet loss when running:
ping -t
The output might show loss similar to the example below:
Cause: ICMP rate limitation by CSF
This is not a network issue, but rather a result of the default security configuration of the CSF firewall. CSF limits the response rate to ICMP (ping) requests in order to prevent Denial of Service (DoS) attacks.
The key parameter is:
ICMP_IN_RATE
By default, it is set to 1/s
(1 ping response per second). Increasing this value will eliminate the perceived packet loss.
How to adjust the ICMP_IN_RATE setting
To change this limit:
- Access your server as root
- Edit the CSF configuration file:
/etc/csf/csf.conf
- Find the directive:
ICMP_IN_RATE
- Change the value, for example:
ICMP_IN_RATE = "20/s"
- Save the file and restart CSF:
csf -r
📌 Important Note
Raising this value improves ping responsiveness, but may increase vulnerability to network abuse. Apply this change only when necessary and consider the security implications carefully.