Prevent DHCP server from offering IP addresses to certain clients

Hi all,

we are running a Mac OS X Server 10.5.5. Beside various other services, it acts as a DHCP server for our institute's clients (using the Apple's default DHCP daemon, "bootpd").

The DHCP serves one address pool and has also some static address mappings.

Now I need to configure the following:

Our VoIP telephones (Alcatel ipTouch) must not get an answer from our DHCP server when asking for an IP address. The reason behind this is that they should get their IP address from another DHCP server which is administrated by our university's telephone and network infrastructure working-group and not by us.

I've looked at the option "deny" which is documented in "man bootpd". In general it fuctions, but the problem is that I have to list the ethernet addresses of all of our VoIP telephones by hand. It would be much easier to have a kind of wildcard operator (which we could let match on the vendor part of the MAC address), but this doesn't seem to be available. Please correct me, if I am wrong!

My next try was to set up a firewall rule which simply drops the ethernet frames from the telephones arriving on our Mac OS X DHCP server. I can set up such rules using "ipfw" as it is documented in "man ipfw" and even wildcards (using a MAC address "subnet like" masking notation) are allowed. But my MAC address based firewalling rules are just ignored. At the end of "man ipfw" the sysctl variable "net.link.ether.ipfw" is introduced. The manpage says that this variable has to be set to "1" to let packets on layer 2 passed through the firewall. The problem is: I cannot set "net.link.ether.ipfw" to "1", it seems that this variable is avaiable on FreeBSD, but not on Mac OS X. I just don't want to believe it that it is possible that you cannot filter packets based on MAC addresses on Mac OS X.

So my question to you is: Do you have any idea how I could accomplish it so that machines with an specific vendor part in the MAC address are just ignored by our DHCP server without stating all of them manually?

The solutions (I should better say "work-arounds") I think about are:

- Setting up a list of the MAC addresses of the telephones by hand using the "deny" keyword in "/etc/bootpd.plist". This would be very suboptimal. I would really like to avoid the work (as it is not only a bit of "one-time work" for now, but also introduces a new work-flow, which means that it is necessary to do configuration work whenever a telephone is added or exchanged, for example).

- Disabling the "address pool" function of our existing DHCP and letting it only give out IP addresses to static mapped clients (of course, we wouldn't map our telephones there, but all of the computers which are possibly in use in our institute network). We could live with this. But the problem is: How can I accomplish this? Setting the keyword "allocate" to "false" (as given in "man bootpd") doesn't change anything. Even then, clients which aren't mapped statically will get an IP address. Having an empty IP address range doesn't seem to be possible, either. At least, the server manager doesn't allow me to store such a configuration.

- Disabling Apple's "bootpd" completely and compiling an ISC DHCPD on Mac OS X Server. I know well (from the administration of other Unix-like systems) that the ISC DHCPD is able to do these kind of filterings for parts of the MAC address (e.g. the vendor part) very easily. But I suppose that I have to do the whole Apple NetBoot configuration (we use Netboot to restore the clients in our student computer lab) also by hand. Just for the case: Has anyone experience setting up the ISC DHCPD on Mac OS? Is there any good documentation of the settings which have to be made there to enable NetBoot?

I would be very glad to get any help.

Thank you very much in advance!

Best regards,
Steffen

Message was edited by: Steffen M.

MacBook, Mac OS X (10.5.5), DHCP, BOOTPD, MAC address filtering using wildcards, Mac OS X Server Leopard 10.5.5

Posted on Nov 20, 2008 8:37 AM

Reply
2 replies
Sort By: 

Nov 20, 2008 1:13 PM in response to Steffen M.

Hello Steffen,

Is it possible to move the VoIP phones to a separate vlan/subnet or do they need to be on the same subnet as your client systems? If you move the phones to a separate vlan with DHCP server from the network and telecom group then you will not have any issues handing out DHCP responses to your client systems from your OS X server.

The only other options I can think of (along with the ones you have mentioned) is file a feature request with Apple to have the sysctl variable compiled into the OS or a hardware/software firewall that will enable you to perform MAC filtering.

Best of luck!
- Barrett
Reply

Nov 20, 2008 2:13 PM in response to Barrett Hartman1

Hello Barrett,

thank you very much for your reply.

Unfortunately, it is not possible to move the phones to a separate, VLAN (for more details, see [1]). I know that this would solve our problem for sure, but the phones have to stay in the same VLAN and the same subnet as the computers. This is due to the policy of the infrastructure department that we cannot get changed (we are one institute among more than about fifty others).

Filing a feature request to Apple is a good idea. I think I'll also reread the man-page of "ipfw", as it doesn't state clearly that MAC filtering doesn't seem to be possible, yet. So even filing a bug report could make sense.

Do you accidentally know (or someone else, of course) any additional firewall/filtering tools which we could use to do the MAC address based filtering?

TIA!

Best regards,
Steffen

[1] The infrastructure department doesn't want to pre-configure the phones when they are delivered (which is very comprehensible, because they would have to administrate several thousands of them), so the phones don't know anything about a local configuration. Connecting the phones to a special "VLANned" port of the floor switch is not possible, either. The reason is that the phones contain a built-in switch which allows to connect computers to it to avoid that the phones "block" additional network wall sockets, as cables are rare in some office rooms.

So what they are doing is the following: The phones shout out an DHCP request. Our institute's DHCP (Mac OS X) should stay quiet and ignore it. The DHCP of the phone infrastructure department (which is present in every subnets of the institutes due to a special switch configuration) answers and does "AVA" (automatic VLAN assignment). That means: Their DHCP forces the telephones to go then into a special phone VLAN. The VLAN termination is then done in the phones (not in the floor switch), so a computer which is connected to the switch that is embedded into the phones won't be in the telephone VLAN, but stays in the institute's LAN.

At the moment we have a kind of race-condition: If our DHCP is faster than the one from the infrastructure group, the phones go into our institute computer network and stay there until you reboot them. They will never learn anything about the special telephone VLAN. On the other hand, if the DHCP from the infrastructure group is faster, we don't have any problem.

Be that as it may, we urgently have to do something against it... I just don't know yet what the best solution is.
Reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Prevent DHCP server from offering IP addresses to certain clients

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.