Information Technology Reference
In-Depth Information
Using Group Policy
Tables 3-21 and 3-22 show the settings that control the UPnP exception within the Windows
Firewall in the domain and standard profiles respectively.
Table 3-21. Configure UPnP Exception—Domain Profile
Computer Configuration\Administrative Templates\Network\
Network Connections\Windows Firewall\Domain Profile
Path
Policy name
Windows Firewall: Allow UPnP framework exception
Value
Enabled to allow incoming UPnP traffic. Disabled to prevent it.
Table 3-22. Configure UPnP Exception—Standard Profile
Computer Configuration\Administrative Templates\Network\
Network Connections\Windows Firewall\Standard Profile
Path
Policy name
Windows Firewall: Allow UPnP framework exception
Value
Enabled to allow incoming UPnP traffic. Disabled to prevent it.
Using VBScript
This code allows UPnP traffic to traverse the Windows Firewall.
Set Firewall = CreateObject("HNetCfg.FwMgr")
Set Policy = Firewall.LocalPolicy.CurrentProfile
Set TcpPort = CreateObject("HNetCfg.FwOpenPort")
Set UdpPort = CreateObject("HNetCfg.FwOpenPort")
TcpPort.Port = 2869
TcpPort.Name = "UPnP Framework"
TcpPort.Protocol = NET_FW_IP_PROTOCOL_TCP
TcpPort.Enabled = TRUE
UdpPort.Port = 1900
UdpPort.Name = "UPnP Framework"
UdpPort.Protocol = NEW_FW_IP_PROTOCOL_UDP
UdpPort.Enabled = True
set Ports = Policy.GloballyOpenPorts
addedPorts = Ports.Add(TcpPort)
addedPorts = Ports.Add(UdpPort)
WScript.Echo "Ports configured"
Search WWH ::




Custom Search