Skip to content
This repository has been archived by the owner on Apr 30, 2022. It is now read-only.

DHCP Server

oznu edited this page Sep 10, 2017 · 2 revisions

This container can also act as a DHCP server.

Run the container with --net=host to share networking with the Docker host:

docker run --net=host oznu/dns-ad-blocker

Create a file called dhcp.conf in the /config folder that contains:

# Enable this if docker is not running with cap NET_ADMIN
dhcp-broadcast 

# DHCP Range
dhcp-range=192.168.1.10,192.168.1.254,2d

# Router Address
dhcp-option=option:router,192.168.1.1

# List the DNS servers on the local network
dhcp-option=option:dns-server,192.168.1.100,192.168.1.200

# Ensure DHCP leases persist through a docker container rebuild
dhcp-leasefile=/config/dhcp-leasefile
Clone this wiki locally