473,699 Members | 2,799 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Find External (WAN) IP Address

Help....I am trying to use the System.net namespace to determine the
Internet (WAN) IP Address of my computer. No luck finding any such class so
far.
Any ideas?
Nov 15 '05 #1
5 3173
Your dial-up RAS interface or the public IP of your NAT router?

--
William Stacey, MVP

"Chris Fink" <ch*********@ho tmail.com> wrote in message
news:uV******** ******@TK2MSFTN GP12.phx.gbl...
Help....I am trying to use the System.net namespace to determine the
Internet (WAN) IP Address of my computer. No luck finding any such class so far.
Any ideas?

Nov 15 '05 #2
public IP of my router.

"William Stacey" <st***********@ mvps.org> wrote in message
news:eM******** *****@TK2MSFTNG P12.phx.gbl...
Your dial-up RAS interface or the public IP of your NAT router?

--
William Stacey, MVP

"Chris Fink" <ch*********@ho tmail.com> wrote in message
news:uV******** ******@TK2MSFTN GP12.phx.gbl...
Help....I am trying to use the System.net namespace to determine the
Internet (WAN) IP Address of my computer. No luck finding any such class

so
far.
Any ideas?


Nov 15 '05 #3
No apis for that AFAIK. When you think about it, how could your local
machine know. It could be behind many layers of NAT. The only way to know
for sure is to have some kind of service on the "outside" that could tell
you in a reply. You could scrap the IP from a service like
network-tools.com, etc. Or have a small web service that is hosted in front
of your nat to tell you. Or use something like smtp against your router.

--
William Stacey, MVP

"Chris Fink" <ch*********@ho tmail.com> wrote in message
news:eB******** ******@TK2MSFTN GP11.phx.gbl...
public IP of my router.

"William Stacey" <st***********@ mvps.org> wrote in message
news:eM******** *****@TK2MSFTNG P12.phx.gbl...
Your dial-up RAS interface or the public IP of your NAT router?

--
William Stacey, MVP

"Chris Fink" <ch*********@ho tmail.com> wrote in message
news:uV******** ******@TK2MSFTN GP12.phx.gbl...
Help....I am trying to use the System.net namespace to determine the
Internet (WAN) IP Address of my computer. No luck finding any such
class so
far.
Any ideas?



Nov 15 '05 #4
Why do you need it?

--
Michael Culley
"Chris Fink" <ch*********@ho tmail.com> wrote in message news:uV******** ******@TK2MSFTN GP12.phx.gbl...
Help....I am trying to use the System.net namespace to determine the
Internet (WAN) IP Address of my computer. No luck finding any such class so
far.
Any ideas?

Nov 15 '05 #5
If your Wan router is UPNP enabled, you can use the Upnp COM interfaces
(upnp.dll) available on W98, XP and higher.

Willy.

"Chris Fink" <ch*********@ho tmail.com> wrote in message
news:uV******** ******@TK2MSFTN GP12.phx.gbl...
Help....I am trying to use the System.net namespace to determine the
Internet (WAN) IP Address of my computer. No luck finding any such class
so
far.
Any ideas?

Nov 15 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
2351
by: Sune | last post by:
Hi, previously I used Eclipse CDT for compiling my files just to get started with C and leave C++ behind. Now it's time to get a little more serious so I've moved my files to a new workplace and begun to use GNU Autotools. I'm sorry to say I'm new to gcc as well :( Now I get the most ridiculous compile error which I'm unable to solve. Can someone, please, help me with this? gcc output together with the files mentioned in the gcc error...
12
2601
by: Souljaz | last post by:
Hi, how to find IP address. Thanks
6
2557
by: Dave P | last post by:
Need to get my wan ip from my desktop application any examples TIA Dave
8
10379
by: MrNobody | last post by:
I need to find out the IP address of my local network on the WAN. There is alot of information on getting my local machine IP address but I can't find anything for getting the IP address my network is on. I was thinking I could make a HTTP Request to a server which displays your IP address as they see it and scrape it out of the response but I was hoping for a method which is less dependent on some server out on the web...
12
1607
by: smerf | last post by:
I have searched high and low (and even in some places I'd like to forget I ever saw) for the information that will tell me exactly how the Nat2Nat server for UltraVNC works (not just a vague diagram, but the code needed - at least psuedocode - to connect the 2 clients) . (You can see it at http://www.uvnc.com/addons/nat2nat.html.) I get the diagram and all, but how exactly would you get 2 UDP connections to your UDP server to start...
1
9459
by: danknauf | last post by:
I have a webserver which is behaving strangely. The server is a fresh copy of Windows 2003 running IIS with default options + Active Server Pages installed. The server is connected to a Linksys router, and has a static IP address of 192.168.1.10. When I access a page with the following script directly from the server, my WAN IP address is returned (24.x.x.x.), instead of my LAN address. <%
3
8204
by: RFD | last post by:
I've been slaving at this problem for over a week, and would appreciate some help from you kind folks. Basic Problem: I have made a server program and a client program. When I try to use the client to connect to 127.0.0.1 or my LAN IP, the program connects and transfers information successfully. However, when I get somebody else to host the server, or when I try to connect to a server on my own machine using my WAN IP, I currently get a...
4
7749
by: kimiraikkonen | last post by:
Hi, I'm connected through router and i have a local ip address as well starting with 192.168.x.x. However i can read local ip address fine with that code: Dim strHostName As String Dim strIPAddress As String strHostName = System.Net.Dns.GetHostName() strIPAddress = System.Net.Dns.Resolve(strHostName).AddressList(0).ToString()
4
13102
by: remya1000 | last post by:
i'm using VB.NET 2003 Application program. i need to get External IP Address (internet). i searched internet and found come codes and tried that... i tried this code... but it returned my internal IP Address... Dim IPHost As IPHostEntry = Dns.GetHostByName(Dns.GetHostName()) MessageBox.Show("My IP address is " & IPHost.AddressList(0).ToString()) and i tried this code too...
0
9174
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9034
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8914
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6534
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4376
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3057
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2347
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2009
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.