Re: Get the external IP address from a Linux box
- To: debian-user@lists.debian.org
- Subject: Re: Get the external IP address from a Linux box
- From: David Wright <deblis@lionunicorn.co.uk>
- Date: Sat, 2 Jun 2018 09:41:38 -0500
- Message-id: <[🔎] 20180602144138.GB6186@alum>
- Reply-to: debian-user@lists.debian.org
- In-reply-to: <9e47ed1b-f7c4-1465-d892-618e8c0a36cd@plouf.fr.eu.org>
- References: <1527142976.23018.1.camel@rodier.me> <slrnpgelg4.8pj.alanjg@archduke.router> <c29ad420-7bdc-1110-98ba-167db1a8d6be@plouf.fr.eu.org> <slrnpgnrg9.6fm.alanjg@archduke.router> <148d73df-4085-9bf6-dda3-2850b2f7508d@plouf.fr.eu.org> <9e47ed1b-f7c4-1465-d892-618e8c0a36cd@plouf.fr.eu.org>
On Tue 29 May 2018 at 14:57:22 (+0200), Pascal Hambourg wrote:
> Le 28/05/2018 à 23:14, Pascal Hambourg a écrit :
> >Le 28/05/2018 à 13:54, Alan Greenberger a écrit :
> >>
> >>You are mostly correct. However, I have one machine on which the
> >>response to
> >>/usr/sbin/arp -n
> >>shows two lines with the HWaddress of the router, one with the internal
> >>address as you said and the other with the external address. I have no
> >>idea what made arp see the external address.
> >
> >Thinking of it, a router following the "weak host" model (like
> >Linux does) can advertise any local address on any interface. It
> >can be tested with arping. However I am failing to imagine any
> >plausible scenario which could lead a host on the internal LAN to
> >have the router's external IP address in its ARP cache. It means
> >that either :
> >- the host sends an ARP query for the router's external IP address
>
> I guess this could happen if the host has a direct default route (no
> gateway) and the router acts as an ARP proxy. Quite an unusual
> setup.
>
> >- the router sends an ARP query to the host from its external IP address
>
> I checked that the latter can happen when the router must send a
> packet to the host with its external address as source and must
> resolve the host's address. Then the ARP query source IP address is
> the external address, and the destination host stores it in its ARP
> cache.
>
> Any idea why the router would send packets to this host from its
> external address ?
I think your analysis starts from an assumption that everything is,
and always was, set up correctly from the start, and is working with
a sane and correct configuration, which might not be completely true.
Cheers,
David.
Reply to: