Skip to content

Commit 49b416e

Browse files
committed
DNS authority management and features
Improve NS record handling with glue A-records for healthy targets Update DNS Authority feature with configuration options and conflict checks Add self-test functionality for DNS Authority server startup
1 parent 2055b77 commit 49b416e

File tree

7 files changed

+1408
-29
lines changed

7 files changed

+1408
-29
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,32 @@ When Newt receives WireGuard control messages, it will use the information encod
2525

2626
When Newt receives WireGuard control messages, it will use the information encoded to create a local low level TCP and UDP proxies attached to the virtual tunnel in order to relay traffic to programmed targets.
2727

28+
### DNS Authority
29+
30+
Newt includes an authoritative DNS server that can serve customized DNS records for specific domains (zones) managed by Pangolin. This allows for intelligent routing and high-availability setups where Newt can respond with the healthiest target IPs for a given service.
31+
32+
The DNS server runs on port 53 (UDP/TCP). By default, it binds to `0.0.0.0`, but this can be customized using the `--dns-bind` flag or `DNS_BIND_ADDR` environment variable.
33+
34+
#### systemd-resolved Conflict
35+
36+
On many modern Linux distributions, `systemd-resolved` binds to `127.0.0.53:53`, which prevents Newt from binding to `0.0.0.0:53`. To resolve this, you can:
37+
1. Disable `systemd-resolved`: `sudo systemctl disable --now systemd-resolved`
38+
2. Or bind Newt to a specific public IP that doesn't conflict with the loopback address used by resolved: `--dns-bind 1.2.3.4`
39+
3. Or disable the DNS Authority feature entirely if you don't need it: `--disable-dns-authority`
40+
41+
## Configuration
42+
43+
Newt can be configured via environment variables or command-line flags.
44+
45+
| Environment Variable | Flag | Description | Default |
46+
|----------------------|------|-------------|---------|
47+
| `PANGOLIN_ENDPOINT` | `--endpoint` | Pangolin server endpoint | |
48+
| `NEWT_ID` | `--id` | Newt Site ID | |
49+
| `NEWT_SECRET` | `--secret` | Newt Site Secret | |
50+
| `DNS_BIND_ADDR` | `--dns-bind` | Bind address for DNS Authority | `0.0.0.0` |
51+
| `DISABLE_DNS_AUTHORITY` | `--disable-dns-authority` | Disable the DNS Authority server | `false` |
52+
| `LOG_LEVEL` | `--log-level` | Logging level (DEBUG, INFO, WARN, ERROR, FATAL) | `INFO` |
53+
2854
## Build
2955

3056
### Binary

0 commit comments

Comments
 (0)