0

I've searched around and can't quite find an answer to how I can share a domain name between a site-to-site VPN.

Here is a rough sketch of my network: Network diagram

Is it possible to have mulquin.net as the local domain for both sides of the site-to-site VPN? I tried setting a custom "Upstream DNS Server" on the Pi at 192.168.1.240 but to no avail.

If I do nslookup somehost.mulquin.net 192.168.0.5 from the yellow subnet it works.

2
  • That is quite possible with duplicate entries, synchronizing DNS servers, delegating (sub) domains or similar. However, protocols above the transport layer, consumer-grade hardware and host configurations are all explicitly off topic here, sorry.
    – Zac67
    Commented Oct 22, 2022 at 6:52
  • No worries at all, I'll post on Server Fault or somewhere more appropriate. Commented Oct 22, 2022 at 6:58

1 Answer 1

1

AFAIK this is possible yes. Depending on what app you're using to run DNS at each end it might be more automatable in terms of syncing the zones between the pi's, but all you should need to do is ensure the zones are configured identically on each Pi-hole and that each device has a unique FQDN in DNS.

You'll want to make sure that green zone hosts get DHCP from green zone, and this DHCP issues the IP of the green pi-hole as DNS server. And similarly for yellow zone hosts you want to make sure they're using yellow pi-hole. Nothing to do with functionality, but just for optimizing traffic and performance since there's no reason to send these things over the VPN if you have a device doing it locally.

You also won't be able to have any duplicate names, as each host will need a unique FQDN for DNS resolution; so for example if Pi-hole.mulquin.net is configured in the zone as 192.168.0.5 -- you can't have another Pi-hole.mulquin.net configured as 192.168.1.240.

If you can help it I'd also recommend to make each site a mirror of the other one as much as you can, just because it will make it easier for you to manage in the long run as the networks grow.

So you could match the hostname/ip setup: |DNS Name|IP| |:----|:----| |green-router.mulquin.net | 192.168.0.1 | |green-pi.mulquin.net | 192.168.0.5 | |yellow-router.mulquin.net | 192.168.1.1 | |yellow-pi.mulquin.net | 192.168.1.5 | |...|...|

Match the services each device is doing Router --> Routing (Internet access, VPN access) Pi --> DHCP, DNS some_other_device --> services etc.

If I've overthought this and you knew all that already and just explicitly wanted to know how to configure DNS query forwarding between the zones, then it depends on what you're using to run the DNS service. If you're using BIND then you should be able to set up master/slave DNS servers and that'll take care of that problem. NSD can probably do it too. DNSmasq I don't believe can do it, for that route you might have to do something more creative like configure a subdomain for one site. ex. green.mulquin.net or yellow.mulquin.net as opposed to just mulquin.net

Not the answer you're looking for? Browse other questions tagged or ask your own question.