All Projects → MatthewVance → Unbound Docker

MatthewVance / Unbound Docker

Licence: mit
Unbound DNS Server Docker Image

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Unbound Docker

Shaman
Small, lightweight, api-driven dns server.
Stars: ✭ 426 (+189.8%)
Mutual labels:  dns, dns-server
Knot
A mirrored repository
Stars: ✭ 138 (-6.12%)
Mutual labels:  dns, dns-server
Dns Proxy Server
Solve your DNS hosts from your docker containers, then from your local configuration, then from internet
Stars: ✭ 480 (+226.53%)
Mutual labels:  dns, dns-server
Smartdns
A local DNS server to obtain the fastest website IP for the best Internet experience, 一个本地DNS服务器,获取最快的网站IP,获得最佳上网体验。
Stars: ✭ 4,333 (+2847.62%)
Mutual labels:  dns, dns-server
Ioc2rpz
ioc2rpz is a place where threat intelligence meets DNS.
Stars: ✭ 67 (-54.42%)
Mutual labels:  dns, dns-server
Gdnsd
Authoritative DNS Server --
Stars: ✭ 370 (+151.7%)
Mutual labels:  dns, dns-server
Whonow
A "malicious" DNS server for executing DNS Rebinding attacks on the fly (public instance running on rebind.network:53)
Stars: ✭ 533 (+262.59%)
Mutual labels:  dns, dns-server
zonemanager
Central DNS/DHCP database with replication to Amazon Route53, BIND, MikroTik routers and other services.
Stars: ✭ 29 (-80.27%)
Mutual labels:  dns, dns-server
Simpledns
A very simple and small DNS Server to help understanding the protocol basics.
Stars: ✭ 62 (-57.82%)
Mutual labels:  dns, dns-server
Sdns
Privacy important, fast, recursive dns resolver server with dnssec support
Stars: ✭ 658 (+347.62%)
Mutual labels:  dns, dns-server
Roguesploit
Powerfull Wi-Fi trap!
Stars: ✭ 262 (+78.23%)
Mutual labels:  dns, dns-server
Sliver
Adversary Simulation Framework
Stars: ✭ 1,348 (+817.01%)
Mutual labels:  dns, dns-server
MicroDNSSrv
A micro DNS server for MicroPython to simply respond to A queries on multi-domains with or without wildcards (used on Pycom modules & ESP32)
Stars: ✭ 43 (-70.75%)
Mutual labels:  dns, dns-server
Dnsclient.net
DnsClient.NET is a simple yet very powerful and high performant open source library for the .NET Framework to do DNS lookups
Stars: ✭ 400 (+172.11%)
Mutual labels:  dns, dns-server
dnsfwd
DNS forwarder over a (TCP) virtual circuit
Stars: ✭ 21 (-85.71%)
Mutual labels:  dns, dns-server
Blocky
Fast and lightweight DNS proxy as ad-blocker for local network with many features
Stars: ✭ 523 (+255.78%)
Mutual labels:  dns, dns-server
Windows.10.DNS.Block.List
Windows DNS Block List
Stars: ✭ 18 (-87.76%)
Mutual labels:  dns, dns-server
Secure-Adblocking-DNS
Secure (DNS-over-TLS) Adblocking (Pi-hole) Recursive (unbound) Server System setup
Stars: ✭ 19 (-87.07%)
Mutual labels:  dns, dns-server
Dnsserver
Technitium DNS Server
Stars: ✭ 603 (+310.2%)
Mutual labels:  dns, dns-server
Tor Router
A SOCKS, HTTP and DNS proxy for distributing traffic across multiple instances of Tor
Stars: ✭ 69 (-53.06%)
Mutual labels:  dns, dns-server

Unbound DNS Server Docker Image

Supported tags and respective Dockerfile links

What is Unbound?

Unbound is a validating, recursive, and caching DNS resolver.

unbound.net

How to use this image

Standard usage

Run this container with the following command:

docker run --name my-unbound -d -p 53:53/udp -p 53:53/tcp \
--restart=always mvance/unbound:latest

For a DNS server with lots of short-lived connections, you may wish to consider adding --net=host to the run command for performance reasons. However, it is not required and some shared container hosting services may not allow it. You should also be aware --net=host can be a security risk in some situations. The Center for Internet Security Docker 1.6 Benchmark recommends against this mode since it essentially tells Docker to not containerize the container's networking, thereby giving it full access to the host machine's network interfaces. It also mentions this option could cause the container to do unexpected things such as shutting down the Docker host as referenced in Docker Issue #6401 . For the most secure deployment, unrelated services with confidential data should not be run on the same host or VPS. In such cases, using --net=host should have limited impact on security.

Serve Custom DNS Records for Local Network

While Unbound is not a full authoritative name server, it supports resolving custom entries on a small, private LAN. In other words, you can use Unbound to resolve fake names such as your-computer.local within your LAN.

To support such custom entries using this image, you need to provide an a-records.conf or srv-records.conf file. This conf file is where you will define your custom entries for forward and reverse resolution.

A records

The a-records.conf file should use the following format:

# A Record
  #local-data: "somecomputer.local. A 192.168.1.1"
  local-data: "laptop.local. A 192.168.1.2"

# PTR Record
  #local-data-ptr: "192.168.1.1 somecomputer.local."
  local-data-ptr: "192.168.1.2 laptop.local."

Once the file has your entries in it, mount your version of the file as a volume when starting the container:

docker run --name my-unbound -d \
-p 53:53/udp -p 53:53/tcp \
-v $(pwd)/a-records.conf:/opt/unbound/etc/unbound/a-records.conf:ro \
--restart=always mvance/unbound:latest

SRV records

The srv-records.conf file should use the following format:

# SRV records
# _service._proto.name. | TTL | class | SRV | priority | weight | port | target.
_etcd-server-ssl._tcp.domain.local.  86400 IN    SRV 0        10     2380 etcd-0.domain.local.
_etcd-server-ssl._tcp.domain.local.  86400 IN    SRV 0        10     2380 etcd-1.domain.local.
_etcd-server-ssl._tcp.domain.local.  86400 IN    SRV 0        10     2380 etcd-2.domain.local.

Run a container that use this SRV config file:

docker run --name my-unbound -d \
-p 53:53/udp -p 53:53/tcp \
-v $(pwd)/srv-records.conf:/opt/unbound/etc/unbound/srv-records.conf:ro \
--restart=always mvance/unbound:latest

Override default forward

By default, forwarders are configured to use Cloudflare and CleanBrowsing DNS. You can retrieve the configuration in the 1.10.0/forward-records.conf file.

You can create your own configuration file and override the one placed in /opt/unbound/etc/unbound/forward-records.conf in the container.

Example forward-records.conf:

forward-zone:
  # Forward all queries (except those in cache and local zone) to
  # upstream recursive servers
  name: "."

  # my DNS
  forward-addr: [email protected]#home.local

Once the file has your entries in it, mount your version of the file as a volume when starting the container:

docker run --name my-unbound -d -p 53:53/udp -p 53:53/tcp -v \
$(pwd)/forward-records.conf:/opt/unbound/etc/unbound/forward-records.conf:ro \
--restart=always mvance/unbound:latest

Use a customized Unbound configuration

Instead of using this image's default configuration for Unbound, you may supply your own configuration. If your customized configuration is located at /my-directory/unbound/unbound.conf, pass /my-directory/unbound as a volume when creating your container:

docker run --name=my-unbound \
--volume=/my-directory/unbound:/opt/unbound/etc/unbound/ \
--publish=53:53/tcp \
--publish=53:53/udp \
--restart=unless-stopped \
--detach=true \
mvance/unbound:latest

This will expose all files in /my-directory/unbound/ to the container. As an alternate way to serve custom DNS records for any local zones, either place them directly in your unbound.conf, or place the local zones in a separate file and use Unbound's include directive within your unbound.conf:

include: /opt/unbound/etc/unbound/local-zone-unbound.conf

Your volume's contents might eventually look something like this:

/my-directory/unbound/
-- unbound.conf
-- local-zone-unbound.conf
-- secret-zone.conf
-- some-other.conf

Overall, this approach is very similar to the a-records.conf approach described above. However, by passing your unbound directory rather than a single file, you have more options for customizing and segmenting your Unbound configuration.

Note: Care has been taken in the image's default configuration to enable security options so it is recommended to use it as a guide.

User feedback

Documentation

Documentation for this image is stored right here in the README.md.

Documentation for Unbound is available on the project's website.

Issues

If you have any problems with or questions about this image, please contact me through a GitHub issue.

Contributing

You are invited to contribute new features, fixes, or updates, large or small. I imagine the upstream projects would be equally pleased to receive your contributions.

Please familiarize yourself with the repository's README.md file before attempting a pull request.

Before you start to code, I recommend discussing your plans through a GitHub issue, especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.

Acknowledgments

The code in this image is heavily influenced by DNSCrypt server Docker image, though the upstream projects most certainly also deserve credit for making this all possible.

Licenses

License

Unless otherwise specified, all code is released under the MIT License (MIT). See the repository's LICENSE file for details.

Licenses for other components

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].