How to identify and prevent attacks


You can detect common attacks as follows:

1. Clear statistics on the packets sent to the CPU.
2. Wait for one minute and check the number of packets sent to the CPU and discarded protocol packets, such as ICMP, TTL, Expired, SSH, and FTP. If there are a lot of packets sent to the CPU or discarded, an attack, such as ICMP attack, TTL Expired attack, SSH attack, or FTP attack, may occur.
3. Find out the attack source through IP source trail or attack source tracing.

After locating the attack source, run the cpu-defend policy command to configure the blacklist to prevent the packets from this source entering the control plane. Alternatively, you can configure the penalty action in auto-defend to discard attack packets.
Additionally, the device can restrict the rate of ICMP packets from the source, or use traffic policy to discard SSH and FTP attack packets.

Other related questions:
How do I take measures to prevent internal network attacks
Internal network attacks refer to attacks from Layer 2 protocol packets. Attacks often use ARP to attack network devices. ARP attack defense measures are often used:
  • Strict ARP learning: The device learns only the ARP Reply packets in response to the ARP Request packets sent by itself. Run the arp learning strict command to enable strict ARP learning.
  • ARP gateway anti-collision: If an attacker sends an ARP packet with the source IP address as the gateway address, ARP entries are modified incorrectly. ARP gateway anti-collision can solve this problem. Run the arp anti-attack gateway-duplicate enable command to enable the ARP gateway anti-collision function.
  • Sending gratuitous ARP packets: To ensure that packets sent by hosts on the internal network are forwarded to the gateway or prevent malicious users from intercepting these packets, the device sends gratuitous ARP packets at intervals to update the gateway address in ARP entries of the hosts. Run the arp gratuitous-arp send enable command to enable the device to send gratuitous ARP packets. By default, the device sends gratuitous ARP packets every 90s.

If too many security measures are used, device performance may deteriorate.

How to prevent intranet attack by configuration
Intranet attacks are mainly attacks from some Layer 2 packets using the ARP protocol. The attacks affect Internet access of users. The main anti-attack means is ARP anti-attack. 1. Strictly learn ARP entries, which means that the router learns only the response packets corresponding to the ARP request packets the router sends. Run the arp learning strict command in the system view to configure ARP entry learning globally. 2. Configure ARP gateway conflict to prevent users from faking a gateway and causing other users to fail to access the Internet. Run the arp anti-attack gateway-duplicate enable command in the system view to enable the ARP gateway conflict anti-attack function globally. 3. To protect user packets to be normally forwarded to a gateway and not be intercepted, configure the router to send free ARP packets and refresh the gateway MAC address in an ARP entry periodically. Run the arp gratuitous-arp send enable command in the system view to configure the free ARP packet transmission function globally. By default, the free ARP packets are sent at an interval of 90s.

Methods of configuring defense against bogus DHCP server attacks on S series switch
S series switches (except S1700 switches) support configuration of the DHCP Snooping trust function to prevent attacks from unauthorized DHCP servers and ensure clients can obtain IP addresses from authorized DHCP servers. As shown in the networking diagram on the right, the DHCP Client and Server are connected through the Switch. The following provides the procedure for configuring the DHCP Snooping trust function for S series switches: 1. Enable DHCP Snooping globally. [Huawei] dhcp enable [Huawei] dhcp snooping enable 2. Enable DHCP Snooping on user-side interfaces GE0/0/2 and GE0/0/3. [Huawei] interface gigabitethernet 0/0/2 [Huawei-GigabitEthernet0/0/2] dhcp snooping enable [Huawei-GigabitEthernet0/0/2] quit [Huawei] interface gigabitethernet 0/0/3 [Huawei-GigabitEthernet0/0/3] dhcp snooping enable [Huawei-GigabitEthernet0/0/3] quit 3. Configure the interface (GE0/0/1) connected to the DHCP Server as the trusted interface. [Huawei] interface gigabitethernet 0/0/1 [Huawei-GigabitEthernet0/0/1] dhcp snooping trusted [Huawei-GigabitEthernet0/0/1] quit

Attack prevention methods used by DHCP snooping on S series switch
For S series switches (except S1700 switches), DHCP Snooping provides the trust function and binding table checking function to prevent man-in-the-middle attacks. The DHCP Snooping trust function sets the interface connected to an authorized DHCP server as the trusted interface, so that clients can obtain IP addresses from the authorized DHCP server, preventing bogus DHCP server attacks. The DHCP snooping binding table checking function prevents DHCP attacks from unauthorized users, such as DHCP flood attacks, bogus DHCP server attacks, and DHCP server DoS attacks.

How to prevent ARP attacks targeted at static users
Static users (for example, dumb terminals such as printers and servers) are allocated static IP addresses. Attackers usually steal authorized users' IP addresses to connect to networks and initiate ARP attacks to interrupt network communication. To defend against ARP attacks, a static user binding table and dynamic ARP inspection (DAI) can be configured for static users. DAI checks ARP packets based on binding entries. Run the user-bind static command to configure the static user binding table, and run the arp anti-attack check user-bind enable command to enable DAI. After the configuration, when a device receives an ARP packet, it compares the source IP address, source MAC address, interface number, and VLAN ID of the ARP packet with static binding entries. If the ARP packet matches a binding entry, the device considers the ARP packet valid and allows the packet to pass through. If the ARP packet does not match a binding entry, the device considers the ARP packet invalid and discards the packet.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top