2

I've got a domain name and hosting web content with a provider, so have for example server.example.com hosted in the cloud. The provider also manage my DNS.

Now I would like to run nextcloud on my home server (and expose it to the internet) and could be called cloud.example.com

From outside my home network I can connect to cloud.example.com as I've setup a DNS entry to point to my ADSL IP Address (Static)

The problem I'm having is on my home wifi I need to connect to cloud.example.com which is on my private network (192.168.1.2) and when I'm external to this cloud.example.com points to my public IP.

Is it possible to setup a bind9 server on my home network so I have a entry for cloud.example.com to point to 192.168.1.2, while all other entries (www.example.com and server.example.com) forward DNS requests to my hosting NS.

1

Since you are the owner of the domain, the easiest solution is to setup in BIND all the records of your domain and replace that one IP address, unless dynamic DNS is involved.

For larger organisations though, you usually, instead of hosting outside, host your own DNS servers, and either also setup two for external use, and one or more for internal use, or setup several using BIND views.

Another more complicated setup is setting up in a Linux router DNS interception with iptables and feeding the network DNS requests to dnsmask, adding that name/IP to /etc/hosts and telling dnsmask to drink from the hosts file first.

However, I advise having the BIND with a copy of your zone, much easier to setup and debug.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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