|
Administrator user logs on, open the terminal and type
1, # arp -a> / etc / ethers
The ip and mac addresses into ethers
2, # vi / etc / ethers
Edit the file format, ethers file format to delete all content must be below the excess, into the form ip mac
192.168.1.X XX: XX: XX: XX: XX
192.168.1.X XX: XX: XX: XX: XX
...
// Note capitalization mac and no O only zero, ip and mac spaces
3, # vi /etc/rc.d/rc.local // open and display /etc/rc.d/rc.local file to start in file
#i // Editor
// Start time in accordance with the Executive arp -f / etc / ethers contents of Binding
In the final document his party /etc/rc.d/rc/local
arp -f
ESC to exit the editing
: Wq // Save Edit
4, # arp -f // execution save bound
(Ethers are not included Gateway mac otherwise it will error)
This can only defend some of arp attack, if all the internal network ip mac import ethers file, which can effectively prevent arp attacks
1, nmap -sP 192.168.11.0/24
Scan, the results of my arp table there that all network machines mac, copy all information to / etc / ethers file
2,3,4 Ibid. |
|
|
|