top | item 33166864

(no title)

protonfish | 3 years ago

How do you give your intranet site an internal domain? Or do you make the family use the IP address?

discuss

order

oneplane|3 years ago

You probably already have this. Nearly every ISP has been delivering home gateways with DHCP and DNS built in, and DHCP-registration into the local DNS cache. So <your-computer>.lan or <your-computer>.home are likely candidates. Check your settings to find out.

Besides DNS-based naming there is Multicast DNS (Bonjour/Avahi/ZeroConf) and NetBIOS naming (which still exist and works on most operating systems that have Samba or something similar).

In any case, you don't need a remote service like Cloud9 or Tailscale to any of this. Normal networking has done this for decades.

The next step beyond this is running a more capable DNS system in your home network. Generally this takes the shape of a DNS forwarder service running on a router or server. It could be as simple as a PiHole or OpnSense firewall, or however complicated you might want to make it.

aendruk|3 years ago

See also .home.arpa which is designated for this purpose.

WorldMaker|3 years ago

Not the OP, but for a small local network it is easy enough to sneakernet hosts files around. (On a USB drive if not a properly classic floppy.)

Also, somepcname.local mDNS works on most operating systems today (once you grant firewall permissions to it; for instance, on Windows setting your home network as a "Private" network for instance when it asks Public or Private).

zh3|3 years ago

We have a lot of computers, so DNS is easier than hosts files (also easier for dynamic updates,e.g. random Pi's given a hostname will update DNS via DHCP so no need to find the IP address and update other hosts).

zh3|3 years ago

It runs DNS and DHCP as well (so we have a domain that's the same as the house name); the DNS is primarily caching so for most sites it's just stock internet (except a bit faster due to the caching). It's also authoritative for a small number of domains that serves ads/do tracking (it's amazing how much better that makes the internet, even the kids comment on how fast it is compared to their friends - and we're out in the sticks on a relatively slow connection).

aljarry|3 years ago

This might be an overkill, but you can host internal domain using public DNS.

I've got a domain, and I've added multiple A records pointing to IPs of servers in my 192.168.X.Y NAT. This has a downside thought, that with short enough TTL, you may not be able to access your server during intermittent connectivity problems.

I'm using letsencrypt through traefik for the certs.

whateveracct|3 years ago

I personally use avahi (mDNS) as many other replies have suggested.

I use NixOS, so it was easy to make a function to abstract over the config. In each computer's config, all I do is specify a hostname. This function does the work (or really, some nixpkgs committer did):

    { hostName }:

    {
      services.avahi = {
        enable = true;
        nssmdns = true; # Allows programs like ssh to resolve .local domains via avahi
        inherit hostName;
        openFirewall = true;
        publish = {
          enable = true;
          addresses = true;
          workstation = true;
        };
      };
    }

numpad0|3 years ago

Configure following items on your router:

- desired hostname and search domain(can be bogus though not recommended)

- DHCP server parameters with the router's IP as primary DNS

- DHCP static assignment for (each of)server(s)

- DNS static assignment such as "yourserver.bogusdomain.tld 192.168.10.10"

- (optionally) domain names, ddclient, certbot

"Proper" classical router/firewall OSs like Cisco IOS, Juniper JunOS, VyOS, RouterOS, OpenWrt, all easily do it like they do a cigarette, but good gamer routers and some NASs also can do it okay in many cases.

vorpalhex|3 years ago

Edit the internal dns server(s).

tomcam|3 years ago

I am asking this out of ignorance, not knowledge. Isn’t that why the Lord gave us a hosts file?

kroltan|3 years ago

Or run a local DNS in your router, so you don't have to set each client device up.

(How would you even add hosts to an iPhone or something?)

dylan604|3 years ago

you'd have to edit the hosts file on every single device you want to access that domain. personally, i wouldn't even know how to do that on any of my mobile devices.

timc3|3 years ago

Network router with DNS resolver, internal domain, all DHCP clients get registered with a name as a subdomain. mycomputer.networkname.lan - I use pfsense, but lots of others support this.

You could have your own top level domain as well.

jrnichols|3 years ago

if you're using pi-hole, you can actually do all of this within the admin panel itself. they added Local DNS a couple releases ago.

pclmulqdq|3 years ago

If you have a Pi hole, you are already running a dns server. Otherwise, it's not too hard to set one up.