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
336 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
ID: 12268012
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
ID: 12268287
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
ID: 12268990
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

932 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

15 Experts available now in Live!

Get 1:1 Help Now