I'm using an sysutils/py3-iocage as my jail manager and have created a jail for handling local DNS (dns/bind911) and DCHP (net/isc-dhcp43-server). I'm using a cloned lo2 interface using IP address 10.16.123.2. On the host system I forward DNS requests into the jail and this works like a charm.
However, my DHCP service won't start as it has no subnet declaration for lo2 as I want the DCHP service for my host domain (172.16.123.0/24. I have the following configuration:
When I start the DCHP server with
So, is there a way to fix the DCHP configuration or do I have to change to running the jail on a cloned host interface?
However, my DHCP service won't start as it has no subnet declaration for lo2 as I want the DCHP service for my host domain (172.16.123.0/24. I have the following configuration:
Code:
# jail configuration (iocage get ip4_addr ns)
ip4_addr:lo2|10.16.123.2
Code:
# rc.conf
# Enable DHCP server
dhcpd_enable="NO"
dhcpd_flags="-q"
dhcpd_conf="/usr/local/etc/dhcpd.conf"
dhcpd_ifaces="lo2"
dhcpd_withumask="022"
Code:
# dhcpd.conf
option domain-name "home.lan";
option domain-name-servers 172.16.123.11;
option subnet-mask 255.255.255.0;
default-lease-time 600;
max-lease-time 72400;
ddns-update-style none;
subnet 172.16.123.0 netmask 255.255.255.0 {
range 172.16.123.100 172.16.123.150;
option routers 172.16.123.1;
}
When I start the DCHP server with
service isc-dhcpd onestart
I get the following error in the logs:
Code:
Jul 22 13:42:31 ns dhcpd:
Jul 22 13:42:31 ns dhcpd: No subnet declaration for lo2 (10.16.123.2).
Jul 22 13:42:31 ns dhcpd: ** Ignoring requests on lo2. If this is not what
Jul 22 13:42:31 ns dhcpd: you want, please write a subnet declaration
Jul 22 13:42:31 ns dhcpd: in your dhcpd.conf file for the network segment
Jul 22 13:42:31 ns dhcpd: to which interface lo2 is attached. **
Jul 22 13:42:31 ns dhcpd:
Jul 22 13:42:31 ns dhcpd: Not configured to listen on any interfaces!
So, is there a way to fix the DCHP configuration or do I have to change to running the jail on a cloned host interface?