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

Re: knowing my IP address behind NAT firewall



On Tuesday 31 May 2005 23:48, Roberto C. Sanchez wrote:
> On Tue, May 31, 2005 at 11:25:10PM +0100, Lee Braiden wrote:
> > ping -c 1 hop www.google.com | grep 'bytes from' | cut -d ' ' -f 5 | cut
> > -d '(' -f 2 | cut -d ')' -f 1
>
> Try this:
> lynx -dump http://checkip.dyndns.org |sed -n '/Current/s/.*: \(.*\)/\1/p'
>
> It doesn't rely on ICMP packaets, which are blocked by many ISPs and/or
> network admins.

I guess the hop thing is unreliable, then?

p.s.: Dexter, you might be able to use Roberto's example to parse the output 
of the webserver built into your router.  That would be awkward on my router, 
but I've heard of other people doing that.  Not sure if it was easy on 
theirs, or if they just liked hard work ;)

-- 
Lee.

Please do not CC replies directly to me.  I'll read them on the list.



Reply to: