View previous topic :: View next topic |
Author |
Message |
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2132
|
Posted: Mon Oct 07, 2024 7:16 pm Post subject: Where is domainname set for an internal network? |
|
|
Some time ago I decided it would be nice to have a name for my local network - i.e. the WAN attached to my ASDL router, rather than the whole internet outside. I chose the domain name ".home.network", but I now read that among several suitable special names defined in a couple of RFCs are ".home.arpa." and ".internal".
(IIUC ".home.arpa." and ".home.arpa" are virtually the same thing, except the former explicitly states that it's the top level domain name.)
I have a local DNS resolver - dnsmasq - running on a Raspberry Pi, which forwards new dns queries to 9.9.9.9
The question is, where did I specify it in my Gentoo netifrc setup? I thought there was a file /etc/domainname, but that seems not to be the case. Nor is it in my /etc/config.d/net.
I guess I need to update the dnsmasq configuration, and presumably /etc/host, and any applications with qualified names (mostly mailto addresses in things like /etc/smartd.conf). But have I missed something? It seems too simple just to be in /etc/hosts. I presume the /etc/hostname is just the lowest level unqualified name.
There's also CONFIG_DEFAULT_HOSTNAME in the kernel, but I expect that's irrelevant for most uses. _________________ Greybeard |
|
Back to top |
|
|
bstaletic Guru
Joined: 05 Apr 2014 Posts: 333
|
|
Back to top |
|
|
Banana Moderator
Joined: 21 May 2004 Posts: 1669 Location: Germany
|
Posted: Mon Oct 07, 2024 9:07 pm Post subject: |
|
|
https://linux.die.net/man/1/hostname
Quote: | Display the FQDN (Fully Qualified Domain Name). A FQDN consists of a short host name and the DNS domain name. Unless you are using bind or NIS for host lookups you can change the FQDN and the DNS domain name (which is part of the FQDN) in the /etc/hosts file. See the warnings in section THE FQDN above, and avoid using this option; use hostname --all-fqdns instead. |
So yes, it should go into /etc/hosts _________________ Forum Guidelines
PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6145 Location: Dallas area
|
Posted: Mon Oct 07, 2024 9:17 pm Post subject: |
|
|
use hosts if you are setting a single or a few hosts.
try /etc/networks
Code: |
$ cat /etc/networks
# /etc/networks
#
# This file describes a number of netname-to-adress
# mappings for the TCP/IP subsytem. It is mostly
# used at boot time, when no name servers are running.
#
loopback 127.0.0.0
link-local 169.254.0.0
home 192.168.1.0 |
_________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|