Bind a MAC address to prevent ARP Spoofing

Source: Internet
Author: User
Article Title: bind a MAC address to prevent ARP spoofing. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Sometimes some machines in the LAN are poisoned, and the arp virus packets will always be sent. These arp virus packets will mislead your machine into parsing the mac address of the gateway. Therefore, you need to bind the mac address.

Two methods:

1. List the MAC addresses of all machines in the LAN.

     
      # arpAddress HWtype HWaddress Flags Mask Iface192.168.1.1 ether 00:07:E9:2A:6F:C6 C
     

Then, bind the MAC address,

     
      #arp -s 192.168.1.1 00:07:E9:2A:6F:C6
     

Note: Here 192.168.1.1 may be replaced by hostname, if your gateway has set hostname.

2. Create a/etc/ethers file. For example, if you want to bind a gateway, write the following in/etc/ethers:

192.168.1.1 00: 07: E9: 2A: 6F: C6

Then execute

     
      #arp -f
     

In this way, the gateway address is bound. If there are other machines bound, add records.

Note: You need to re-bind the MAC address after each restart.

In addition, binding a mac address requires two-way binding: machine a is bound to machine B, and machine B is also bound to machine a, so that the arp virus will be completely blocked.

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.