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


Groups > linux.debian.user > #196347

Re: Get the external IP address from a Linux box

From David Wright <deblis@lionunicorn.co.uk>
Newsgroups linux.debian.user
Subject Re: Get the external IP address from a Linux box
Date 2018-06-02 16:40 +0200
Message-ID <vWfRf-7bg-1@gated-at.bofh.it> (permalink)
References (1 earlier) <vT9oZ-8oU-1@gated-at.bofh.it> <vTFoR-2C8-3@gated-at.bofh.it> <vUp8m-7mU-15@gated-at.bofh.it> <vUurn-1Qw-3@gated-at.bofh.it> <vULBU-3Hj-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue 29 May 2018 at 08:04:06 (-0400), Alan Greenberger wrote:
> 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

The easiest way to achieve this might be to plug that host's cable
into the modem rather than the router (for just a short period).
I don't know how long it takes for arp entries to expire.

A more worrying alternative is that something is misconfigured in the
router, but I don't know what.

Cheers,
David.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Get the external IP address from a Linux box André Rodier <andre@rodier.me> - 2018-05-24 08:40 +0200
  Re: Get the external IP address from a Linux box conover@rahul.net (John Conover) - 2018-05-24 08:50 +0200
    Re: Get the external IP address from a Linux box likcoras <likcoras@riseup.net> - 2018-05-24 09:00 +0200
      Re: Get the external IP address from a Linux box conover@rahul.net (John Conover) - 2018-05-24 09:30 +0200
        Re: Get the external IP address from a Linux box André Rodier <andre@rodier.me> - 2018-05-24 10:00 +0200
  Re: Get the external IP address from a Linux box <tomas@tuxteam.de> - 2018-05-24 09:00 +0200
  Re: Get the external IP address from a Linux box Joe <joe@jretrading.com> - 2018-05-24 09:10 +0200
    Re: Get the external IP address from a Linux box Alberto Luaces <aluaces@udc.es> - 2018-05-24 09:10 +0200
      Re: Get the external IP address from a Linux box André Rodier <andre@rodier.me> - 2018-05-24 09:20 +0200
        Re: Get the external IP address from a Linux box <tomas@tuxteam.de> - 2018-05-24 09:40 +0200
        Re: Get the external IP address from a Linux box Joe <joe@jretrading.com> - 2018-05-24 11:30 +0200
          Re: Get the external IP address from a Linux box Joel Rees <joel.rees@gmail.com> - 2018-05-31 02:10 +0200
      Re: Get the external IP address from a Linux box Stefan Monnier <monnier@iro.umontreal.ca> - 2018-05-24 22:20 +0200
        Get the external IP address from a Linux box Erwan David <erwan@rail.eu.org> - 2018-05-24 22:40 +0200
          Re: Get the external IP address from a Linux box Miles Fidelman <mfidelman@meetinghouse.net> - 2018-05-24 23:30 +0200
    Re: Get the external IP address from a Linux box Richard Hector <richard@walnut.gen.nz> - 2018-05-26 08:20 +0200
  Re: Get the external IP address from a Linux box Abdullah Ramazanoğlu <ar018@yahoo.com> - 2018-05-24 09:40 +0200
    Re: Get the external IP address from a Linux box <tomas@tuxteam.de> - 2018-05-24 09:50 +0200
    Re: Get the external IP address from a Linux box Dan Purgert <dan@djph.net> - 2018-05-24 13:20 +0200
      Re: Get the external IP address from a Linux box Abdullah Ramazanoğlu <ar018@yahoo.com> - 2018-05-25 03:30 +0200
        Re: Get the external IP address from a Linux box Dan Purgert <dan@djph.net> - 2018-05-25 20:40 +0200
  Re: Get the external IP address from a Linux box Peter Ludikovsky <peter@ludikovsky.name> - 2018-05-24 13:20 +0200
  Re: Get the external IP address from a Linux box Greg Wooledge <wooledg@eeg.ccf.org> - 2018-05-24 14:10 +0200
    Re: Get the external IP address from a Linux box Dan Purgert <dan@djph.net> - 2018-05-24 15:00 +0200
  Re: Get the external IP address from a Linux box Alan Greenberger <alanjg@ptd.net> - 2018-05-25 03:10 +0200
    Re: Get the external IP address from a Linux box Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-05-26 13:20 +0200
      Re: Get the external IP address from a Linux box Alan Greenberger <alanjg@ptd.net> - 2018-05-28 14:10 +0200
        Re: Get the external IP address from a Linux box David Wright <deblis@lionunicorn.co.uk> - 2018-05-28 19:50 +0200
          Re: Get the external IP address from a Linux box Alan Greenberger <alanjg@ptd.net> - 2018-05-29 14:10 +0200
            Re: Get the external IP address from a Linux box David Wright <deblis@lionunicorn.co.uk> - 2018-06-02 16:40 +0200
        Re: Get the external IP address from a Linux box Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-05-28 23:20 +0200
          Re: Get the external IP address from a Linux box Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-05-29 15:00 +0200
            Re: Get the external IP address from a Linux box David Wright <deblis@lionunicorn.co.uk> - 2018-06-02 16:50 +0200
  Re: Get the external IP address from a Linux box Michael Stone <mstone@debian.org> - 2018-05-26 03:10 +0200
    Re: Get the external IP address from a Linux box Kenneth Parker <sea7kenp@gmail.com> - 2018-05-26 03:20 +0200
      Re: Get the external IP address from a Linux box Greg Wooledge <wooledg@eeg.ccf.org> - 2018-05-29 15:10 +0200
  Re: Get the external IP address from a Linux box Kenneth Parker <sea7kenp@gmail.com> - 2018-05-26 03:10 +0200
  Re: Get the external IP address from a Linux box André Rodier <andre@rodier.me> - 2018-05-26 13:00 +0200
    Get the external IP address from a Linux box Andrew McGlashan <andrew.mcglashan@affinityvision.com.au> - 2018-05-27 13:20 +0200
      Re: Get the external IP address from a Linux box André Rodier <andre@rodier.me> - 2018-05-27 14:20 +0200
        Re: Get the external IP address from a Linux box Andrew McGlashan <andrew.mcglashan@affinityvision.com.au> - 2018-05-27 15:50 +0200
          Re: Get the external IP address from a Linux box André Rodier <andre@rodier.me> - 2018-05-27 16:20 +0200

csiph-web