Author Topic: How to deny certain MAC address for dhcp ?  (Read 3741 times)

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
How to deny certain MAC address for dhcp ?
« on: April 26, 2015, 11:56:44 am »
Hi,

I'd like to add certain MAC address to be ignored by dhcp. Have two questions:
- what is needed to add to dchcpd.conf ?
- any way to add this change to  survive network settings change via admin page ?

Thanks in advance,
regards,
Bulek.
Thanks in advance,

regards,

Bulek.

pigdog

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1105
    • View Profile
Re: How to deny certain MAC address for dhcp ?
« Reply #1 on: April 26, 2015, 05:41:30 pm »
Hi bulek,

Would iptables help?

Something like this?

iptables -A INPUT -m mac --mac-source 00:XX:XX:XX:XX:XX -j DROP

Where XX: etc is the MAC address.

https://help.ubuntu.com/community/IptablesHowTo

Cheers.
« Last Edit: April 26, 2015, 05:45:23 pm by pigdog »

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: How to deny certain MAC address for dhcp ?
« Reply #2 on: April 27, 2015, 10:00:41 am »
Hi bulek,

Would iptables help?

Something like this?

iptables -A INPUT -m mac --mac-source 00:XX:XX:XX:XX:XX -j DROP

Where XX: etc is the MAC address.

https://help.ubuntu.com/community/IptablesHowTo

Cheers.
Hi,

I like this solution - it's even better cause it works immediately. I'll try it.

Edit: I had to change -A to -I (otherwise rule is appended at the end and doesn't get triggerred).

Thanks,

Bulek.
« Last Edit: April 28, 2015, 12:27:49 am by bulek »
Thanks in advance,

regards,

Bulek.