Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit a817d827503938101ec62cb728186ea461f3cdfd
Author: Trenton Holmes <[email protected]>
Date:   Wed Nov 1 09:45:11 2023 -0700

    Updates changelog for 0.2.2

commit 95ef326
Merge: 60fad4e 509b5c9
Author: Trenton Holmes <[email protected]>
Date:   Wed Nov 1 09:40:40 2023 -0700

    Merge remote-tracking branch 'origin/main' into develop

commit 60fad4e
Author: Trenton Holmes <[email protected]>
Date:   Tue Jun 13 08:57:24 2023 -0700

    Updates and simplifies the readme, including some basic configuration

commit 9a67401
Author: Trenton Holmes <[email protected]>
Date:   Tue Jun 13 08:43:07 2023 -0700

    Updates the changelog format
  • Loading branch information
stumpylog committed Nov 1, 2023
1 parent 509b5c9 commit d8de5ca
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 14 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
docker-compose.yml
README.md
CHANGELOG.md
LICENSE
17 changes: 14 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
# CHANGELOG

## 0.2.0
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.2] - 2023-11-01

### Changed

- Changelog format is now "Keep a Changelog" style
- Updated action versions

## [0.2.0] - 2023-05-25

- Alpine 3.18
- s6-overlay 3.1.5.0

## v0.1.0
## [0.1.0]

- Initial image release
- Alpine 3.17
- s6-overlay 3.1.4.2
- dnsmasq 2.87
41 changes: 30 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Tailscale DNS Container

This is a dead simple container designed to solve a problem likely unique to
my own network and configuration.
This is a dead simple container designed containing dnsmasq from
Alpine Linux, designed to run connected to your Tailnet and
provide more control over DNS requests.

## The Problem

Expand All @@ -12,14 +13,11 @@ providing the DDNS updated DNS record information. So the devices connect direc
to the server when inside my network using a 192.168.1.xxx address. This
works great when connected locally.

Now, I'm working on getting Tailscale setup and configured for my devices, so
there will not be open ports and no need for the DDNS updater any longer.
Tailscale allows for DNS control, including using a node as a DNS server.
Great! But it doesn't work quite how I want, as my existing DNS server will
return the server IP address in the 192.168.1.xxx for my own domain.

To use my existing DNS server, I would also need to advertise subnet routes
to allow access to the server, since the DNS rewrite returns an IP not in the Tailnet.
I wanted roughly the same thing to happen when a device is connected via
[Tailscale](https://tailscale.com/). When a device is on the my tailnet, it
receives the server IP address for my domain as being the server's tailnet IP
address. For requests not for my own domain, they are passed upstream to
AdGuard (or any other DNS server).

## The Solution

Expand All @@ -31,10 +29,31 @@ The end result? A client connected locally will see the local server IP address
A client connected via Tailscale sees the Tailscale IP address of the server. No
subnet routing required.

## Configuration

See the example [docker-compose.yml](./docker-compose.yml) for a full example
of setting the container up, alongside a Tailscale image.

Mount a dnsmasq configuration file into `/etc/dnsmasq.d/`. Set your domain with its
Tailnet IP as the return value.

Set your preferred upstream DNS for all other requests. This might be a public
resolver like Cloudflare or Google, your own resolver or something else entirely.

```
# Add domains which you want to force to an IP address here.
# Set tailnet IP(s) here
address=/myawesomedomain.me/100.x.y.z
# Add other name servers here, with domain specs if they are for
# non-public domains.
server=1.1.1.1
```

## Technologies

This image is built on:

- [Alpine Linux](https://hub.docker.com/_/alpine/)
- [Alpine Linux](https://www.alpinelinux.org/)
- [s6-overlay](https://github.com/just-containers/s6-overlay)
- [dnsmasq](https://thekelleys.org.uk/dnsmasq/doc.html)

0 comments on commit d8de5ca

Please sign in to comment.