I was in the same situation and found a workaround...
# netmaker
g
I was in the same situation and found a workaround for that. Assuming you are using the Docker install version of Netmaker, you can adjust the volume declaration for
dnsconfig
by mounting it into your host file system. I used the following config for that:
Copy code
volumes:
  traefik_certs: {}
  shared_certs: {}
  sqldata: {}
  dnsconfig:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: '/root/dnsconfig'
  mosquitto_data: {}
  mosquitto_logs: {}
Then rebuild the server by running
docker-compose up -d
After that, you should be able to find a generated CoreDNS
Corefile
under
/root/dnsconfig
You can add your custom domains there two ways: 1. Rewrite the domain to local network host name version using the
rewrite name
directive. For example
rewrite name subdomain.domain.com subdomain.intranet
2. Or resolve the domain name to an IP address that can be reached through the VPN connection by extending the
hosts /root/dnsconfig/netmaker.hosts
block as follows:
Copy code
hosts /root/dnsconfig/netmaker.hosts {
    10.123.45.67 dubdomain.domain.com
    fallthrough
}
This works for external clients. Nodes connected via netclient won't be able to have access right out of the box though. In that case you need to modify the Docker compose config so the DNS service port 53 of CoreDNS is exposed to the host, and then you can set your Netmaker server's IP address as DNS server on your nodes CORRECTION: the DNS server should be accessible via internal VPN network IP address without changes. I had to expose the port to the host, because my setup is different. I use Netmaker in a simple setup with just one ingress node, and an egress giving access to a VPC. The servers in the VPC network also need access to the CoreDNS server for those custom DNS entries
r
Thanks @gray-solstice-45481, I will try to setup this way but nice feature could be that when network is created there is an option to assign domain/domains and in scope of those teams later add DNS entries.
v
Damn. I'm actually in the exact same boat - I'm gonna give this a try! HTTPS on a domain I own but not wanting to expose local ips or names
g
I agree, I would also prefer a management feature for those additional DNS entries right in the dashboard. I'm also uncertain whether the Corefile ever gets overwritten and regenerated, specifically with Netmaker version upgrades
@User Can you confirm that the Corefile configuration of CoreDNS ever gets overwritten by Netmaker? Maybe due to an upgrade?