Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Prevent ARP spoofing

Shulou Source: shulou.com Published: 2022-06-01 05:53:40 10月04日 Update

Foreword:

Once because the students in the dormitory often stayed up late to play games, good advice didn't work. I had no choice but to use arp to deceive their mainframe, so that the game was delayed and dropped after 11:00 at night. Finally, at 11:00, the students all went to bed.

Three ways to prevent arp spoofing:

Statically bind mac addresses on the host

Arp Firewall on the host

Take advantage of the switch's anti-arp spoofing technology, such as DAI

Statically bind the mac address on the windows host:

Statically bind the mac address on the linux host:

Do MAC binding on the router:

Use arptable firewall to prevent arp spoofing on linux hosts (360th on windows or security butler can prevent arp spoofing)

The first method binds mac and IP addresses on terminals and gateways, but the second method is based on mac and Ip, but it is different from the first method, and the second method is through firewall software: arptalbes

Arptables firewall is open source, similar to iptables, free download, can be implemented in the linux system to prevent arp spoofing

You need to install gcc before installing arpiptables

Download address: http://sourceforge.net/projects/ebtables/files/arptables

Decompress:

Tar xzf arptables-v0.0.4.tar.gz-C / usr/src

-C is the installation step for extracting the source code program to the specified directory: 1). / configure generates a makefile file. 2) make3) make install adds rules to arptables:

Arptables-An INPUT-- src-ip 192.168.80.200!-- src-mac 01:00:5e:00:00:16-j DROP

Adding a rule means to match the gateway with its real mac address, and if it does not match in the inbound direction, the packet will be lost, which is to use arptables to prevent arp spoofing.

Note; commands in iptables are still valid here, for example, look at the rule: arptables-L-n

Save the configuration when you are done:

Arptables-save saves the configuration

Tags: Host address method firewall fire prevention that is rules static classmate configuration effective security persuasion to put it bluntly switch free download preface function but command Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Linux MariaDB Huawei NVidia