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


VB: Get IP

Posted on 2006-05-16
Medium Priority
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,
Question by:TheJay04
  • 2
LVL 32

Expert Comment

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:

LVL 32

Expert Comment

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.

Accepted Solution

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



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