iptables filter mac address

Mick Genie ever guide how to allow and block IP, port, etc from iptables, however there is another option which is to block or allow mac address.

MAC address stand for Media Access Control Address and it could be specifically for a network.

To block a mac address, simply run from shell.

iptables -A INPUT -m mac –mac-source 00:11:22:FF:33:EE -j DROP

Change your MAC address in Linux

Every PC do have their own MAC Address and MAC address used like identity for the network card.

An MAC address of an ethernet device is a 6 bytes number in expression of 12.
08-00-27-00-F8-EB

Sometimes, you need to change the MAC address to bypass the network blocking, to sniffing the network packet, etc. And it is quite easy to  use a handy tool in Linux called MACchanger-GTK.

To install it, simply go to your Add/Remove Software application and for the macchanger and install it.

1. Select your Network Interface from the drop down.
2. Click See current MAC (this will display your address in a new window).
3. Click the Known vendor button. If your NIC is detected with enough information you can then change the address to another address of the same manufacturer. If not, your best bet is to go with Random.
4. From the Options drop down select one of the methods for changing your address.
5. Click Change MAC.