2021-04-20 21:31:37 +00:00
|
|
|
# Using DNS
|
|
|
|
|
2024-12-17 19:42:47 +00:00
|
|
|
Every `isle daemon` process ships with a DNS server which runs automatically.
|
|
|
|
This server will listen on port 53 on the VPN IP of that particular host.
|
2021-04-20 21:31:37 +00:00
|
|
|
|
2022-10-30 00:22:03 +00:00
|
|
|
The server will serve requests for `<hostname>.hosts.<domain>` hostnames,
|
|
|
|
where `<hostname>` is the name of any host in the network, and `<domain`> is the
|
|
|
|
network's domain name.
|
|
|
|
|
|
|
|
If a request for a hostname not within the network's domain is received then the
|
|
|
|
server will forward the request to a pre-configured public resolver. The set of
|
2024-07-07 11:37:26 +00:00
|
|
|
public resolvers used can be configured in the `/etc/isle/daemon.yml` file.
|
2021-04-20 21:31:37 +00:00
|
|
|
|
2023-08-05 21:53:17 +00:00
|
|
|
This DNS server is an optional feature of Isle, and not required in general for
|
|
|
|
making use of the network.
|
2021-04-20 21:31:37 +00:00
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
As an example of how to make use of this DNS server, let's say my host's IP on
|
2022-10-30 00:22:03 +00:00
|
|
|
the network is `10.10.1.1`, and my network's domain is `cool.internal`.
|
2023-08-05 21:53:17 +00:00
|
|
|
In order to configure the host to use the isle DNS server for all DNS
|
2022-10-30 00:22:03 +00:00
|
|
|
requests, I could do something like this:
|
2021-04-20 21:31:37 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
sudo su
|
|
|
|
echo "nameserver 10.10.1.1" > /etc/resolv.conf
|
|
|
|
```
|
|
|
|
|
2023-08-05 21:53:17 +00:00
|
|
|
From that point, all DNS requests on my host would hit the isle DNS
|
2022-10-30 00:22:03 +00:00
|
|
|
server. If I request `my-host.hosts.cool.internal`, it would respond with the
|
|
|
|
appropriate private IP.
|
2021-04-20 21:31:37 +00:00
|
|
|
|
|
|
|
NOTE that configuration of dns resolvers is very OS-specific, even amongst Linux
|
|
|
|
distributions, so ensure you know how your resolver configuration works before
|
|
|
|
doing this.
|