Linux effectively prevents arp attacks-Linux Enterprise Application-Linux server application information. The following is a detailed description. Log on as an administrator and enter
1. # arp-a>/etc/ethers
Import ip and mac addresses to ethers
2. # vi/etc/ethers
Edit the file format. The content of the ethers file must be deleted in any of the following formats.
192.168.1.X XX: XX
192.168.1.X XX: XX
...
// Note that mac is capitalized, and there is no O, only zero, ip and mac Space
3. # vi/etc/rc. d/rc. local // open and display the/etc/rc. d/rc. local file and the startup Item file.
# I // Edit
// Execute arp-f at startup to bind according to the content in/etc/ethers
Add the last line in the/etc/rc. d/rc/local file
Arp-f
Exit editing from ESC
: Wq // save and edit
4. # arp-f // run the Save binding
(Gateway mac is not included in ethers; otherwise, an error is reported)
This can only prevent some arp attacks. If you import all the ip mac addresses in the network into the ethers file, it can effectively prevent arp attacks.
1. nmap-sP 192.168.11.0/24
Scan, the result is that my arp table contains the mac of all machines in that network segment, copy all information to the/etc/ethers File
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.