Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #269513 > unrolled thread

Address 127.0.1.1

Started byPaul M Foster <paulf@quillandmouse.com>
First post2024-05-24 14:10 +0200
Last post2024-05-24 19:50 +0200
Articles 20 on this page of 21 — 10 participants

Back to article view | Back to linux.debian.user


Contents

  Address 127.0.1.1 Paul M Foster <paulf@quillandmouse.com> - 2024-05-24 14:10 +0200
    Re: Address 127.0.1.1 Greg Wooledge <greg@wooledge.org> - 2024-05-24 14:20 +0200
    Re: Address 127.0.1.1 Dan Ritter <dsr@randomstring.org> - 2024-05-24 14:40 +0200
    Re: Address 127.0.1.1 Marco Moock <mm@dorfdsl.de> - 2024-05-24 16:50 +0200
      Re: Address 127.0.1.1 <tomas@tuxteam.de> - 2024-05-24 17:20 +0200
        Re: Address 127.0.1.1 <tomas@tuxteam.de> - 2024-05-24 17:30 +0200
        Re: Address 127.0.1.1 Marco Moock <mm@dorfdsl.de> - 2024-05-24 17:30 +0200
          Re: Address 127.0.1.1 Greg Wooledge <greg@wooledge.org> - 2024-05-24 17:50 +0200
            Re: Address 127.0.1.1 Paul M Foster <paulf@quillandmouse.com> - 2024-05-24 18:20 +0200
            Re: Address 127.0.1.1 Joe <joe@jretrading.com> - 2024-05-24 18:50 +0200
              Re: Address 127.0.1.1 Paul M Foster <paulf@quillandmouse.com> - 2024-05-24 19:20 +0200
                Re: Address 127.0.1.1 Andy Smith <andy@strugglers.net> - 2024-05-24 23:40 +0200
              Re: Address 127.0.1.1 Greg Wooledge <greg@wooledge.org> - 2024-05-24 19:40 +0200
        Re: Address 127.0.1.1 Joe <joe@jretrading.com> - 2024-05-24 18:50 +0200
          Re: Address 127.0.1.1 <tomas@tuxteam.de> - 2024-05-24 19:20 +0200
    Re: Address 127.0.1.1 Greg Wooledge <greg@wooledge.org> - 2024-05-24 19:50 +0200
      Re: Address 127.0.1.1 Jeffrey Walton <noloader@gmail.com> - 2024-05-24 20:00 +0200
        Re: Address 127.0.1.1 Greg Wooledge <greg@wooledge.org> - 2024-05-24 20:30 +0200
          Re: Address 127.0.1.1 debian-user@howorth.org.uk - 2024-05-24 23:30 +0200
    Re: Address 127.0.1.1 Jeffrey Walton <noloader@gmail.com> - 2024-05-24 19:50 +0200
      Re: Address 127.0.1.1 David Wright <deblis@lionunicorn.co.uk> - 2024-05-24 19:50 +0200

Page 1 of 2  [1] 2  Next page →


#269513 — Address 127.0.1.1

FromPaul M Foster <paulf@quillandmouse.com>
Date2024-05-24 14:10 +0200
SubjectAddress 127.0.1.1
Message-ID<IHBUd-fuUh-3@gated-at.bofh.it>
Folks:

In my /etc/hosts file, there's a line:

127.0.1.1 yosemite.mars.lan yosemite

I think Debian put it there.

Later in the file, I've got:

192.168.254.30  yosemite.mars.lan   yosemite

So there are two entries for the same (my) machine. Is this a problem?
Specifically, could it cause problems with email (Exim4 or OpenSMTPD)?

Paul

-- 
Paul M. Foster
Personal Blog: http://noferblatz.com
Company Site: http://quillandmouse.com
Software Projects: https://gitlab.com/paulmfoster

[toc] | [next] | [standalone]


#269515

FromGreg Wooledge <greg@wooledge.org>
Date2024-05-24 14:20 +0200
Message-ID<IHC3T-fuXE-1@gated-at.bofh.it>
In reply to#269513
On Fri, May 24, 2024 at 08:05:43AM -0400, Paul M Foster wrote:
> Folks:
> 
> In my /etc/hosts file, there's a line:
> 
> 127.0.1.1 yosemite.mars.lan yosemite
> 
> I think Debian put it there.

Correct.  This is the address that will be used if you don't have a
static LAN address.

> Later in the file, I've got:
> 
> 192.168.254.30  yosemite.mars.lan   yosemite

Since you *do* have a static LAN address, you can use this one instead.
(Assuming this address actually *does* get assigned to an interface.)
The 127.0.1.1 address isn't needed in this case.

[toc] | [prev] | [next] | [standalone]


#269518

FromDan Ritter <dsr@randomstring.org>
Date2024-05-24 14:40 +0200
Message-ID<IHCnf-fv3V-1@gated-at.bofh.it>
In reply to#269513
Paul M Foster wrote: 
> Folks:
> 
> In my /etc/hosts file, there's a line:
> 
> 127.0.1.1 yosemite.mars.lan yosemite
> 
> I think Debian put it there.
> 
> Later in the file, I've got:
> 
> 192.168.254.30  yosemite.mars.lan   yosemite
> 
> So there are two entries for the same (my) machine. Is this a problem?
> Specifically, could it cause problems with email (Exim4 or OpenSMTPD)?

Technically possible, but unlikely. If you had exim or opensmtpd
configured to only bind to the 192.168 address, and not the
localhost address, then you might manage to run into an issue.

As long as the 192.168 address is correct, you can replace
127.0.1.1 to refer to 'localhost' alone.

-dsr-

[toc] | [prev] | [next] | [standalone]


#269519

FromMarco Moock <mm@dorfdsl.de>
Date2024-05-24 16:50 +0200
Message-ID<IHEp3-fwe2-9@gated-at.bofh.it>
In reply to#269513
Am 24.05.2024 um 08:05:43 Uhr schrieb Paul M Foster:

> In my /etc/hosts file, there's a line:
> 
> 127.0.1.1 yosemite.mars.lan yosemite
> 
> I think Debian put it there.

Should be there so the hostname is resolvable - even when not in DNS.

> Later in the file, I've got:
> 
> 192.168.254.30  yosemite.mars.lan   yosemite

Check which program put that in here. I don't see a reason to have that
here.

> So there are two entries for the same (my) machine. Is this a problem?
> Specifically, could it cause problems with email (Exim4 or OpenSMTPD)?

If you operate mail servers, you must have a FQDN. .lan can't be used
for the global DNS stuff, so set a proper FQDN that belongs to you.


-- 
Gruß
Marco

Send unsolicited bulk mail to 1716530743muell@cartoonies.org

[toc] | [prev] | [next] | [standalone]


#269520

From<tomas@tuxteam.de>
Date2024-05-24 17:20 +0200
Message-ID<IHES5-fwCW-3@gated-at.bofh.it>
In reply to#269519

[Multipart message — attachments visible in raw view] — view raw

On Fri, May 24, 2024 at 04:49:18PM +0200, Marco Moock wrote:

[...]

> If you operate mail servers, you must have a FQDN. .lan can't be used
> for the global DNS stuff, so set a proper FQDN that belongs to you.

I think this is wrong in that sweeping generality.

Cheers
-- 
t

[toc] | [prev] | [next] | [standalone]


#269521

From<tomas@tuxteam.de>
Date2024-05-24 17:30 +0200
Message-ID<IHF1L-fwGk-1@gated-at.bofh.it>
In reply to#269520

[Multipart message — attachments visible in raw view] — view raw

On Fri, May 24, 2024 at 05:22:14PM +0200, Marco Moock wrote:
> Am 24.05.2024 um 17:17:45 Uhr schrieb tomas@tuxteam.de:
> 
> > On Fri, May 24, 2024 at 04:49:18PM +0200, Marco Moock wrote:
> > 
> > [...]
> > 
> > > If you operate mail servers, you must have a FQDN. .lan can't be
> > > used for the global DNS stuff, so set a proper FQDN that belongs to
> > > you.  
> > 
> > I think this is wrong in that sweeping generality.
> 
> In the case it should communicate with other MTAs in the internet, this
> will be true because many of them require a resolvable (also reverse)
> FQDN in HELO/EHLO that matches the IPv4/IPv6 addresses of the server.

Definitely.

