News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

How to deny certain MAC address for dhcp ?

Started by bulek, April 26, 2015, 11:56:44 AM

Previous topic - Next topic

bulek

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

#1
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.

bulek

#2
Quote from: 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.
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.
Thanks in advance,

regards,

Bulek.