A dockerized version of the popular dnsmask adapted for use within the Haveno Ecosystem
414
A lightweight dnsmasq Docker container.
dnsmasq is a lightweight DNS forwarder, cache, and DHCP server. In this container, allowing easy configuration and control of dnsmasq via a browser interface.
This container allows you to:
First, create a dnsmasq.conf file on your Docker host. For example, place it at /opt/dnsmasq.conf. A sample configuration might look like this:
# Log all DNS queries
log-queries
# Use only specified DNS servers (Cloudflare in this example)
no-resolv
server=1.1.1.1
server=1.0.0.1
strict-order
# Serve all .onion domains through Tor DNS port
server=/onion/127.0.0.1:9053
# Define static IP for specific hosts
address=/myhost.company/10.0.0.2
For a more detailed configuration file, refer to the official dnsmasq documentation: dnsmasq.conf.
Run the following command to start the container:
docker run \
--name dnsmasq \
-d \
-p 53:53/udp \
-p 5380:8080 \
-v /opt/dnsmasq.conf:/etc/dnsmasq.conf \
--log-opt "max-size=100m" \
-e "HTTP_USER=foo" \
-e "HTTP_PASS=bar" \
--restart always \
havenodex/dnsmasq
53: Standard DNS port (UDP).To verify that your dnsmasq server is working, run a query from another machine, replacing <docker-host> with the IP address or hostname of your Docker host:
$ host myhost.company <docker-host>
Using domain server:
Name: <docker-host>
Address: <docker-host>#53
Aliases:
myhost.company has address 10.0.0.2
You can easily set up dnsmasq using Docker Compose. Create a docker-compose.yml file with the following content:
version: '3'
services:
dnsmasq:
image: havenodex/dnsmasq
ports:
- "53:53/udp"
- "5380:8080"
volumes:
- /opt/dnsmasq.conf:/etc/dnsmasq.conf
restart: always
logging:
options:
max-size: "100m"
Create the dnsmasq.conf file as described in the Configuration section and place it at /opt/dnsmasq.conf on your host.
Run the container using Docker Compose:
$ docker-compose up -d
docker-compose down
This project is licensed under the MIT License.
Contributors: Author: https://github.com/jpillora/webproc (J Pillora) Maintainer: https://kewbit.org` (Kewbit)
Content type
Image
Digest
sha256:1c9c9af9a…
Size
6.4 MB
Last updated
about 2 years ago
docker pull havenodex/dnsmasq