Skip to content

Bind caching DNS server on Debian with wild-card domain support

License

Notifications You must be signed in to change notification settings

science695/docker-bind

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bind Docker

Latest build: 2018-01-11

Build Status

cytopia/bind


Bind caching DNS server on Debian with wild-card domain support

Devilbox

This docker image is part of the devilbox


Options

Environmental variables

Required environmental variables

  • None

Optional environmental variables

Variable Type Default Description
DEBUG_COMPOSE_ENTRYPOINT bool 0 Show shell commands executed during start.
Value: 0 or 1
WILDCARD_DOMAIN string `` Specify a wild-card domain to add during startup.
Example: WILDCARD_DOMAIN=example.com or WILDCARD_DOMAIN=local or WILDCARD_DOMAIN=loc
Note: $WILDCARD_ADDRESS must also be specified.
WILDCARD_ADDRESS string `` Specify to which IP address the wild-card domain should point to.
Example: WILDCARD_ADDRESS=192.168.0.1
Note: $WILDCARD_DOMAIN` must also be specidied.
DNS_FORWARDER string `` Specify a comma separated list of IP addresses as custom DNS resolver. This is useful if your LAN already has a DNS server which adds custom/internal domains and you still want to keep them in this DNS server
Example: DNS_FORWARDER=8.8.8.8,8.8.4.4
CUSTOM_DNS string `` Add additional DNS records (above the wildcard record). This can be used to make certain subdomains point to a different ip address, or even to create additional wildcard records within the zone.
Note: $WILDCARD_DOMAIN must also be specified.
Example: CUSTOM_DNS=special=127.0.0.1 would yield special.@WILDCARD_DOMAIN -> 127.0.0.1

Default mount points

  • None

Default ports

Docker Description
53 DNS Resolver
53/udp DNS Resolver

Usage

1. Start normally (caching DNS only)

$ docker run -i \
    -p 127.0.0.1:53:53 \
    -p 127.0.0.1:53/udp:53/udp \
    -t cytopia/bind

2. Add wildcard Domain (*.example.com)

example.com and all its subdomains (such as: whatever.example.com) will point to 192.168.0.1:

$ docker run -i \
    -p 127.0.0.1:53:53 \
    -p 127.0.0.1:53/udp:53/udp \
    -e WILDCARD_DOMAIN=example.com \
    -e WILDCARD_ADDRESS=192.168.0.1 \
    -t cytopia/bind

3. Add wildcard Domain (TLD)

loc and all its subdomains (such as: hostname.loc) will point to 192.168.0.1:

$ docker run -i \
    -p 127.0.0.1:53:53 \
    -p 127.0.0.1:53/udp:53/udp \
    -e WILDCARD_DOMAIN=loc \
    -e WILDCARD_ADDRESS=192.168.0.1 \
    -t cytopia/bind

4. Add wildcard Domain (TLD) and use your corporate DNS server as resolver

  • loc and all its subdomains (such as: hostname.loc) will point to 192.168.0.1:
  • Your corporate DNS servers are 10.0.15.1 and 10.0.15.2
$ docker run -i \
    -p 127.0.0.1:53:53 \
    -p 127.0.0.1:53/udp:53/udp \
    -e WILDCARD_DOMAIN=loc \
    -e WILDCARD_ADDRESS=192.168.0.1 \
	-e DNS_FORWARDER=10.0.15.1,10.0.15,2 \
    -t cytopia/bind

5. Add wildcard Domain (TLD), use your corporate DNS server as resolver but make one DNS entry point to a different ip

  • loc and all its subdomains (such as: hostname.loc) will point to 192.168.0.1:
  • special.loc will point to 192.168.0.10
  • Your corporate DNS servers are 10.0.15.1 and 10.0.15.2
$ docker run -i \
    -p 127.0.0.1:53:53 \
    -p 127.0.0.1:53/udp:53/udp \
    -e WILDCARD_DOMAIN=loc \
    -e WILDCARD_ADDRESS=192.168.0.1 \
    -e CUSTOM_DNS="special=192.168.0.10" \
	-e DNS_FORWARDER=10.0.15.1,10.0.15,2 \
    -t cytopia/bind

Version

BIND 9.10.3

About

Bind caching DNS server on Debian with wild-card domain support

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%