April 25, 2024, 04:16:40 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: Can i refuse connection from a specific network card?  (Read 3551 times)

Offline jomski

  • Linux Noob !
  • *
  • Posts: 6
Can i refuse connection from a specific network card?
« 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.

Offline ronaldjayr_jover

  • Linux Noob !
  • *
  • Posts: 29
Can i refuse connection from a specific network card?
« Reply #1 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

Offline jomski

  • Linux Noob !
  • *
  • Posts: 6
Can i refuse connection from a specific network card?
« Reply #2 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