[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Get the external IP address from a Linux box



On 2018-05-28, David Wright <deblis@lionunicorn.co.uk> wrote:
> On Mon 28 May 2018 at 07:54:49 (-0400), Alan Greenberger wrote:
>> On 2018-05-26, Pascal Hambourg <pascal@plouf.fr.eu.org> wrote:
>> > Le 25/05/2018 à 02:17, Alan Greenberger a écrit :
>> >> On 2018-05-24, André Rodier <andre@rodier.me> wrote:
>> >>>
>> >>> I am looking for a native package on Debian, that can give me the
>> >>> external IP address of the machine.
>> >> 
>> >> Assuming you are looking for the public internet address of your router,
>> >> you could try:
>> >> /usr/sbin/arp -n
>> >> and it may show up on a line with the HWadress of your router.
>> >
>> > Nope. That would just show the internal address of the router.
>> >
>> >
>> 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.
>
> Can we see what you're seeing (suitably mangled)?
>
> Cheers,
> David.
>
>
192.168.1.1              ether   6x:3x:ex:7x:4x:bx   C                     eth0
2x.1xx.1xx.1xx           ether   6x:3x:ex:7x:4x:bx   C                     eth0


Reply to: