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

Re: External IP





2008/4/23, Celejar <celejar@gmail.com>:
On Tue, 22 Apr 2008 20:23:40 -0400
Andrew Reid <reidac@bellatlantic.net> wrote:

> On Tuesday 22 April 2008 19:39, Daniel Ngu wrote:
> > Hi,
> >
> > How do I find out what's the dynamic IP I get when connected
> > to my ISP? I'm not broadband BTW.
>
>   I use "www.whatsmyip.org",  I have NAT at home, and the
> "far side" of my DSL modem is a private class-A address
> (10.0.something.something), so it's useful to have a utility
> that cuts through the crap.
>
>   Of course, it does require that you have a working
> web browser.  If you (or I) were clever, we'd probably
> do some tricky tracert thing.


ddclient can parse html to read your external IP address from your
router's status page.  I don't know if there's a clean way to use that
functionality independently of ddclient itself.


> Andrew Reid / reidac@bellatlantic.net


Celejar

--
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


I can see that you're running behind a router or something similar. If you want to use a shell script to return the IP to the stdout, you could probably use 'curl'.

1- If you don't have curl, you would have to install it:
       
[sudo] apt-get install curl

2- Get one of these sites that return your external IP (You know no site like this? just google "what is my IP", without quotes) and create a shell command. See my example:

$ curl http://www.ip-adress.com/ | grep "My IP: "

Test it and then you put it in a shell script and you're done. :)

Cheers,

Rafael

Reply to: