5 ms·
How do you give your intranet site an internal domain? Or do you make the family use the IP address?
by protonfish 4y ago
How do you give your intranet site an internal domain? Or do you make the family use the IP address?
- tomcam 4y agoI am asking this out of ignorance, not knowledge. Isn’t that why the Lord gave us a hosts file?
- dylan604 4y agoyou'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.
- tomcam 4y agoTIL. Thank you
- kroltan 4y agoOr 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?)
- tomcam 4y agoBut of course. Thanks.
- pclmulqdq 4y agoIf you have a Pi hole, you are already running a dns server. Otherwise, it's not too hard to set one up.
- leesalminen 4y agoYou can use mDNS [0] to publish an internal domain to others on the same LAN. Alternatively, you can use something like a Pi-Hole [1] to be the DNS server for your LAN. Pi-Hole gives you GUI way to point any domain to any IP [2]. [0] https://wlog.viltstigen.se/articles/2021/05/02/mdns-for-linux/ https://wlog.viltstigen.se/articles/2021/05/02/mdns-for-linu... [1] https://pi-hole.net https://pi-hole.net [2] https://docs.callitkarma.me/posts/PiHole-Local-DNS/ https://docs.callitkarma.me/posts/PiHole-Local-DNS/
- WorldMaker 4y agoNot 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 4y agoWe 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).
- vorpalhex 4y agoEdit the internal dns server(s).
- zh3 4y agoIt 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).
- ecliptik 4y agoTailscale MagicDNS [1] can also do this, which you can also setup with TLS certs using their Let's Encrypt integration [2]. 1. https://tailscale.com/kb/1054/dns/ https://tailscale.com/kb/1054/dns/ 2. https://tailscale.com/kb/1153/enabling-https/ https://tailscale.com/kb/1153/enabling-https/
- oneplane 4y agoYou 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 4y agoSee also .home.arpa which is designated for this purpose.
- timc3 4y agoNetwork 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.
- whateveracct 4y agoI 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; }; }; }
- aljarry 4y agoThis 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.
- numpad0 4y agoConfigure 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.
- jrnichols 4y agoif 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.