This is a simple DNS over TLS proxy writen in Python and running in a container. The conteiner is built with use of lightweight alpine and Python utilises only the default libraries.
The DNS over TLS proxy can be used to resolve DNS via a secure channel by any client including git, nslookup or a custom built client, etc..
Overview
The proxy listens on incoming DNS request via TCP and UDP and upstreams the requests to Cloudflare 1.1.1.1 secure resolver on port 853. Responses received from Cloudflare are parsed and presented to the user.
- Everyone
The DNS over TLS proxy runs in a Docker container and requires Docker or another container runtime to be installed.
- Install Docker
Git is also required to clone this repository
- Install Git
This is Info
To start the DNS over TLS proxy in a container follow the steps below
- Open a terminal
- Clone this repository with Git
git clone https://github.com/deplab/dns-over-tls.git
- Change the directory
cd dns-over-tls
- Build a container image to start the DNS over TLS proxy container
docker build -t dnsovertlsproxy:1 .
- Start the DNS over TLS proxy in a detached mode in a container
# Note that the host machine port that the proxy will be listening on is 8153
# This port can be changed to any other port that is not in use
docker run -d -p 8153:53/tcp -p 8153:53/udp dnsovertlsproxy:1
NOTE The default Upstream DNS Server used is Cloudflare (IP address 1.1.1.1), to overwrite (to e.g. Google 8.8.8.8), use -e DNS_SERVER=8.8.8.8
Example:
docker run -d -p 8153:53/tcp -p 8153:53/udp -e DNS_SERVER=8.8.8.8 dnsovertlsproxy:1
After completing the start up of the proxy (section 3.1)
- Test/Use the DNS over TLS proxy with
digonMacOSorLinux
dig @127.0.0.1 -p 8153 github.com
- Test/Use the DNS over TLS proxy with
nslookuponWindows
nslookup -port=8153 github.com 127.0.0.1
