Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address
I have a setup at home where I have a network consisting of two servers each on a different subnet. There is one linux server between the two subnets that runs as a DHCP Server. One of my other servers also runs DHCP Server. This is a Windows server.
The problem I have is that I want to be able to make the Linux Server refuse IP addresses that should be handled on the other subnet. The two subnets are using the same media between the server room in the garage and the main house and I have no way of being able to change this as the is only one trunk cable.
I have configured my Windows Server to only allow clients listed in the reservations section to obtain DHCP leases on subnet 2 server
The Linux server I am using as a firewall, It has three NIC's installed:
Card One - Internet (WAN)
Card Two - Subnet 1 (General LAN)
Card Three - Subnet 2 (DMZ LAN)
Unfortunately As I mentioned above these two subnets share the same cable from the server room to the house.
So, My question is:
Can I make my linux server on subnet 1 refuse DHCP leases to clients in subnet 2 if i somehow program the MAC addresses of the clients into the Server? If it can be done, How can this be Done?
Any help will be much apprieciated :)
Use iptables with the MAC match: http://iptables-tutorial.frozentux.n....html#MACMATCH
e.g. iptables -A INPUT -p UDP --destination-port 67:68 -m mac --mac-source XX:XX:XX:XX:XX:XX -j DROP
Add a rule for each mac address of the machines that the DHCP server should not service.
Hate to just reply with a link, but this is what you're looking for:
The location of dhcpd.conf varies from distro to distro, usually in /etc/ or /etc/dhcp. You probably just want to put in a group with a bunch of declared mac to host mappings.
|All times are GMT -5. The time now is 02:02 PM.|