But then it'd another interface which isn't 127.0.0.1 or the 192.168.x.y

Cheers
-- 
t

[toc] | [prev] | [next] | [standalone]


#269522

FromMarco Moock <mm@dorfdsl.de>
Date2024-05-24 17:30 +0200
Message-ID<IHF1L-fwGk-3@gated-at.bofh.it>
In reply to#269520
Am 24.05.2024 um 17:17:45 Uhr schrieb tomas@tuxteam.de:

> On Fri, May 24, 2024 at 04:49:18PM +0200, Marco Moock wrote:
> 
> [...]
> 
> > If you operate mail servers, you must have a FQDN. .lan can't be
> > used for the global DNS stuff, so set a proper FQDN that belongs to
> > you.  
> 
> I think this is wrong in that sweeping generality.

In the case it should communicate with other MTAs in the internet, this
will be true because many of them require a resolvable (also reverse)
FQDN in HELO/EHLO that matches the IPv4/IPv6 addresses of the server.


-- 
Gruß
Marco

Send unsolicited bulk mail to 1716563865muell@cartoonies.org

[toc] | [prev] | [next] | [standalone]


#269523

FromGreg Wooledge <greg@wooledge.org>
Date2024-05-24 17:50 +0200
Message-ID<IHFl7-fwN0-3@gated-at.bofh.it>
In reply to#269522
On Fri, May 24, 2024 at 05:22:14PM +0200, Marco Moock wrote:
> Am 24.05.2024 um 17:17:45 Uhr schrieb tomas@tuxteam.de:
> 
> > On Fri, May 24, 2024 at 04:49:18PM +0200, Marco Moock wrote:
> > 
> > [...]
> > 
> > > If you operate mail servers, you must have a FQDN. .lan can't be
> > > used for the global DNS stuff, so set a proper FQDN that belongs to
> > > you.  
> > 
> > I think this is wrong in that sweeping generality.
> 
> In the case it should communicate with other MTAs in the internet, this
> will be true because many of them require a resolvable (also reverse)
> FQDN in HELO/EHLO that matches the IPv4/IPv6 addresses of the server.

Most MTAs do not look in /etc/hosts when reading their configuration.
Whatever name they identify with (in the HELO or EHLO command) comes
from some MTA-specific configuration file.

Thus, the contents of /etc/hosts are for *other* things, not related to
MTA configuration.  Just being able to resolve your own hostname to any
address that "works" is the goal.  127.0.1.1 works well for this, which
is why Debian uses it as the default.  If you've got a static LAN address,
you can use that instead.

[toc] | [prev] | [next] | [standalone]


#269526

FromPaul M Foster <paulf@quillandmouse.com>
Date2024-05-24 18:20 +0200
Message-ID<IHFO9-fxbD-1@gated-at.bofh.it>
In reply to#269523
On Fri, May 24, 2024 at 11:40:30AM -0400, Greg Wooledge wrote:

> On Fri, May 24, 2024 at 05:22:14PM +0200, Marco Moock wrote:
> > Am 24.05.2024 um 17:17:45 Uhr schrieb tomas@tuxteam.de:
> > 
> > > On Fri, May 24, 2024 at 04:49:18PM +0200, Marco Moock wrote:
> > > 
> > > [...]
> > > 
> > > > If you operate mail servers, you must have a FQDN. .lan can't be
> > > > used for the global DNS stuff, so set a proper FQDN that belongs to
> > > > you.  
> > > 
> > > I think this is wrong in that sweeping generality.
> > 
> > In the case it should communicate with other MTAs in the internet, this
> > will be true because many of them require a resolvable (also reverse)
> > FQDN in HELO/EHLO that matches the IPv4/IPv6 addresses of the server.
> 
> Most MTAs do not look in /etc/hosts when reading their configuration.
> Whatever name they identify with (in the HELO or EHLO command) comes
> from some MTA-specific configuration file.
> 
> Thus, the contents of /etc/hosts are for *other* things, not related to
> MTA configuration.  Just being able to resolve your own hostname to any
> address that "works" is the goal.  127.0.1.1 works well for this, which
> is why Debian uses it as the default.  If you've got a static LAN address,
> you can use that instead.

I should note that this is apparently not true for OpenSMTPD. In fact,
there is or was a bug in it, such that if you had two instances of
127.0.0.1 in your hosts file, OpenSMTPD would fail with a message that it
couldn't listen on address 127.0.0.1 because it was already in use (or
somesuch).

Paul

-- 
Paul M. Foster
Personal Blog: http://noferblatz.com
Company Site: http://quillandmouse.com
Software Projects: https://gitlab.com/paulmfoster

[toc] | [prev] | [next] | [standalone]


#269529

FromJoe <joe@jretrading.com>
Date2024-05-24 18:50 +0200
Message-ID<IHGhb-fxli-9@gated-at.bofh.it>
In reply to#269523
On Fri, 24 May 2024 11:40:30 -0400
Greg Wooledge <greg@wooledge.org> wrote:

> On Fri, May 24, 2024 at 05:22:14PM +0200, Marco Moock wrote:
> > Am 24.05.2024 um 17:17:45 Uhr schrieb tomas@tuxteam.de:
> >   
> > > On Fri, May 24, 2024 at 04:49:18PM +0200, Marco Moock wrote:
> > > 
> > > [...]
> > >   
> > > > If you operate mail servers, you must have a FQDN. .lan can't be
> > > > used for the global DNS stuff, so set a proper FQDN that
> > > > belongs to you.    
> > > 
> > > I think this is wrong in that sweeping generality.  
> > 
> > In the case it should communicate with other MTAs in the internet,
> > this will be true because many of them require a resolvable (also
> > reverse) FQDN in HELO/EHLO that matches the IPv4/IPv6 addresses of
> > the server.  
> 
> Most MTAs do not look in /etc/hosts when reading their configuration.
> Whatever name they identify with (in the HELO or EHLO command) comes
> from some MTA-specific configuration file.
> 
> Thus, the contents of /etc/hosts are for *other* things, not related
> to MTA configuration.  Just being able to resolve your own hostname
> to any address that "works" is the goal.  127.0.1.1 works well for
> this, which is why Debian uses it as the default.  If you've got a
> static LAN address, you can use that instead.
> 

Long ago, lo used to be just 127.0.0.1, which is what most people would
try to ping to check localhost, and what appeared in /etc/hosts. There
is some subtle reason, which I used to know but have now long forgotten,
why Debian started using 127.0.1.1 in /etc/hosts instead. As far as I'm
aware, any 127. address will resolve to localhost.

-- 
Joe

[toc] | [prev] | [next] | [standalone]


#269531

FromPaul M Foster <paulf@quillandmouse.com>
Date2024-05-24 19:20 +0200
Message-ID<IHGKd-fxKn-1@gated-at.bofh.it>
In reply to#269529
On Fri, May 24, 2024 at 05:22:13PM +0100, Joe wrote:

> On Fri, 24 May 2024 11:40:30 -0400
> Greg Wooledge <greg@wooledge.org> wrote:
> 
> > On Fri, May 24, 2024 at 05:22:14PM +0200, Marco Moock wrote:
> > > Am 24.05.2024 um 17:17:45 Uhr schrieb tomas@tuxteam.de:
> > >   
> > > > On Fri, May 24, 2024 at 04:49:18PM +0200, Marco Moock wrote:
> > > > 
> > > > [...]
> > > >   
> > > > > If you operate mail servers, you must have a FQDN. .lan can't be
> > > > > used for the global DNS stuff, so set a proper FQDN that
> > > > > belongs to you.    
> > > > 
> > > > I think this is wrong in that sweeping generality.  
> > > 
> > > In the case it should communicate with other MTAs in the internet,
> > > this will be true because many of them require a resolvable (also
> > > reverse) FQDN in HELO/EHLO that matches the IPv4/IPv6 addresses of
> > > the server.  
> > 
> > Most MTAs do not look in /etc/hosts when reading their configuration.
> > Whatever name they identify with (in the HELO or EHLO command) comes
> > from some MTA-specific configuration file.
> > 
> > Thus, the contents of /etc/hosts are for *other* things, not related
> > to MTA configuration.  Just being able to resolve your own hostname
> > to any address that "works" is the goal.  127.0.1.1 works well for
> > this, which is why Debian uses it as the default.  If you've got a
> > static LAN address, you can use that instead.
> > 
> 
> Long ago, lo used to be just 127.0.0.1, which is what most people would
> try to ping to check localhost, and what appeared in /etc/hosts. There
> is some subtle reason, which I used to know but have now long forgotten,
> why Debian started using 127.0.1.1 in /etc/hosts instead. As far as I'm
> aware, any 127. address will resolve to localhost.
> 

