Sign in to follow this  
Followers 0
cypher175

Get Both WAN & LAN IP Addresses..?

2 posts in this topic

Is there a way to get both the WAN & LAN IP Addresses of a PC that's behind a Router..??

Share this post


Link to post
Share on other sites



_GetIP

Remarks

This only returns the Public IP address of a computer or network (i.e. the

public IP on the WAN link of your NAT router). The address is determined by

accessing an external IP discovery web site like checkip.dyndns.org or

www.whatismyip.com.

Search the forums for some WMI methods of getting the active LAN IP since the @IPAddress info might not be the info that you want.

@IPAddress1

IP address of first network adapter. Tends to return 127.0.0.1 on some computers.

@IPAddress2

IP address of second network adapter. Returns 0.0.0.0 if not applicable.

@IPAddress3

IP address of third network adapter. Returns 0.0.0.0 if not applicable.

@IPAddress4

IP address of fourth network adapter. Returns 0.0.0.0 if not applicable.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0