feat: add DNS-over-TLS (853), DNS-over-HTTPS (443), HTTPS web console (53443)
- config.yaml: add ports for DoT, DoH (tcp+udp), HTTPS console with descriptions - add TLS cert options schema (enable_https, pfx path/password) mapped to HA ssl dir - Dockerfile: set HTTPS env defaults, fix symlink to -sf - README: document DoT/DoH setup using HA ACME certs via openssl pfx export - bump version to 1.1.0
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
ARG BUILD_FROM=ghcr.io/hassio-addons/base:latest
|
||||
FROM technitium/dns-server:latest
|
||||
|
||||
# Home Assistant add-on requirements
|
||||
ENV DATA_DIR="/data/dns"
|
||||
ENV DATA_DIR="/data/dns" \
|
||||
DNS_SERVER_WEB_SERVICE_HTTPS_PORT=53443 \
|
||||
DNS_SERVER_WEB_SERVICE_ENABLE_HTTPS=false
|
||||
|
||||
# Technitium stores its config in /etc/dns by default; use the add-on data
|
||||
# directory so settings persist across restarts.
|
||||
RUN mkdir -p /data/dns && \
|
||||
ln -s /data/dns /etc/dns
|
||||
ln -sf /data/dns /etc/dns
|
||||
|
||||
# Home Assistant expects a run command via S6/entrypoint; Technitium ships its own.
|
||||
ENTRYPOINT []
|
||||
CMD ["dotnet", "DnsServerApp.dll"]
|
||||
@@ -5,6 +5,7 @@ Runs the [Technitium DNS Server](https://technitium.com/dns/) inside Home Assist
|
||||
## Features
|
||||
- Ad-blocking DNS server with web console on port 5380
|
||||
- Local DNS records, conditional forwarding, DNS-over-TLS/HTTPS
|
||||
- DNS-over-TLS (853/tcp), DNS-over-HTTPS (443/tcp + 443/udp), HTTPS web console (53443/tcp)
|
||||
- Persists config to the add-on config volume
|
||||
- Designed to act as **secondary** to a primary Technitium instance via DNS Replication
|
||||
|
||||
@@ -17,7 +18,41 @@ Runs the [Technitium DNS Server](https://technitium.com/dns/) inside Home Assist
|
||||
```
|
||||
2. Refresh the add-on store, then install **Technitium DNS**.
|
||||
3. Set `admin_password` and `timezone` in the add-on config.
|
||||
4. Start the add-on and open the web UI at `http://homeassistant.local:5380`.
|
||||
4. (Optional) For DoT/DoH/HTTPS console, set `enable_https: true` and provide a TLS `.pfx` cert path + password (see below).
|
||||
5. Start the add-on and open the web UI at `http://homeassistant.local:5380`.
|
||||
|
||||
## TLS / DNS-over-TLS / DNS-over-HTTPS
|
||||
|
||||
Technitium can serve DoT (853/tcp), DoH (443/tcp + 443/udp, HTTP/1.1, HTTP/2, HTTP/3), and an HTTPS web console (53443/tcp). All three share one TLS certificate.
|
||||
|
||||
### Using the HA `ssl` map (recommended)
|
||||
The add-on maps the HA `ssl` directory, so certs issued by the HA ACME add-on are available.
|
||||
|
||||
1. Convert your cert to `.pfx` (Technitium requires PFX):
|
||||
```bash
|
||||
openssl pkcs12 -export -out /ssl/technitium.pfx \
|
||||
-inkey /ssl/privkey.pem -in /ssl/fullchain.pem \
|
||||
-password pass:YOUR_PASSWORD
|
||||
```
|
||||
2. In the add-on config:
|
||||
```yaml
|
||||
enable_https: true
|
||||
tls_cert_pfx_path: /ssl/technitium.pfx
|
||||
tls_cert_pfx_password: YOUR_PASSWORD
|
||||
```
|
||||
3. Restart the add-on. Technitium will use the cert for DoT, DoH, and the HTTPS web console.
|
||||
|
||||
### Verifying
|
||||
```bash
|
||||
# DoT
|
||||
kdig @homeassistant.local +tls example.com
|
||||
# DoH
|
||||
kdig @homeassistant.local +https example.com
|
||||
# HTTPS console
|
||||
https://homeassistant.local:53443/
|
||||
```
|
||||
|
||||
> **Note:** Technitium reads the cert path from its internal config. The first time you enable HTTPS, do it in the web console under **Settings → Options → Web Service** so the path is saved, then it will persist across restarts via replication.
|
||||
|
||||
## Failover / Replication setup
|
||||
|
||||
|
||||
@@ -12,15 +12,32 @@ webui: http://[HOST]:[PORT:5380]/
|
||||
ports:
|
||||
53/udp: 53
|
||||
53/tcp: 53
|
||||
853/tcp: 853
|
||||
443/tcp: 443
|
||||
443/udp: 443
|
||||
5380/tcp: 5380
|
||||
53443/tcp: 53443
|
||||
ports_description:
|
||||
53/udp: DNS service (UDP)
|
||||
53/tcp: DNS service (TCP)
|
||||
853/tcp: DNS-over-TLS (DoT)
|
||||
443/tcp: DNS-over-HTTPS (DoH, HTTP/1.1 + HTTP/2)
|
||||
443/udp: DNS-over-HTTPS (DoH, HTTP/3)
|
||||
5380/tcp: Web console (HTTP)
|
||||
53443/tcp: Web console (HTTPS)
|
||||
map:
|
||||
- addon_config:rw
|
||||
- ssl
|
||||
options:
|
||||
admin_password: CHANGE_ME
|
||||
timezone: UTC
|
||||
enable_https: false
|
||||
tls_cert_pfx_path: null
|
||||
tls_cert_pfx_password: null
|
||||
schema:
|
||||
admin_password: password
|
||||
timezone: str
|
||||
enable_https: bool
|
||||
tls_cert_pfx_path: str?
|
||||
tls_cert_pfx_password: password?
|
||||
image: technitium/dns-server
|
||||
Reference in New Issue
Block a user