My understanding is that 127.0.1.1 is used for hostnames defined by the
user on setup. In setup, you don't specify an IP for your box, so the
hostname goes in the 127.0.1.1. Later, the user can edit the hosts file to
specify a fixed IP if he has one.

Paul

-- 
Paul M. Foster
Personal Blog: http://noferblatz.com
Company Site: http://quillandmouse.com
Software Projects: https://gitlab.com/paulmfoster

[toc] | [prev] | [next] | [standalone]


#269546

FromAndy Smith <andy@strugglers.net>
Date2024-05-24 23:40 +0200
Message-ID<IHKNP-fAbH-1@gated-at.bofh.it>
In reply to#269531
Hi,

On Fri, May 24, 2024 at 11:55:54AM -0700, Chip Smith wrote:
> convention  as it pertains to the 127.0.0.1 iIP address is that it
> is meant to be used for testing purposes on a whole.

I am quite sure that plenty of production traffic goes over
localhost network connections on millions of servers worldwide.
Think: reverse proxies (e.g. nginx) and backend app servers.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

[toc] | [prev] | [next] | [standalone]


#269536

FromGreg Wooledge <greg@wooledge.org>
Date2024-05-24 19:40 +0200
Message-ID<IHH3A-fxQB-13@gated-at.bofh.it>
In reply to#269529
On Fri, May 24, 2024 at 05:22:13PM +0100, Joe wrote:
> Long ago, lo used to be just 127.0.0.1, which is what most people would
> try to ping to check localhost, and what appeared in /etc/hosts. There
> is some subtle reason, which I used to know but have now long forgotten,
> why Debian started using 127.0.1.1 in /etc/hosts instead.

It's not "instead".  It's "in addition".

hobbit:~$ head -n2 /etc/hosts
127.0.0.1   localhost
127.0.1.1   hobbit.wooledge.org hobbit

The first line is traditional.  Exactly what it looks like.

The second line ensures that my hostname will always resolve to a
working IP address.  Lots of programs need that.  Some of the most
common reasons back in the old days were X clients that had been
told to use "myhostname:0" as their $DISPLAY.  If "myhostname" didn't
resolve to a working IP address (one which could contact the X server),
then X client programs wouldn't work.

A lot has changed since then, but the basic principle remains the same.
Some programs are going to expect to be able to open a network connection
to whatever IP address the system's hostname resolves to.  127.0.1.1
serves that purpose, without stepping on 127.0.0.1 which has its own
legacy role to fulfill.

[toc] | [prev] | [next] | [standalone]


#269527

FromJoe <joe@jretrading.com>
Date2024-05-24 18:50 +0200
Message-ID<IHGhb-fxli-5@gated-at.bofh.it>
In reply to#269520
On Fri, 24 May 2024 17:17:45 +0200
<tomas@tuxteam.de> wrote:

> On Fri, May 24, 2024 at 04:49:18PM +0200, Marco Moock wrote:
> 
> [...]
> 
> > If you operate mail servers, you must have a FQDN. .lan can't be
> > used for the global DNS stuff, so set a proper FQDN that belongs to
> > you.  
> 
> I think this is wrong in that sweeping generality.
> 

I believe the dynamic DNS services will supply an FQDN if you don't
have one, it just won't be personal, it will be one of theirs. But
trying to run a mail server on a dynamic address leads to all kinds of
blacklist problems.

-- 
Joe

[toc] | [prev] | [next] | [standalone]


#269532

From<tomas@tuxteam.de>
Date2024-05-24 19:20 +0200
Message-ID<IHGKe-fxKn-3@gated-at.bofh.it>
In reply to#269527

[Multipart message — attachments visible in raw view] — view raw

On Fri, May 24, 2024 at 05:23:55PM +0100, Joe wrote:
> On Fri, 24 May 2024 17:17:45 +0200
> <tomas@tuxteam.de> wrote:
> 
> > On Fri, May 24, 2024 at 04:49:18PM +0200, Marco Moock wrote:
> > 
> > [...]
> > 
> > > If you operate mail servers, you must have a FQDN. .lan can't be
> > > used for the global DNS stuff, so set a proper FQDN that belongs to
> > > you.  
> > 
> > I think this is wrong in that sweeping generality.
> > 
> 
> I believe the dynamic DNS services will supply an FQDN if you don't
> have one, it just won't be personal, it will be one of theirs. But
> trying to run a mail server on a dynamic address leads to all kinds of
> blacklist problems.

As far as I know we are talking of local networks all the time. No
dynamic IP addresses, no routable IP addresses -- most probably no
DNS at all.

Of course, if you go "out there" things change drastically. More so
if your MTA is supposed to accept mail from "out there" then it needs
an MX record, yadda, yadda.

But if I understood OP correctly, we are far from this scenario.

Cheers
-- 
t

[toc] | [prev] | [next] | [standalone]


#269538

FromGreg Wooledge <greg@wooledge.org>
Date2024-05-24 19:50 +0200
Message-ID<IHHdf-fxU2-3@gated-at.bofh.it>
In reply to#269513
On Fri, May 24, 2024 at 01:40:38PM -0400, Jeffrey Walton wrote:
> On Fri, May 24, 2024 at 11:13 AM Paul M Foster <paulf@quillandmouse.com> wrote:
> > 192.168.254.30  yosemite.mars.lan   yosemite

> 127.0.1.1 is traditionally used for the fully qualified domain name
> (fqdn). So I would expect to see 'yosemite.mars.lan', but not
> 'yosemite'.

I don't know why you would expect that.  What purpose would that serve?

The goal here is for programs to be able to look up "the IP address"
that belongs to $HOSTNAME.

If the hostname is "yosemite", then "yosemite" must appear in the
/etc/hosts file as an alias for whatever made-up FQDN is being used.

This is what Paul has.  What Paul has looks quite reasonable to me.
If 192.168.254.30 is in fact bound to an ethernet interface by a
static configuration (e.g. /etc/network/interfaces) then I would also
say it looks correct.

> Also, fqdn's end in dot '.' to denote the top of the dns tree.

Not in the /etc/hosts file, they don't.  You may be thinking of BIND
configuration files.

I've never IN MY LIFE seen trailing dots on hostnames in /etc/hosts.

[toc] | [prev] | [next] | [standalone]


#269541

FromJeffrey Walton <noloader@gmail.com>
Date2024-05-24 20:00 +0200
Message-ID<IHHmV-fxXy-1@gated-at.bofh.it>
In reply to#269538
On Fri, May 24, 2024 at 1:46 PM Greg Wooledge <greg@wooledge.org> wrote:
>
> On Fri, May 24, 2024 at 01:40:38PM -0400, Jeffrey Walton wrote:
> > On Fri, May 24, 2024 at 11:13 AM Paul M Foster <paulf@quillandmouse.com> wrote:
> > > 192.168.254.30  yosemite.mars.lan   yosemite
>
> > 127.0.1.1 is traditionally used for the fully qualified domain name
> > (fqdn). So I would expect to see 'yosemite.mars.lan', but not
> > 'yosemite'.
>
> I don't know why you would expect that.  What purpose would that serve?

Sorry I was not clear. I would expect that because 127.0.1.1 is
traditionally used for a fully qualified domain name, not a hostname.

> The goal here is for programs to be able to look up "the IP address"
> that belongs to $HOSTNAME.
>
> If the hostname is "yosemite", then "yosemite" must appear in the
> /etc/hosts file as an alias for whatever made-up FQDN is being used.
>
> This is what Paul has.  What Paul has looks quite reasonable to me.
> If 192.168.254.30 is in fact bound to an ethernet interface by a
> static configuration (e.g. /etc/network/interfaces) then I would also
> say it looks correct.
>
> > Also, fqdn's end in dot '.' to denote the top of the dns tree.
>
> Not in the /etc/hosts file, they don't.  You may be thinking of BIND
> configuration files.
>
> I've never IN MY LIFE seen trailing dots on hostnames in /etc/hosts.

Jeff

