Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

VB: Get IP

Posted on 2006-05-16
3
Medium Priority
?
228 Views
Last Modified: 2010-04-17
I am trying to get my ip in visual basic, now i thought this would be a simple task as i am an asp programming coming to visual basic i thought it would only take a couple of lines.

now ive come to find that yes it shows my ip but it shows my network ip (im on a wireless router)  Is there a way to get it to show my actual IP and not my network ip ??

Many Thanks,
0
Comment
Question by:TheJay04
  • 2
3 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 16694891
Confusing question....

If by "network ip" you mean your local/LAN private IP (something like 192.168.0.X) and by your "actual IP" you mean the IP your router is using to talk to your ISP/internet then the answer is no.  You PC has no knowledge of the IP that the router is using and if the router doesn't reveal it (which it doesn't) you can't find it directly.

You can, however, use an outside server of some sort to find the IP like:

http://www.whatismyipaddress.com/
0
 
LVL 32

Expert Comment

by:jhance
ID: 16694894
To continue, you could use that web site or another similar one to capture your IP address and make it available to your VB program.
0
 
LVL 2

Accepted Solution

by:
maka earned 500 total points
ID: 16695958
URLDownloadToFile: Obtain Machine's Public IP Behind Router

http://vbnet.mvps.org/index.html?code/internet/getpublicip.htm

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Six Sigma Control Plans

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question