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

Re: how to determine WAN IP address from behind a NAT router?



On Thu, May 05, 2005 at 07:54:42PM -0400, Brendan wrote:
> On Thursday 05 May 2005 07:33 pm, Sean Davis wrote:
> > On Thu, May 05, 2005 at 07:17:38PM -0400, Brendan wrote:
> > > /sbin/ifconfig eth0 | grep 'inet add' | awk '{print $2}' |cut -d ' '  -f
> > > 12 | cut -d: -f 2"
> >
> > or, more simply, /sbin/ifconfig eth0 | awk -F: '/inet/ {print $2}'|sed
> > s/'[[:space:]].*'// but.. that won't tell you the WAN address if you're on
> > a machine behind a NAT router. just your LAN address.
> 
> I *am* the NAT router. ;-)

Oh. Um. Yeah. Nevermind :)

-Sean



Reply to: