How to prevent the server from being attacked by malicious traffic?

Configure a firewall on the backbone node.

The firewall itself can resist DdoS attacks and other attacks. When an attack is found, it can be directed at some victim hosts, which can protect the real host from being attacked. Of course, these victims can choose systems such as linux and unix that are unimportant or have few loopholes and have good natural defense against attacks.

Use enough machines to resist hacker attacks.

This is an ideal coping strategy. If users have enough ability and resources for hackers to attack, but it keeps visiting users and grabbing users' resources, then its own energy is gradually losing. Perhaps, hackers can't shoot before the user is attacked and killed. However, this method needs to invest a lot of money, and most of the equipment is idle at ordinary times, which is inconsistent with the actual operation of the network of small and medium-sized enterprises at present.

Make full use of network equipment to protect network resources

The so-called network devices refer to load balancing devices such as routers and firewalls, which can effectively protect the network. When the network is attacked, the router is the first to die, but other machines are not dead. After the dead router is restarted, it will return to normal and start quickly without any loss. If other servers die, the data in them will be lost, and restarting the server is a long process. In particular, a company uses load balancing equipment, so that when one router is attacked and crashes, another router will work immediately. So as to minimize DdoS attacks.