How to Get Public IP From LinkSys Router?

Drew Tomlinson drew at mykitchentable.net
Wed Sep 3 14:54:26 PDT 2003


----- Original Message ----- 
From: "Matthew Emmerton" <matt at compar.com>
To: "Drew Tomlinson" <drew at mykitchentable.net>; "FreeBSD Questions"
<freebsd-questions at freebsd.org>
Sent: Wednesday, September 03, 2003 11:39 AM
Subject: Re: How to Get Public IP From LinkSys Router?


> > I need to get my public IP address from a LinkSys cable router and
don't
> > have any idea where to start.  The LinkSys is doing NAT and my FBSD
box
> > in on the private network on the inside.  What commands and/or ports
are
> > there that would provide the public IP address from the command line
so
> > I pass the IP to a script?  Any ideas?
>
> The way I do it with my router (BEFW11S4 V2) is to use lynx to
download the
> HTML status page from the router and extract the public IP address.  I
do
> this in a cron job every 15 minutes, and when it notices an IP change,
it
> fires off my dynamic DNS updates.

This seems like the best way.  Would you be willing to share your script
that grabs the status page and extracts the IP?  I'm not very good with
regular expressions yet and would appreciate the kick start.

Thanks,

Drew



More information about the freebsd-questions mailing list