• Advertisement
Sign in to follow this  

System::Net::Sockets, how to monitor ports?

This topic is 4973 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm looking into writing a simple firewall application in .NET I dont know much about sockets etc. I've only used the simple .NET TcpClient classes etc. How would I go about querying ports to find out if they are listening|open|connected etc. And the associative information. Any helpful link or resource would be appreciated. Thanks, /Jeff

Share this post


Link to post
Share on other sites
Advertisement
You can't really write an application like a firewall using sockets, nor is it a very good idea to write it in C# or any other managed language. Writing a socket requires a pretty low level of access to the network stack, and, AFAIK, you need to write a kernel-mode driver. This is *not* something for beginners.

Share this post


Link to post
Share on other sites
Well even though I'm a beginner at network programming, I'm not affraid of the challenge.

I've been researching, IPHelper, nDIS, and a few custom libraries.

Anyone tips on where to start?
I need to be able to monitor ports (which can be done through IPHelper) and block traffic (which I think NDIS will allow, but documentation is difficult for beginners)

btw, I dont need to use .net, mfc will be fine, or even console based but i'd like to write a gui so mfc probably.

Thanks,
/jeff

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement