Solved

Using VB6, How do I detect whether a certain port is closed on Windows XP Internet Connection Firewall?

Posted on 2004-10-09
4
329 Views
Last Modified: 2006-11-17
I need to be able to have my Visual Basic 6 (VB6) application detect whether the machine it is running on has Windows XP Internet Connection Firewall (even better - any software firewall (e.g., ZoneLabs)) blocking inbound UDP traffic on port 8473.
0
Comment
Question by:samuel999
4 Comments
 
LVL 76

Accepted Solution

by:
David Lee earned 250 total points
Comment Utility
If you just wanted to test XP's firewall I'd recommend Microsoft's Firewall API (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ics/ics/windows_firewall_start_page.asp?frame=true).  Since you want to test for ports against any frewall, then I recommend a port scanner.  Here's a link to a VB port scanner: http://www.planet-source-code.com/URLSEO/vb/scripts/ShowCode!asp/txtCodeId!56397/lngWid!1/anyname.htm
0
 
LVL 3

Expert Comment

by:owitte
Comment Utility
Hello samuel999,

how about sending a UDP request on port 8473 and wait for a certain time for an answer? If it times out, you can tell the user that the program didn't get a response and all firewalls should be turned off (or to change the configuration to let these requests through)...
0
 

Author Comment

by:samuel999
Comment Utility
I'm trying to detect if a UDP packet on port 8473 sent from OUTSIDE this user's computer can be received by my application listening to that port while running locally on this user's computer.  

BlueDevilFan:  I like your first suggestion.  The API works well.  Your second suggestion, a port scanner:  Can that test my own computer as to whether certain ports are open to access FROM the OUTSIDE on the computer I'm running on, or will that just allow me to test whether ports on OTHER computers are open?

owitte:  A firewall doesn't necessarily block OUTBOUND traffic, just incoming traffic.  I'm trying to detect if I can receive incoming traffic on 8473, not if I can send outbound traffic.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now