[toc] | [prev] | [next] | [standalone]


#269543

FromGreg Wooledge <greg@wooledge.org>
Date2024-05-24 20:30 +0200
Message-ID<IHHPX-fymp-1@gated-at.bofh.it>
In reply to#269541
On Fri, May 24, 2024 at 01:49:58PM -0400, Jeffrey Walton wrote:
> On Fri, May 24, 2024 at 1:46 PM Greg Wooledge <greg@wooledge.org> wrote:
> >
> > On Fri, May 24, 2024 at 01:40:38PM -0400, Jeffrey Walton wrote:
> > > On Fri, May 24, 2024 at 11:13 AM Paul M Foster <paulf@quillandmouse.com> wrote:
> > > > 192.168.254.30  yosemite.mars.lan   yosemite
> >
> > > 127.0.1.1 is traditionally used for the fully qualified domain name
> > > (fqdn). So I would expect to see 'yosemite.mars.lan', but not
> > > 'yosemite'.
> >
> > I don't know why you would expect that.  What purpose would that serve?
> 
> Sorry I was not clear. I would expect that because 127.0.1.1 is
> traditionally used for a fully qualified domain name, not a hostname.

What traditions are you referring to?

Here's Debian's documentation for this whole thing:

https://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_hostname_resolution

[toc] | [prev] | [next] | [standalone]


#269545

Fromdebian-user@howorth.org.uk
Date2024-05-24 23:30 +0200
Message-ID<IHKE9-fA8E-1@gated-at.bofh.it>
In reply to#269543
Greg Wooledge <greg@wooledge.org> wrote:
> On Fri, May 24, 2024 at 01:49:58PM -0400, Jeffrey Walton wrote:
> > On Fri, May 24, 2024 at 1:46 PM Greg Wooledge <greg@wooledge.org>
> > wrote:  
> > >
> > > On Fri, May 24, 2024 at 01:40:38PM -0400, Jeffrey Walton wrote:  
> > > > On Fri, May 24, 2024 at 11:13 AM Paul M Foster
> > > > <paulf@quillandmouse.com> wrote:  
> > > > > 192.168.254.30  yosemite.mars.lan   yosemite  
> > >  
> > > > 127.0.1.1 is traditionally used for the fully qualified domain
> > > > name (fqdn). So I would expect to see 'yosemite.mars.lan', but
> > > > not 'yosemite'.  
> > >
> > > I don't know why you would expect that.  What purpose would that
> > > serve?  
> > 
> > Sorry I was not clear. I would expect that because 127.0.1.1 is
> > traditionally used for a fully qualified domain name, not a
> > hostname.  
> 
> What traditions are you referring to?
> 
> Here's Debian's documentation for this whole thing:
> 
> https://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_hostname_resolution

It's a Debian invention, I believe: 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=316099

[toc] | [prev] | [next] | [standalone]


#269539

FromJeffrey Walton <noloader@gmail.com>
Date2024-05-24 19:50 +0200
Message-ID<IHHdf-fxU2-5@gated-at.bofh.it>
In reply to#269513
On Fri, May 24, 2024 at 11:13 AM Paul M Foster <paulf@quillandmouse.com> wrote:
>
> Folks:
>
> In my /etc/hosts file, there's a line:
>
> 127.0.1.1 yosemite.mars.lan yosemite
>
> I think Debian put it there.
>
> Later in the file, I've got:
>
> 192.168.254.30  yosemite.mars.lan   yosemite
>
> So there are two entries for the same (my) machine. Is this a problem?
> Specifically, could it cause problems with email (Exim4 or OpenSMTPD)?

127.0.1.1 is traditionally used for the fully qualified domain name
(fqdn). So I would expect to see 'yosemite.mars.lan', but not
'yosemite'.

Also, fqdn's end in dot '.' to denote the top of the dns tree. So I
would expect to see 'yosemite.mars.lan.' (note the trailing dot), and
not 'yosemite.mars.lan' (note the lack of the trailing dot). What can
happen with 'yosemite.mars.lan' is, search domains can be added to it.
So if dhcp says 'isp.com' is a search domain, then your network stack
might make requests for 'yosemite.mars.lan.isp.com'.

Jeff

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | linux.debian.user


csiph-web