Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2005

Tip: Looking for answers? Try searching our database.

KNOW MI WAN IP WITH C#

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Soussan Mikael - 13 Jul 2005 22:16 GMT
Hello evrybody,

I have to implement a simple module that can retrieve my own ip adress but
if i am behind a firewall i have to get my wan ip that's to say my external
ip adress!!!

I don't know how to do this!!!I see a little at WMI but anything.
My dns client updater can see my external ip, but if i launch ipconfig i see
only my lan 192.168.1.3)

Thank for helping!!
Arthur M. - 14 Jul 2005 00:27 GMT
There is really no way to do that reliably using your local system as the
only point of query. Once IP packet leaves your system it can get translated
and changed any number of times without your system's knowledge, that is hte
whole point of NAT.

If your firewall is local to your PC, you can query the firewall
configuration to determine external IP address, however, if firewall is a
different system - the only truly reliable way to determine translated IP
address is to query a remote system outside your firewall for it to report
which IP address you APPEAR to be coming from.

> Hello evrybody,
>
[quoted text clipped - 7 lines]
>
> Thank for helping!!
Soussan Mikael - 14 Jul 2005 08:14 GMT
that's to say i have to implement a server located on the web and to ask him
for my ip adress???
How czn I do in C#  to ask various websites that print my ipadress?

> There is really no way to do that reliably using your local system as the
> only point of query. Once IP packet leaves your system it can get
[quoted text clipped - 23 lines]
>>
>> Thank for helping!!
Lau Lei Cheong - 15 Jul 2005 02:58 GMT
You may create a webservice that'll return client's IP and use "wsdl"
command to generate proper C# class for you if you want.

Or create a plain ASP/ASP.NET page that'll return client's IP, and use
webclient class to read it.

There're many ways to implement it.

"Soussan Mikael" <mikael@soussan.homeunix.net> ¼¶¼g©ó¶l¥ó·s»D:42d61152$0$1254$8fcfb975@news.wanadoo.fr...
> that's to say i have to implement a server located on the web and to ask
> him for my ip adress???
[quoted text clipped - 28 lines]
>>>
>>> Thank for helping!!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.