Hot Article
- Centos7 closes and restarts the system firewall and opens firewall ports
- How IID server uses Xshell to connect to Linux (centos) server
- BT panel forgets the background login URL, and the solution to the security entrance verification failure
- The php domain name points to ip, how to use the specified ip address to access a server in the url request domain name in curl mode
- How to purchase a dedicated server
- Error connecting to MySQL: Cant connect to MySQL server (10060)
IDGlobal teaches you to disable ICMP protocol on CentOS
- Author:Kevin
- Category:Server Maintain
- Release Time:2022-11-30
1. Description
The ping command is often used for network detection to determine whether two hosts can communicate. It uses ICMP (Internet Control Message Protocol). Sometimes we disable the ICMP protocol to prevent other hosts from accessing the server in order to protect the host. attack, we can disable the protocol on the fly through the configuration file.
Second, disable the ICMP protocol
The system allows the ICMP protocol by default, we need to use the root user to configure the following files:
/proc/sys/net/ipv4/icmp_echo_ignore_all
That is to set the parameter of ignoring icmp messages in the file to 1,
The specific command is as follows:
[root@iid.hk]# echo “1” > /proc/sys/net/ipv4/icmp_echo_ignore_all
[root@iid.hk]# cat /proc/sys/net/ipv4/icmp_echo_ignore_all
[root@iid.hk]# 1
If this parameter is 1, it means that it is forbidden to ignore all the requests of ICMP messages, and the system default value is 0, which means that other hosts are allowed to ping this host.
At this time, if you ping this host on other hosts, the result of "request timed out" will appear
related topic
- ubuntu 20.04 newbie installation tutorial
- CentOS uses SpeedTest to measure speed
- How to solve the Windows 10 prompt "The built-in administrator cannot activate this application"?
- Windows Server 2008 R2 server environment installation graphic tutorial
- How to restart the Redis service command
- How To Install Plesk Panel on Ubuntu 20.04 Server?