This evening, I opened the Online server and went to the previously installed DA. I was so upset to see a bunch of Brute force attack alarms. I followed the online tutorial to set iptables. In the future, I can block IP addresses directly. The command in the tutorial also disables ping, so that other clients cannot ping my server, and automatically shield the brute-force cracking IP address. Ping is disabled, and Online immediately prompts "Service alert: ping down on Dedibox", and the local test cannot be pinged. The following describes how to disable or enable ping for iptables.
The command for iptables to disable ping is as follows:
Iptables-I input-I eth0-p icmp-s 0/0-d 0/0-j DROP
The command for restoring ping is as follows:
Iptables-I input-I eth0-p icmp-s 0/0-d 0/0-j ACCEPT
All of the above is an example of how CentOS uses iptables to prohibit and resume ping. I hope this article will help you.