Block UDP port without firewall using VBScript
I am testing an application that communicates with a server over a UDP port and I need to block that port to make sure the application can handle it.
Problems:
1. This must be done in an automated test (which is controlled by VBScripts).
2. This must be done in Windows XP without using a firewall.
I've tried this:
Set objFirewall = CreateObject("HNetCfg.FwMgr")
Set objPolicy = objFirewall.LocalPolicy.CurrentProfile
Set colPorts = objPolicy.GloballyOpenPorts
Set objPort = colPorts.Item(9999,6)
objPort.Enabled = FALSE
but it didn't work.
0
source to share
1 answer
This might be of interest: How to block specific network protocols and ports with IPSec http://support.microsoft.com/kb/813878
+1
source to share