> On Nov 12, 2016, at 3:25 AM, Andy Smith <a...@strugglers.net> wrote:
> 
> The system thinks Glenn's domain name is "slsware.dmz". Glenn wants it
> to be "slsware.org" (I think).

Correct.

> Glenn has set the host name to be "srv".

Correct.

> I am 95% confident that the reason that Glenn's system thinks the
> FQDN is "www.slsware.dmz" is because the first instance of "srv" in
> the /etc/hosts is:
> 
>>> 192.168.2.203       www.slsware.dmz                 wsd srv

But that isn't the first; it's the fourth. A grep of the hosts file:

> root@srv:~# egrep srv /etc/hosts
> 127.0.0.1     srv.slsware.org
> 216.17.203.66 srv.slsware.org         sso
> # 192.168.2.203       srv.slsware.dmz                 srv
> 192.168.2.203 www.slsware.dmz                 wsd srv
> 192.168.2.203 mail.slsware.dmz                msd srv
> 192.168.2.203 ntp.slsware.dmz                 ntp srv
> 192.168.2.203 ns1.slsware.dmz ns1d            ns1 srv
> 216.17.134.203        srv.slsware.net                 ssn

The first mentions of srv are at the top, both with IPs that could have been 
used to grab the correct domain.

It never occurred to me that something might be looking at aliases; I thought 
the IP address was the important thing. And the srv...dmz entry is commented 
out because I thought it might somehow be used.

I'll remove all mentions of srv (and lots of others to make it shorter) and 
see. 

The hosts file is now:

> root@srv:~# cat /etc/hosts
> # /etc/hosts:  This file describes a number of hostname-to-address
> #
> # This is to be sent to all hosts that need a hosts file
> #     (don't really know how yet...)
> #  
> # Host Database
> # localhost is used to configure the loopback interface
> # sudo cp hosts /etc ; dist `pwd`/hosts /etc all hosts
> # The following lines are desirable for IPv6 capable hosts
> # when the system is booting.  Do not change this entry.
> #       
> ::1           ip6-localhost                   ip6-loopback
> fe00::0               ip6-localnet
> ff00::0       ip6-mcastprefix
> ff02::1       ip6-allnodes
> ff02::2       ip6-allrouters
> ff02::3       ip6-allhosts
> 
> 127.0.0.1     localhost localhost.localdomain lh lcl
> 
> # pass I slsware.org -- all routable IPs; no NAT
> 216.17.203.64 slsware.org
> 216.17.203.65 out.slsware.org         oso
> 216.17.203.66 srv.slsware.org         sso
> 216.17.203.67 gobook.slsware.org      gso gbo
> 216.17.203.68 unused0.slsware.org     u0so
> 216.17.203.69 unused1.slsware.org     u1so
> 216.17.203.70 printer.slsware.org     pso
> 216.17.203.71 broadcast.slsware.org   bso
> 
> # misc ne'r-do-wells
> 127.0.0.2       ad.doubleclick.net
> 127.0.0.2       mmv.admob.com

The *only* mention of srv is with the right domain and the right IP.

After a reboot:

> root@srv:~# hostname
> srv
> root@srv:~# hostname -f
> hostname: Name or service not known

And just in case it's the IP:

> root@srv:~# ifconfig
> eth0      Link encap:Ethernet  HWaddr 00:25:90:d5:16:34  
>          inet addr:216.17.203.66  Bcast:216.17.203.71  Mask:255.255.255.248
>          inet6 addr: fe80::225:90ff:fed5:1634/64 Scope:Link
>          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>          RX packets:459 errors:0 dropped:0 overruns:0 frame:0
>          TX packets:470 errors:0 dropped:0 overruns:0 carrier:0
>          collisions:0 txqueuelen:1000 
>          RX bytes:47597 (46.4 KiB)  TX bytes:49637 (48.4 KiB)
>          Interrupt:16 Memory:fbce0000-fbd00000 
> 
> eth1      Link encap:Ethernet  HWaddr 00:25:90:d5:16:35  
>          inet addr:192.168.3.66  Bcast:192.168.3.255  Mask:255.255.255.0
>          UP BROADCAST MULTICAST  MTU:1500  Metric:1
>          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>          collisions:0 txqueuelen:1000 
>          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
>          Interrupt:17 Memory:fbde0000-fbe00000 
> 
> lo        Link encap:Local Loopback  
>          inet addr:127.0.0.1  Mask:255.0.0.0
>          inet6 addr: ::1/128 Scope:Host
>          UP LOOPBACK RUNNING  MTU:65536  Metric:1
>          RX packets:68 errors:0 dropped:0 overruns:0 frame:0
>          TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
>          collisions:0 txqueuelen:0 
>          RX bytes:17189 (16.7 KiB)  TX bytes:17189 (16.7 KiB)

And:

> root@srv:~# cat /proc/sys/kernel/domainname 
> (none)

It doesn't give the www answer anymore; it must have been doing something (odd) 
with hosts. But now it claims it can't find anything.

> "hostname" returns what is in /etc/hostname (unless changed agfter
> system startup).
> 
> "hostname -f" returns the part up to the first dot from whatever is
> returned by resolving "hostname" against /etc/hosts.

The 2 dots after resolving hostname, maybe? That does sound very reasonable, 
but it doesn't seem to be working. And how does /proc get a domainname.

-- 
Glenn English
-- 
Glenn English
Did you just click Reply?
If so, change the send
address from gmail to
g...@slsware.net





Reply via email to