Remove DNS records storage, use dnsmasq or PopuraDNS instead

This commit is contained in:
George
2021-10-31 18:37:11 +00:00
parent d006a19738
commit 166705fc60
7 changed files with 21 additions and 144 deletions
+15 -36
View File
@@ -8,46 +8,33 @@ git clone https://github.com/zhoreeq/meshname.git
cd meshname
make
```
2) Generate the default config for your host
2) Run the daemon
```
./meshnamed -genconf 200:6fc8:9220:f400:5cc2:305a:4ac6:967e -subdomain meshname | tee /tmp/meshnamed.conf
./meshnamed
```
3) Run the daemon
3) Optionally, set configuration flags
```
./meshnamed -useconffile /tmp/meshnamed.conf
./meshnamed -listenaddr [::1]:53535 -debug
```
4) Optionally, set configuration flags
```
./meshnamed -listenaddr [::1]:53535 -debug -useconffile /tmp/meshnamed.conf
```
5) See the list of all configuration flags
4) See the list of all available flags
```
./meshnamed -help
```
Add custom DNS records to the configuration file and restart the daemon to apply settings.
A DNS record can be of any valid string form parsed by [miekg/dns#NewRR](https://godoc.org/github.com/miekg/dns#NewRR) function (see example configuration file below).
## Get meshname subdomain from an IPv6 address
```
./meshnamed -getname 200:f8b1:f974:967f:dd32:145d:1cc0:3679
aiaprmpzoslh7xjscrorzqbwpe
```
Use this subdomain with a .meshname TLD to configure DNS records
on your authoritative server, (i.e. dnsmasq, bind or PopuraDNS).
## systemd unit
Look for `meshnamed.service` in the source directory for a systemd unit file.
## Example configuration file
In this example, meshnamed is configured as authoritative server for two domain zones:
{
"aiag7sesed2aaxgcgbnevruwpy": [
"aiag7sesed2aaxgcgbnevruwpy.meshname. AAAA 200:6fc8:9220:f400:5cc2:305a:4ac6:967e",
"_xmpp-client._tcp.aiag7sesed2aaxgcgbnevruwpy.meshname. SRV 5 0 5222 xmpp.aiag7sesed2aaxgcgbnevruwpy.meshname",
"_xmpp-server._tcp.aiag7sesed2aaxgcgbnevruwpy.meshname. SRV 5 0 5269 xmpp.aiag7sesed2aaxgcgbnevruwpy.meshname",
"xmpp.aiag7sesed2aaxgcgbnevruwpy.meshname. AAAA 300:6fc8:9220:f400::1",
"forum.aiag7sesed2aaxgcgbnevruwpy.meshname. CNAME amag7sesed2aaaaaaaaaaaaaau.meshname."
],
"amag7sesed2aaaaaaaaaaaaaau": [
"amag7sesed2aaaaaaaaaaaaaau.meshname. AAAA 300:6fc8:9220:f400::5"
]
}
## Configure dnsmasq as a primary DNS resolver with "meshname." support
`/etc/dnsmasq.conf`
@@ -58,14 +45,6 @@ In this example, meshnamed is configured as authoritative server for two domain
server=/meshname/::1#53535
server=8.8.8.8
## Using meshnamed as a standalone DNS server
Set the flag to listen on all interfaces and a standard DNS server port
./meshnamed -listenaddr [::]:53 -useconffile /tmp/meshnamed.conf
Run as root and allow incoming connections to port 53/UDP in firewall settings.
## Custom top level domains (TLD) and subnet filtering
meshnamed can be configured to resolve custom TLDs.