3

I am currently writing a simple chat program for my computer networks class and am using ports not normally open (11000, for instance). I want to add the permission to let the program through those ports without necessarily opening them to the world. I have tried adding the program with the ports to the firewall through the Windows Firewall setting, but that did not help (I did make sure I selected the correct exe, added the correct connection type (TCP) and the correct ports I was using). I have seen a few answers for adding the program to the firewall through C# code here and then looked into customizing the click once installer to be able to add and remove the rules while it installed and uninstalled the program, but that seems kind of unnecessary. Is there anyway to easily do this, or did I make some mistake that I just don't know about?

Sys Info: Windows 7 64-bit

TL:DR - Need to get the chat client server I am writing to go through Windows Firewall across ports 11000 - 11xxx (just need a few (less than like 50 for multiple chats), just not sure how many yet).

Edit 1: I did try turning the firewall completely off and I am still getting this issue...

Blaze Phoenix
  • 859
  • 2
  • 14
  • 33
  • The article you linked is meant for older versions of windows so it might simply not translate directly to your situation. What OS are you using? You're probably more interested in [this](http://msdn.microsoft.com/en-us/library/windows/desktop/dd339600(v=vs.85).aspx) guide. The only code samples are C++ but you can infer the usage and the objects you need to use. I briefly touched this in [my answer here](http://stackoverflow.com/a/22055734/1864167) as well. – Jeroen Vannevel Mar 02 '14 at 12:49
  • I believe similar programs like Skype use STUN (http://en.wikipedia.org/wiki/STUN) to get over the firewall. Have you looked at http://stackoverflow.com/questions/2496080/net-and-p2p-writing-a-p2p-messenger? – Jonathan Mar 02 '14 at 12:52
  • @JeroenVannevel Turns out my problem was I was trying to use a client as a listener... therefore, I was trying to connect to an open connection rather than creating a landing point. I am going to see if I can get this to work; and if all of this is fixed I will delete the question. Thanks for the advice – Blaze Phoenix Mar 03 '14 at 12:10
  • @Bonzo See above comment – Blaze Phoenix Mar 03 '14 at 12:11

0 Answers0