Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DennisBlah

macrumors 6502
Original poster
Dec 5, 2013
485
2
The Netherlands
Hi all,

I'm running an macPro with OSX Server (Yosemite) with a simple website and dhcp on osx server and dnsmasq for dns routing. Reason I choose for dnsmasq is discussed in DnS-Forwarding

I'm now hitting the limit of my subnet with leasing ip adresses.

All devices connected will be connected for max 5 - 10 minutes and then disconnect. But in settings I can only set the lease time to a minimum of 1 hour.

Is there some way to decrease this time to 15 minutes ?

Thanks!

----
Also I don't seem to get DHCP to work with dnsmasq.
Current config
Code:
listen-address=192.168.0.1
interface=en0
except-interface=en1
no-dhcp-interface=en0   #comment out for dhcp
no-dhcp-interface=en1

#dhcp-range=192.168.0.50,192.168.3.254,5m  #DHCP RANGE
#dhcp-option=3,192.168.0.1  #DHCP GATEWAY
#dhcp-option=6,192.168.0.1  #DHCP DNS
#server=192.168.0.1             #DHCP Server ?

address=/#/192.168.0.1
no-hosts
 
Last edited:

DennisBlah

macrumors 6502
Original poster
Dec 5, 2013
485
2
The Netherlands
You're running bootp right? It's a really inferior DHCP server meant primarily for allow net booting/bootstrapping, not a general DHCP server. dhcpd is much more robust.

You can try editing /etc/bootpd.plist by hand... change the lease_min and lease_max properties. Issue "serveradmin dhcp stop" or "start" before and after editing.

Make sure you understand what the "max", "min" times configure, and that most clients start a "renewal" at 50% of their lease.

Hi Dyt!
Thanks for the tip! I guess it's working, as the Server.app shows 5 minute now as lease time :) Awesome.

I'm not netbooting and it's disabled. It's strictly for viewing a short video on the page located on the server (ONLY that page, thats why I'm using dnsmasq for dns).


If you use dnsmasq as the DHCP server, make sure bootp DHCP service is deactivated. In your dnsmasq config comment out the "no-dhcp-interface=en0". Also I'm pretty sure the "server" option is for DNS upstream resolving, not for DHCP, and isn't applicable if you catch everything with "address". Uncomment the other options.

For dhcp-option, it's preferable to use "option:router" instead of "3" just for future clarity. The router option isn't too bad since it is nearly always used, but for others.

Thanks for clarification of the dnsmasq.
What do you advice as DHCP ? The bootp from Server.app or dnsmasq since I already installed it and you are calling bootp robust ?
 

DennisBlah

macrumors 6502
Original poster
Dec 5, 2013
485
2
The Netherlands
Glad you got bootpd working correctly!

I would say for your application, dnsmasq would be better because you already have it installed (if you didn't, I would recommend staying with bootpd). Apple's implementation of bootpd is obviously improved, but since dnsmasq is written by the same guy who did the dhcpd, I trust his implementation a little more. The negative is that dnsmasq has a lot of configuration options to get you in trouble. Just stick with the main two you need for DHCP and it should be OK.

Maybe since bootpd is running as you wish right now, test it out for a while and see how it goes.

Thanks for all your help mate!
Ill ser how it goed like it is now
Dhcp on bootp and dns on dnsmasq

Thanks again!
 

DennisBlah

macrumors 6502
Original poster
Dec 5, 2013
485
2
The Netherlands
Glad you got bootpd working correctly!

I would say for your application, dnsmasq would be better because you already have it installed (if you didn't, I would recommend staying with bootpd). Apple's implementation of bootpd is obviously improved, but since dnsmasq is written by the same guy who did the dhcpd, I trust his implementation a little more. The negative is that dnsmasq has a lot of configuration options to get you in trouble. Just stick with the main two you need for DHCP and it should be OK.

Maybe since bootpd is running as you wish right now, test it out for a while and see how it goes.

Hi Dyt,

since you've chosen not to allow private messages, I just quote you again, and hope you will read this :)

As you know pretty much apparently also of dnsmasq.

I'm using this to forward all requests to my host.
address=/#/192.168.0.1

Why does this url not being forwarded? http://www.apple.com/nl
I think it has to do with /nl

How can I tackle this issue, and make sure that really ALL requests are going by 192.168.0.1 ?
 

DennisBlah

macrumors 6502
Original poster
Dec 5, 2013
485
2
The Netherlands
^^ in het nederlands ^^
No it just goes nowhere

I was hoping that there was a dnsmasq sollution possible. I'll just stick with my htaccess :) then

Thanks again!!!
 

dyt1983

macrumors 65816
May 6, 2014
1,365
165
USA USA USA
^^ in het nederlands ^^
No it just goes nowhere

I was hoping that there was a dnsmasq sollution possible. I'll just stick with my htaccess :) then

I think the simple "ErrorDocument 404 /" in your htaccess will work perfectly, as long as you have "AllowOverride All" set. I hope it is all working well for you now!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.