Hosting Internal DHCP/DNS for Jails

Anaerin

Cadet
Joined
Jun 20, 2019
Messages
7
I have a large internal network (Using the 10.x.x.x private network), and I would like things nicely organized.

My pfSense router hands out addresses with DHCP, with static leases for configured devices and a range of 10.150.x.x for unconfigured or guest DHCP clients.

I have allocated the 10.1.x.x range for my FreeNAS box (With the FreeNAS UI at 10.1.0.0 and the IBM IMM for the server at 10.1.255.255), and what I would like is for the FreeNAS box to use an internal DHCP server to hand out addresses in the 10.1.x.x-10.1.255.x range for Jails and VMs (and ideally host a DNS server so they can be looked up).

Is there a way I can set up a DHCP server on the FreeNAS box (in a Jail?) that's just listening on the internal Jails network, so it doesn't try and allocate IPs to devices on the external network? Is hosting a pfSense VM the best way (it seems massive overkill for this, but who knows).
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Setup a jail and install isc-dhcpd ... works like a charm. It's not trivial and you are not quite explicit about if your are using different subnets/broadcast domains or just numerical ranges in one flat network (which I would advocate against). But generally a DHCP and a DNS server run just fine in a jail - been using that for years.

I just now moved that service to an Ubiquiti EdgeRouter, so the rest of my network can rely on that simple piece of hardware that boots fast and is online way before my FreeNAS and all my jails come up.

If you know basic networking, you can create a separate bridge interface for all your jails, connect one jail to that and the rest of your network (2 interfaces!), and use that jail as DHCP server, DNS server, router ...

HTH,
Patrick
 
Top