Creating internal DNS

I would Like to Create and deploy a self sustaining Nethbox, which has no access to any other network, apart from itself, of probably a router it would be conected to for SSH and other kind of Access on the network.

I would like to have subdomains implemented, with something like nextcloud.servename.local or any other variant, without any external kind of DNS.

How can i achieve this.

Hi @oneitonitram,
I think you have to install webserver for vhosts, make the dns entries at the server and give your clients this server as first dns. Only problem is, if the client should have a connection to the internet it takes it’s time because the client first asks the server to solve the address.
With an outgoing internet connection it would be much faster, so the server can ask an external dns if it has no result.

The nethserver can act as a dhcp server and set the dns of clients (nethserver itself) by dhcp, like this your clients will know the domain name not resolvable on internet. I assume the whole local network will not have access to internet, clients and server included

the essence of this project, is to create a self supporting box, which would and should function whether there is internet or Not. But mostly standalone.

Someone should be able to power on the Nethbox in question, connect to it direct via a switch, or plug it into an existing router or network, and access the Ip address predefined, or rather the softwares installed, if its Nextcloud, dokuwiki etc.

So like @stephdl recommended use the dhcp of the box. The box is your DNS Server too. Make entries for all your local sites at the box.
The problem I see is, if you will connect it to a router. Most router have their own DHCP and two dhcp at one network is not a good idea. For a router you have to reconfigure it.

but even if its conencted to a router, then maybe we can force ip address on this box, anyway, but whats more feasible is as ou said, make use of the DHCP inside nethserver.

On the DNS entries, how to achieve this within nethserver, for a pre-defined domain name?

Create a gateway too a ns with two nic, one red where a router is connected and and green where you act as a dhcp server and you connect a switch

Sorry, I think my statement was not correct. The following could work

  • Give the box a FQDN MyBox.MyDomain.local for example
  • Install Webserver
  • Create VHosts with the subdomain
  • activate DHCP and set this box as DNS-Server

I think with this settings every client is looking at the DNS, the DNS knows the domain, because it’s the own one and subdomains are known too, because you created them as vhost.