Ok, so I need to block multiple macs from obtaining an IP.
In my dhcpd.conf:
host name {
hardware ethernet (mac address);
deny booting;
}
Seems correct, and for 1 entry, it seems to work, and dhcpd restarts fine.
I add a second entry, exactly the same syntax, just different MAC, and dhcpd will not restart.
It tells me there is an error with what is essentially the last line, which is just "}"
What would the reason for this be? Syntax should be right, afaik.
I have also tried doing a class and adding subclasses:
class "black-hole" {
match substring (hardware, 1, 6);
# deny booting;
ignore booting;
}
subclass "black-hole" 00:12:ba:1d:c1:b7;
subclass "black-hole" 00:12:df:b6:7b:e7;
I seem to have an issue with that, as well.
It appears I may have gotten the black-hole to work. At least dhcpd restarted, I'll have to watch logs and see if the macs show up still.
However, I'd like to know what the issue with my first attempt was.
thoughts?
Blocking multiple macs in dhcpd.conf
-
- Posts: 28
- Joined: 2016/10/06 20:12:33
Blocking multiple macs in dhcpd.conf
Last edited by vinmansbrew on 2021/04/19 16:22:12, edited 1 time in total.
Re: Blocking multiple macs in dhcpd.conf
Can you do it the other way; list allowed clients?
Code: Select all
pool {
deny unknown-clients;
range A B;
}
Re: Blocking multiple macs in dhcpd.conf
Works for me. I think you must have some other config error that causes it. I added
to my config and did a restart.
Code: Select all
host blocked1
{
hardware ethernet 88:88:88:88:88:88;
deny booting;
}
host blocked2
{
hardware ethernet 88:88:88:88:88:89;
deny booting;
}
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 28
- Joined: 2016/10/06 20:12:33
Re: Blocking multiple macs in dhcpd.conf
I see where yours is different. You have blocked1 and blocked2. I didn't number them.
Re: Blocking multiple macs in dhcpd.conf
They are hostnames and need to differ.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke