Linux Forums - Linux Help,Advice & support community:LinuxSolved.com

Network Troublshooting => General Networking Support in Linux => Topic started by: jomski on August 17, 2005, 09:16:38 PM

Title: Can i refuse connection from a specific network card?
Post by: jomski on August 17, 2005, 09:16:38 PM
Hi,
i'd like to know if it's possible to refuse connection from a machine on my lan by blocking the network card using it's mac address. can I use iptables to achieve this?
Reason for asking is that I would like to, from time to time, block certain machines on my network from having access to the internet. when i tried using ip addresses, some smart colleagues simply changed their ip addresses to another in the pool.
Will appreciate any help in this area.

Thanks.
Title: Can i refuse connection from a specific network card?
Post by: ronaldjayr_jover on August 18, 2005, 12:47:18 AM
Sir you can block the MAC Address of that specific PC. Even if they replace the IP they cannot replace the MAC Address, so that you will not change your rules from time to time. You can use this :

#iptables -A INPUT --mac-source <MAC ADDRESS> -j DROP
Title: Can i refuse connection from a specific network card?
Post by: jomski on August 26, 2005, 10:13:11 AM
Hi,
I tried the suggested command but it did not work. Keep telling me that the --mac-source is an invalid argument. Sure the syntaz is right?
I need help desperately.

Thanks