Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WAN IP address from a computer..

0 views
Skip to first unread message

Sajid Saeed

unread,
Jan 3, 2005, 9:25:23 AM1/3/05
to
Hi,

Is there any possibility of getting the WAN IP address from a computer
connected on the LAN..

Lets say we have x computers, with static LAN IP address, and a router
which is connected on the LAN, and provides the WAN interface as well.

So how can we find the WAN IP address of the router directly using a
shell command from any computer on the LAN
Thanks well in advance

Sajid Saeed

Herb Martin

unread,
Jan 3, 2005, 10:43:11 AM1/3/05
to
"Sajid Saeed" <hitm...@hotmail.com> wrote in message
news:1104762323.2...@c13g2000cwb.googlegroups.com...

Maybe someone else has an IP only scheme but I
don't.

I do it by ensuring that the external WAN interace is
registered with DNS (dynamically both internally
and with an Internet based DNS service).

Then by performing any command that shows the
resolution of that name you can retrieve it, i.e., ping
NAME or nslookup NAME

--
Herb Martin


> Sajid Saeed
>


Ryan Hanisco

unread,
Jan 3, 2005, 12:17:17 PM1/3/05
to
Sajid,

There is no way to do this in the environment you've described. Generally
you're doing your NAT on your router or firewall. Because this is outside
of the server, the server has no way of knowing what you've assigned to it.
Indeed, in a PAT situation it becomes even more impossible (is that
possible? <G>).

Herb is right. If you put the WAN address in the DNS manually, you will at
least have something with which to look it up, though I'd generally keep WAN
addresses in an external DNS in my DMZ and leave the internal DNS handling
LAN naming.

Use a spreadsheet or use internal comments to comment your router/ firewall
configs.

--
Ryan Hanisco
MCSE, MCDBA
Flagship Integration Services

PS: If you're using multihomed machines with a NIC in each network, both LAN
and WAN, you can find it with IPCONFIG, but this should almost never be
done. (I wasn't sure if this was your configuration or not, from your post.)
If you're doing this, quit it. Establish a DMZ and control the ports.

"Sajid Saeed" <hitm...@hotmail.com> wrote in message
news:1104762323.2...@c13g2000cwb.googlegroups.com...

Lanwench [MVP - Exchange]

unread,
Jan 3, 2005, 12:59:58 PM1/3/05
to

Herb Martin

unread,
Jan 3, 2005, 9:10:14 PM1/3/05
to
"Ryan Hanisco" <rhan...@flagshipis.com> wrote in message
news:ey$uUgb8E...@TK2MSFTNGP09.phx.gbl...

> Sajid,
>
> There is no way to do this in the environment you've described. Generally
> you're doing your NAT on your router or firewall. Because this is outside
> of the server, the server has no way of knowing what you've assigned to
it.
> Indeed, in a PAT situation it becomes even more impossible (is that
> possible? <G>).
>
> Herb is right. If you put the WAN address in the DNS manually, you will
at
> least have something with which to look it up, though I'd generally keep
WAN
> addresses in an external DNS in my DMZ and leave the internal DNS handling
> LAN naming.

Actually I do this automatically by having the router/NAT
register it's external address.

Even many (of the latest) simple hardware routers will do
this using various Internet based (programmatic) Dynamic
DNS services.

> Use a spreadsheet or use internal comments to comment your router/
firewall
> configs.

--
Herb Martin

Shalom B.

unread,
Jan 8, 2005, 10:27:27 PM1/8/05
to

You could use the services of http://www.whatismyip.com/ ,if you need to
know the IP address of the WAN interface of the router for a command
line /shell scripting purpose, you could extract the IP address from
the page returned using a scripting language like perl.
0 new messages