getting IP address of router

jim ruxton cinetron-uEvt2TsIf2EsA/PxXw9srA at public.gmane.org
Mon Feb 7 22:40:43 UTC 2005


Thanks Jason,
This article says I have to run a script on a machine in a box outside
my router ie. on the net and a  script on my box within the router's
domain. I think parsing the results from myip.dk will be simpler. Also
if I can get traceroute to work it will simplify things.
Jim
> On February 7, 2005 10:08 pm, jim ruxton wrote:
> > On Mon, 2005-02-07 at 11:29, Jason Shein wrote:
> > > On February 7, 2005 09:02 pm, jim ruxton wrote:
> > > > Thanks again Adam. I didn't have Lynx, guess it doesn't come with
> > > > Fedora. I installed it and this works, thanks. What I'd like to easily
> > > > be able to do is grab my internet IP address and pass it on to a
> > > > script. I guess I could parse what comes back from myip.dk but I keep
> > > > thinking there must be an easier way.
> > > > Jim
> > >
> > > http://www.whatismyip.com/
> > >
> > > or some php I came across a while ago that is said to do just this. I
> > > can't remember where I found it though...
> > >
> > > <?
> > > $domain = GetHostByName($REMOTE_ADDR);
> > > print $domain;
> > > ?>
> >
> > In this case what is the variable $REMOTE_ADDR ?
> >
> > Jim
> l
> try here
> 
> http://www.geekuprising.com/get_your_ip_address_with_perl
> 
> -snip-
> 
> So. You want to find your external IP address for use in a perl script. This 
> falls into the "simple things that should be easy" category, but the devil's 
> in the details. I'll discuss a few scenarios, and give you some simple 
> scripts that should help you if you're trying to do this behind a router / 
> NAT setup.
> 
> -snip-

--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list