Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to Determine my Internet IP Address

Reply
Thread Tools Display Modes

How to Determine my Internet IP Address

 
 
Dave Farrance
Guest
Posts: n/a

 
      06-04-2006, 10:57 AM
I'm looking for a reasonably future-proof way to find the IP address of
a machine as seen from the Internet.

This worked once but not now. It was probably removed due to excessive
traffic:

wget -O- http://cfaj.freeshell.org/ipaddr.cgi 2>/dev/null

Other suggestions please?

Has any organisation decided to save the world and provide a
script-parseable IP address of the requesting machine?

--
Dave Farrance
 
Reply With Quote
 
 
 
 
Grant
Guest
Posts: n/a

 
      06-04-2006, 12:15 PM
On Sun, 04 Jun 2006 10:57:16 GMT, Dave Farrance <(E-Mail Removed)> wrote:

>I'm looking for a reasonably future-proof way to find the IP address of
>a machine as seen from the Internet.


host 82.33.49.20
20.49.33.82.in-addr.arpa domain name pointer 82-33-49-20.cable.ubr05.stav.blueyonder.co.uk.

Grant.
--
http://bugsplatter.mine.nu/
 
Reply With Quote
 
Dave Farrance
Guest
Posts: n/a

 
      06-04-2006, 01:10 PM
Grant <(E-Mail Removed)> wrote:

>On Sun, 04 Jun 2006 10:57:16 GMT, Dave Farrance <(E-Mail Removed)> wrote:
>
>>I'm looking for a reasonably future-proof way to find the IP address of
>>a machine as seen from the Internet.

>
>host 82.33.49.20
>20.49.33.82.in-addr.arpa domain name pointer 82-33-49-20.cable.ubr05.stav.blueyonder.co.uk.


Hmm. Not exactly future proof, or much good for a script, is it?

Maybe a script to post to alt.test on a free newsserver like aioe.org
and to search for, read, and parse the headers? :-)

--
Dave Farrance
 
Reply With Quote
 
Bill Marcum
Guest
Posts: n/a

 
      06-04-2006, 01:10 PM
["Followup-To:" header set to comp.unix.shell.]
On Sun, 04 Jun 2006 10:57:16 GMT, Dave Farrance
<(E-Mail Removed)> wrote:
> I'm looking for a reasonably future-proof way to find the IP address of
> a machine as seen from the Internet.
>
> This worked once but not now. It was probably removed due to excessive
> traffic:
>
> wget -O- http://cfaj.freeshell.org/ipaddr.cgi 2>/dev/null
>
> Other suggestions please?
>
> Has any organisation decided to save the world and provide a
> script-parseable IP address of the requesting machine?
>

ifconfig


--
The sum of the intelligence of the world is constant. The population is,
of course, growing.
 
Reply With Quote
 
Michael Heiming
Guest
Posts: n/a

 
      06-04-2006, 01:20 PM
In comp.unix.shell Dave Farrance <(E-Mail Removed)>:
> I'm looking for a reasonably future-proof way to find the IP address of
> a machine as seen from the Internet.


> This worked once but not now. It was probably removed due to excessive
> traffic:
>
> wget -O- http://cfaj.freeshell.org/ipaddr.cgi 2>/dev/null


> Other suggestions please?


> Has any organisation decided to save the world and provide a
> script-parseable IP address of the requesting machine?


There are numerous if you can't find it out from the inside:

lynx -dump http://www.mediacollege.com/internet.../show-ip.shtml \
| awk '/is:/{print $NF}'

Though there's no guarantee if this won't change.

--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo (E-Mail Removed) | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 95: Pentium FDIV bug
 
Reply With Quote
 
Dave Farrance
Guest
Posts: n/a

 
      06-04-2006, 03:18 PM
Michael Heiming <michael+(E-Mail Removed)> wrote:

>lynx -dump http://www.mediacollege.com/internet.../show-ip.shtml \
> | awk '/is:/{print $NF}'


>Though there's no guarantee if this won't change.


Thanks, that works. I guess that it's the best that can be expected,
even if change is odds-on in the next few years. I've searched out a
few more sites that respond similarly:

lynx -dump http://www.formyip.com/ | awk '/IP is/{print $NF}'

lynx -dump http://www.showipaddress.com/ \
| awk '/IP address:/{print $NF}'

lynx -dump http://www.auditmypc.com/whats-my-ip.asp \
| awk '/current IP/{print $NF}'

lynx -dump http://www.edpsciences.org/htbin/ipaddress \
| awk '/IP address is/{print $NF}'

lynx -dump http://www.pcmesh.com/ip-check.cgi \
| awk '/REMOTE_ADDR/{print $2}'

--
Dave Farrance
 
Reply With Quote
 
Tim Heaney
Guest
Posts: n/a

 
      06-04-2006, 04:06 PM
Michael Heiming <michael+(E-Mail Removed)> writes:
>
> In comp.unix.shell Dave Farrance <(E-Mail Removed)>:
>> I'm looking for a reasonably future-proof way to find the IP address of
>> a machine as seen from the Internet.

>
>> This worked once but not now. It was probably removed due to excessive
>> traffic:
>>
>> wget -O- http://cfaj.freeshell.org/ipaddr.cgi 2>/dev/null

>
>> Other suggestions please?

>
>> Has any organisation decided to save the world and provide a
>> script-parseable IP address of the requesting machine?

>
> There are numerous if you can't find it out from the inside:
>
> lynx -dump http://www.mediacollege.com/internet.../show-ip.shtml \
> | awk '/is:/{print $NF}'
>
> Though there's no guarantee if this won't change.


I think WhatIsMyIP.com is the most obvious one, but there's no
guarantee this won't change either. It's been my experience that the
plain text emitted by lynx -dump changes with upgrades to lynx
too. Since it's not that hard to parse the HTML itself, something like

perl -MLWP::Simple -le '$_=get q(http://www.whatismyip.com/); \
print $1 if /Your IP Is ((\d{1,3}\.){3}\d{1,3})/'

might be slightly less fragile than

lynx -dump http://whatismyip.com | awk '/Your IP Is/{print $NF}'

Tim
 
Reply With Quote
 
Grant
Guest
Posts: n/a

 
      06-04-2006, 04:55 PM
On Sun, 04 Jun 2006 13:10:01 GMT, Dave Farrance <(E-Mail Removed)> wrote:

>Grant <(E-Mail Removed)> wrote:
>
>>On Sun, 04 Jun 2006 10:57:16 GMT, Dave Farrance <(E-Mail Removed)> wrote:
>>
>>>I'm looking for a reasonably future-proof way to find the IP address of
>>>a machine as seen from the Internet.

>>
>>host 82.33.49.20
>>20.49.33.82.in-addr.arpa domain name pointer 82-33-49-20.cable.ubr05.stav.blueyonder.co.uk.

>
>Hmm. Not exactly future proof, or much good for a script, is it?


Point is, your machine knows what it is, but you looking outside
instead of inside -- and you have a lousy sense of humour

Grant.
--
http://bugsplatter.mine.nu/
 
Reply With Quote
 
Lew Pitcher
Guest
Posts: n/a

 
      06-04-2006, 05:17 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dave Farrance wrote:
> I'm looking for a reasonably future-proof way to find the IP address of
> a machine as seen from the Internet.


FWIW, I put together some automation, and used the 'free' personal webpage
provided by my ISP to give myself a 'rendesvous' site and redirect webpage.
You can find the details in an article I wrote for Linux Gazette issue 104
(http://linuxgazette.net/105/pitcher1.html).

HTH
- --
Lew Pitcher

Master Codewright & JOAT-in-training | GPG public key available on request
Registered Linux User #112576 (http://counter.li.org/)
Slackware - Because I know what I'm doing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEgxW2agVFX4UWr64RAi3GAJ97IntT8LIML4HVkp/McM82u/48lACePZaK
mFIn1TVR/WZMv76/oYL3Ncw=
=iwlO
-----END PGP SIGNATURE-----
 
Reply With Quote
 
Lew Pitcher
Guest
Posts: n/a

 
      06-04-2006, 05:20 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Lew Pitcher wrote:
> Dave Farrance wrote:
>>> I'm looking for a reasonably future-proof way to find the IP address of
>>> a machine as seen from the Internet.

>
> FWIW, I put together some automation, and used the 'free' personal webpage
> provided by my ISP to give myself a 'rendesvous' site and redirect webpage.

[snip]

I just realized that the technique I used in the article is probably overkill
for your problem. You can take a look at a simpler procedure that I wrote
about for The Slack World, issue 4 at
http://slackworld.berlios.de/04/essence-2.html

HTH
- --
Lew Pitcher

Master Codewright & JOAT-in-training | GPG public key available on request
Registered Linux User #112576 (http://counter.li.org/)
Slackware - Because I know what I'm doing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEgxZTagVFX4UWr64RAmmgAKCuDAWcwQN4jrZqrSMxv7 kj7ZLnywCgmQ2+
PVUgG59VxAfrIZYMnT70870=
=+2gx
-----END PGP SIGNATURE-----
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
determine mac address of an access point tim braun Wireless Internet 1 11-05-2007 02:38 PM
Determine IP address on machine sandeep.de@gmail.com Linux Networking 7 02-09-2006 04:57 PM
Determine IP address assigned to MAC Ian Pilcher Linux Networking 14 01-16-2006 06:20 AM
Puzzle: Determine router's IP address cdf Linux Networking 13 05-02-2005 05:13 AM
Determine IP address of WRT54G Another Newsgroup User Wireless Internet 13 08-02-2004 01:32 AM



1 2 3 4 5 6 7 8 9 10 11