Disable ICMP ping request on cpanel server

How to disable ICMP ping request on your linux server?

Ping command is basically working on sending an Internet Control Message Protocol (ICMP) echo request packets to the target host and waiting for an ICMP response. To enable the PING refer to the following URL and make sure that you have logged in as a root user.

echo “0″ >> /proc/sys/net/ipv4/icmp_echo_ignore_all

In order to stop ICMP attack, most of the server is disabled the PING command to secure the server, refer to the following command to disable the PING command.

echo “1″ >> /proc/sys/net/ipv4/icmp_echo_ignore_all

 

You can disable ping request trough sysctl.conf

vi /etc/sysctl.conf

net.ipv4.icmp_echo_ignore_all = 1

Then run “sysctl -p

CSF Firewall

To disable incoming and outgoing ping request on your CSF firewall, please try the following values in your csf.conf file.

ICMP_IN = "0"

ICMP_IN_RATE = "0"

ICMP_OUT = "1"

ICMP_OUT_RATE = "0"

How do I disable outgoing ICMP request on iptables?

iptables -A OUTPUT -p icmp --icmp-type echo-request -j DROP

or

iptables -A OUTPUT -p icmp --icmp-type 8 -j DROP

To disable incoming ping request on iptables, please use the following command.

iptables –A INPUT –p icmp –icmp-type echo-request –j DROP
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

cPHulk Brute Force Protection

WHM/cPanel has a service, protected from Brute Force attack, which is called “cPHulk Brute Force...

Enable SSH key authorized login without root password

You need to generate SSH Key ( the private key )on your cpanel server and then update remote...

How can I Redirect URLs in cPanel

Login your cpanel 1. Click the Redirects button on the front page under the “domains” 2. Enter...

Enable Custom php.ini for Fast CGI

With fast-cgi, custom php.ini needs to be in the cgi-bin folder. 1) Move php.ini to cgi-bin...

ConfigServer Firewall CSF installation

ConfigServer firewall is a popular linux firewall security suite. It is easy to install, flexible...

Powered by WHMCompleteSolution