Re: How do i find dynamic IP assigned?
On Tue, 2005-06-21 at 16:48 -0400, Patrick Rutkowski wrote:
> On Tuesday 21 June 2005 04:39 pm, Valeriu Cerchez wrote:
> > I'm trying to find out a(/n easy) way to determine
> > what is my dynamic IP assigned by my ISP (not my
> > internal DHCP). I wish to make a script to determine
> > that by request.
> > I would greatly appreciate any suggestion.
> > Thanks, Val.
I'm not sure anyone is going to 'write' the script for you. How else
are you going to learn to do it? <g> But, I'd look at ifconfig ppp0 and
grab the IP from there. Another could be to find it in syslog where
pppd puts it's messages. Mine looks something like
Jun 21 15:56:58 localhost pppd: local IP address 184.108.40.206
Jun 21 15:56:58 localhost pppd: remote IP address 220.127.116.11
<rest of output>
uummm.... maybe you can find it in /proc somewhere too but I haven't reached that level success just yet.. Maybe someone else can clue us in..