09-20-2018 11:59 PM
Is it possible to deny a dhcp request when it's starting with a specific hostname (option 12)?
Example; if a dhcp request is received by the DHCP server with hostname x the DHCP server will not give out a lease to that request.
I was thinking of using a ipv4 filter but I don't know how to deny it.
Can someone help me out or point me in the right direction?
Solved! Go to Solution.
09-21-2018 04:29 AM
You can certainly deny a DHCP request based on the Hostname (Option 12) by using the IPv4 Filter.
Please follow the steps below:
- Go to Data Management > DHCP > IPv4 Filters and create a new IPv4 Option Filter
- Give the IPv4 Option Filter your desired name and check the “Apply this filter as a global DHCP class” option.
- In the Match rule section, select “host-name (12) string” and specify the Hostname (‘test’ in our example).
- Save and Close.
Now you can go to the Range in question and add the created IPv4 Option Filter “denyhostname” as a Class Filter and select the Action as “Deny Lease “
- ‘Save & Close’ and Restart the DHCP services as and when requested.
Now when a Client with the corresponding Hostname requests for a lease, the DHCP Server would ignore the DHCPDiscover from the particular client and log “no free leases”.
Please refer to the snippet below.
Hope this helps.
09-23-2018 10:51 PM - edited 09-23-2018 11:10 PM
Thank you for the help, I only can't seem to understand the part of making the class filter and I can't find the option to Deny Lease.
I have made a logic filter and the dropdown menu for deny lease is missing.
Also the pictures aren't working for me but that's alright.
Thanks in advance!
09-24-2018 09:13 PM
Thank you for your response.
Class Filter List can only be found in the IPv4 Range properties under "IPv4 Filters" tab (Toggle Advanced Mode).
Once you Add the required Option Filter in the Class Filter List, you can find a drop down menu listed under "Actions" in which you can find the "Grant Lease / Deny Lease" Options.
Logic Filters do not have the Deny lease option as only Class Filter does.
Hope this helps.