LinuxMCE Forums

General => Users => Topic started by: bulek on April 26, 2015, 11:56:44 am

Title: How to deny certain MAC address for dhcp ?
Post by: bulek 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.
Title: Re: How to deny certain MAC address for dhcp ?
Post by: pigdog 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.
Title: Re: How to deny certain MAC address for dhcp ?
Post by: bulek 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.