Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bahlo/mapdns
A simple, static DNS server.
https://github.com/bahlo/mapdns
dns go static
Last synced: 7 days ago
JSON representation
A simple, static DNS server.
- Host: GitHub
- URL: https://github.com/bahlo/mapdns
- Owner: bahlo
- License: mit
- Created: 2021-09-30T08:20:49.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-07T03:17:16.000Z (over 1 year ago)
- Last Synced: 2024-08-02T15:22:23.477Z (3 months ago)
- Topics: dns, go, static
- Language: Go
- Homepage:
- Size: 83 KB
- Stars: 85
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mapdns [![CI](https://github.com/bahlo/mapdns/actions/workflows/ci.yml/badge.svg)](https://github.com/bahlo/mapdns/actions/workflows/ci.yml)
A smol DNS server (around 100 loc) that's configured with a static JSON file. Useful for split-dns.
## Install
### Go
```shell
go install github.com/bahlo/[email protected]
```### Docker
```shell
docker pull ghcr.io/bahlo/mapdns:0.2.0
```## Example
Create a `mapdns.json` in the same directory you're running the binary from, with content like this:
```json
{
"foo.example.org.": {
"A": "1.2.3.4",
"AAAA": "::1"
},
"*.foo.example.org.": {
"A": "1.2.3.4"
}
}
```Run the binary and start making requests!
## State of the project
It works and I use it in my home network for split-dns[^1].
There is little tests and no support for records other than `A` and `AAAA`.
Please don't use this on a production system.## Logging
Expose `MAPDNS_DEBUG=true` to get debug logs. Otherwise it will only log on
errors.[^1]: I use Tailscale and configured it to search for my internal network domain
on the DNS server I configured here.