Disable ping and enable forwarding in Linux
As a server, security is a very important issue. In many cases, the system is required to prohibit other hosts from Pinging their addresses. The following describes how to disable ping and enable IPv4 forwarding in Linux. In fact, it is very simple. You only need one command to get it done. At the same time, switching is quite convenient. You can see from the figure below that you only need to modify the value of icmp_echo_ignore_all in the/proc/sys/net/ipv4/directory, and the value range is very small, only between 0 and 1. Some friends will think, so you can? Yes, because the file changed to the proc directory takes effect immediately. Linux embar ping0 indicates that this function is disabled, that is, ping1 is allowed, that is, ping1 is disabled, and the document is also modified in this directory: the ip_forward value enables and disables IPv4 forwarding in Linux even if it takes effect. Enable linux ip_forward