We help IT Professionals succeed at work.

Finding IP of VPN connection (vs local IP)

Medium Priority
230 Views
Last Modified: 2013-11-13
Hi, I use Microsoft VPN to connect/login from a remote computer to SBS2003. The local IP is something like 192.168.0.xxx, the VPN IP is something like 10.0.0.xxx. If I use winsock to get the IP I get the 192.168.0.xxx, but what I'm looking for is the 10.0.0.x address. I need this to VNC in to the client who's obtaining IP's via DHCP.

Comment
Watch Question

Author

Commented:
Thanks for that, that tells me the DHCP server address, do you know how to get the local IP that was issued by the DHCP server ?.

Commented:
Put a winsock control on your form.

then type the following

msgbox(winsock1.localhostIP)

Commented:
change it to this ...
Put a winsock control on your form.

then type the following

msgbox(winsock1.localIP)

Author

Commented:
Yes, I've tried that, it gives the local IP of 192.168.0.xxx, but what I need is the VPN I of 10.0.0.xxx.
Commented:
what did you see when you type ipconfig in the console?
Can you post some text data?

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Commented:
or What did you see when you type ipconfig /all in the console?

Please post some sample data...

Author

Commented:
I see the address I want in ipconfig, so I suppose it's just a matter of parsing it via a text file. Thanks.

Commented:
If you need some code for that I can give you one

Author

Commented:
That would be great, thanks
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.