473,806 Members | 2,277 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting TCP/IP information.

UJ
I can easily get the TCP/IP address of the local machine but I'd also like
to know if the machine is behind a firewall/hub - what the address is that
is being sent over the net.

Is there anyway to get the TCP/IP that is actually being sent out there?

TIA - Jeff.
Aug 27 '06 #1
3 1945
Jeff,

No, not through a regular socket connection. You would have to have
this sent to your client/server as part of your message exchange for your
protocol.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"UJ" <fr**@nowhere.c omwrote in message
news:ue******** ******@TK2MSFTN GP04.phx.gbl...
>I can easily get the TCP/IP address of the local machine but I'd also like
to know if the machine is behind a firewall/hub - what the address is that
is being sent over the net.

Is there anyway to get the TCP/IP that is actually being sent out there?

TIA - Jeff.

Aug 27 '06 #2
"UJ" <fr**@nowhere.c omwrote
>I can easily get the TCP/IP address of the local machine but I'd also like
to know if the machine is behind a firewall/hub - what the address is that
is being sent over the net.

Is there anyway to get the TCP/IP that is actually being sent out there?
Is this really what you're looking for? Most people asking this tend to be
looking for a way to traverse NAT's and Firewalls in order to make direct
P2P connections for thigs like conferencing, or file transfers.

If this is so, you want to lookup the technologies called ICE and STUN.
Using these provides a solid mechanism for getting direct connections even
for 2 machines that are both behind firewalls and using NAT.

However I don't know of any ICE/STUN implementations in .Net. If you find
one, please let me know!

--
Chris Mullins MCSD.NET, MCPD:Enterprise
http://www.coversant.net/blogs/cmullins
Aug 28 '06 #3
UJ wrote:
I can easily get the TCP/IP address of the local machine but I'd also like
to know if the machine is behind a firewall/hub - what the address is that
is being sent over the net.

Is there anyway to get the TCP/IP that is actually being sent out there?
You can ask a service out on the internet what IP it sees.

I once wrote this little hack:

public static string MyIp()
{
WebClient wc = new WebClient();
StreamReader sr = new
StreamReader(wc .OpenRead("http ://www.myip.dk/"));
string html = sr.ReadToEnd();
return Regex.Matches(h tml, @"(?:<title>You r IP:
)(\d+\.\d+\.\d+ \.\d+)(?:</title>)")[0].Groups[1].Value;
}
Arne
Aug 28 '06 #4

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

Similar topics

303
17807
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b. Yahoo store was originally written in Lisp. c. Emacs The issues with these will probably come up, so I might as well mention them myself (which will also make this a more balanced
0
1936
by: Jim | last post by:
I need some help getting started with a .NET web project for a commercial site. I am new to .NET and my understanding of some (but not all) of its concepts is a little sparse. I apologize for the length of this message, but hopefully it will help someone here give me the most concise and useful information, and perhaps help others out as well. :) It's been a while since I've had to design anything "real" for the web. I think the last...
0
1919
by: Jim | last post by:
This si a repost, I apologize but perhaps my original inquiry got buried under all the usenet spam... I need some help getting started with a .NET web project for a commercial site. I am new to .NET and my understanding of some (but not all) of its concepts is a little sparse. I apologize for the length of this message, but hopefully it will help someone here give me the most concise and useful information, and perhaps help others out...
5
1432
by: Brian Henry | last post by:
I have a page which reads an article from the database it has 1 text box, 2 dropdown lists, and a longreat HTML text box. I load the information from the database when the page is set to edit mode from a query string action=edit, now when i click on the update button it does the update event, the problem is, it still has the old unedited data in memory... and places the old stuff back into the database (saw this when debugging) the SQL is...
9
3270
by: Microsoft News Server | last post by:
Hi, I am currently having a problem with random, intermittent lock ups in my ASP.net application on our production server (99% CPU usage by 3 threads, indefinately). I currently use IIS Debug Tools to do a memory dump of the app when the lock up occurs, however the stack information is not very useful. I have just put a new build of our system onto production, and this build is a "Debug" build as opposed to a "Release" build. I am...
4
6730
by: Hiten | last post by:
Hi, I am trying to find a way to get and change file summary information. I tried using FileInfo class, but it doesn't give me information such as "Author,Title,Rating" etc. Is there a way to get and change these information using .NET libraries? Sample would be a great help... Thanks
2
3847
by: dmagliola | last post by:
Hello all, I'm experiencing a problem with ASP.Net for which I can't find a reasonable explanation, or any information. I'm currently developing an application that, through AJAX, asks the server for updated information to show, and can also send information to the server. To do this, I have an XMLHttpRequest that queries an Asynchronous HTTP
2
3584
by: rustyc | last post by:
Well, here's my first post in this forum (other than saying 'HI' over in the hi forum ;-) As I said over there: ... for a little side project at home, I'm writing a ham radio web site in uby/Rails. I started it in Perl and gave up on Perl as I went from the 'display the database information on the web page' to the 're-display the information from the database and allow the user to update the database using the web page' stage and realized...
2
4453
by: srusskinyon | last post by:
I need some help getting unique records from our database! I work for a small non-profit homeless shelter. We keep track of guest information as well as what services we have offered for statistical purposes. I've been using Here's the situation: I have two main tables:
4
5732
by: imaloner | last post by:
I am posting two threads because I have two different problems, but both have the same background information. Common Background Information: I am trying to rebuild code for a working, commercially sold application with only partial build instructions. The previous maintainer of the code (a mixture of C and C++) is no longer with the company, but when he built the code he used MSVC++, and though I am not certain of the version he was ...
0
9719
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10618
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
10366
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
10371
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,...
0
10110
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7649
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
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
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...
3
3008
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.