A lightweight and secure dhcp-server (isc-dhcp-server)
50K+
A lightweight and secure dhcp-server (isc-dhcp-server)
GitHub - 3x3cut0r/isc-dhcp-server - https://github.com/3x3cut0r/docker/tree/main/isc-dhcp-server
DockerHub - 3x3cut0r/isc-dhcp-server - https://hub.docker.com/r/3x3cut0r/isc-dhcp-server
Example 1 - IPV4 - run with custom dhcpd.conf
This is the recommended way to use this container,
otherwise you will not be able to use all options that dhcpd.conf supports
Note: IFACE have to fit with your host-interface !!!
docker run -d \
--name isc-dhcp-server \
--network=host \
-e IFACE=eth0 \
-v /path/to/your/dhcpd.conf:/etc/dhcp/dhcpd.conf:ro \
3x3cut0r/isc-dhcp-server:latest
Example 2 - IPV4 - run with specified environment variables
Note: IFACE+SUBNET have to fit with your host-interface !!!
docker run -d \
--name isc-dhcp-server \
--network=host \
-e TZ="Europe/Berlin" \
-e IFACE=eth0 \
-e SUBNET=192.168.0.0 \
-e NETMASK=255.255.255.0 \
-e RANGE_BEGIN=192.168.0.100 \
-e RANGE_END=192.168.0.200 \
-e ROUTERS=192.168.0.1 \
-e DOMAIN_NAME_SERVERS="8.8.8.8, 8.8.4.4" \
3x3cut0r/isc-dhcp-server:latest
Example 3 - IPV6 - run with custom dhcpd.conf
Note: IFACE have to fit with your host-interface !!!
docker run -d \
--name isc-dhcp-server \
--network=host \
-e TZ="Europe/Berlin" \
-e IFACE=eth0 \
-e PROTOCOL=6 \
-v /path/to/your/dhcpd.conf:/etc/dhcp/dhcpd.conf:ro \
3x3cut0r/isc-dhcp-server:latest
Example 4 - IPV6 - run with specified environment variables
Note: IFACE+SUBNET6 have to fit with your host-interface !!!
docker run -d \
--name isc-dhcp-server \
--network=host \
-e TZ="Europe/Berlin" \
-e IFACE=eth0 \
-e PROTOCOL=6 \
-e SUBNET6="fe80::0/64" \
-e RANGE6_BEGIN="fe80::1" \
-e RANGE6_END="fe80::ffff" \
-e DHCP6_NAME_SERVERS="2001:4860:4860::8888, 2001:4860:4860::8844" \
3x3cut0r/isc-dhcp-server:latest
version: '3'
services:
isc-dhcp-server:
network_mode: host
environment:
TZ: Europe/Berlin
IFACE: eth0
PROTOCOL: 4
volumes:
- /path/to/your/dhcpd.conf:/etc/dhcp/dhcpd.conf
image: 3x3cut0r/isc-dhcp-server:latest
for more information, see https://manpages.debian.org/jessie/isc-dhcp-server/dhcpd.8.en.html
dhcpd Environment Variables
IFACE - Interface to listen on. Have to fit with your host-interface! Default: eth0PROTOCOL - IP Protocol. (IPv4=4, IPv6=6) Default: 4QUIET - Be quiet at startup. Default: 0TZ - Specifies the server timezone - Default: UTCGlobal dhcpd.conf Environment Variables
DEFAULT_LEASE_TIME - Default: 3600MAX_LEASE_TIME - Default: 86400AUTHORITATIVE - Default: 1LOGFACILITY - Default: local7IPv4 Environment Variables (PROTOCOL=4)
SUBNET - Network-Address. e.g.: 192.168.0.0NETMASK - Subnet-Mask. e.g.: 255.255.255.0RANGE_BEGIN - Subnet-Range (first host). e.g.: 192.168.0.10RANGE_END - Subnet-Range (last host). e.g.: 192.168.0.200BROADCAST - Broadcast-Address. e.g.: 192.168.0.255ROUTERS - Gateway. e.g.: 192.168.0.1DOMAIN_NAME - Domain-Name. e.g.: domain.exampleDOMAIN_NAME_SERVERS - DNS-Servers (up to 3). e.g.: 8.8.8.8,8.8.4.4 (avoid using spaces!)DOMAIN_SEARCH - Search-List of Domains (up to 3). e.g.: example.com,sales.example.com (avoid using spaces!)NEXT_SERVER - Next-Server (for PXE/TFTP-Boot). e.g.: 192.168.0.1TFTP_SERVER_NAME - TFTP-Server (for PXE/TFTP-Boot). e.g.: 192.168.0.1BOOTFILE_NAME - Bootfile-Name (for PXE/TFTP-Boot). e.g.: bootcode.binNTP_SERVERS - NTP-Servers (up to 3). e.g.: 0.de.pool.ntp.org,1.de.pool.ntp.org (avoid using spaces!)ROOT_PATH - Root-Path. e.g. NFS-Root-Path: 192.168.0.1:/nfs/client1VENDOR_ENCAPSULATED_OPTIONS - String of vendor-specific information. e.g.: Raspberry Pi BootIPv6 Environment Variables (PROTOCOL=6)
SUBNET6 - Network-Address. e.g.: fe80::0/64RANGE6_BEGIN - Subnet-Range (first host). e.g.: fe80::1RANGE6_END - Subnet-Range (last host). e.g.: fe80::ffffDHCP6_NAME_SERVERS - DNS-Servers (up to 3). e.g.: 2001:4860:4860::8888,2001:4860:4860::8844 (avoid using spaces!)DHCP6_DOMAIN_SEARCH - Domain-Name. e.g.: domain.examplePREFIX6 - IPv6 Subnet-Deligation-Mask e.g.: fe80:1:2:3:: fe80:1:2:f:: /60/etc/dhcp/dhcpd.conf - DHCP-Server configuration file - recommended, otherwise configure your dhcp-server via environment variables - This project is licensed under the GNU General Public License - see the gpl-3.0 for details.
Content type
Image
Digest
sha256:a1e076fba…
Size
5.9 MB
Last updated
about 1 year ago
docker pull 3x3cut0r/isc-dhcp-server