Symantec Management Platform (Notification Server)

 View Only

Disable Firewall Ports and SFS Combined 

Jan 16, 2009 02:01 PM

Attached VBS script can be used to disable the firewall ports needed for Altiris agent to be installed correctly, combined with the disabling of Simple File Sharing, which can also cause problems with the agent deployment.

Script:

Function AltirisFirewallSettings()
Set objFirewall = CreateObject("HNetCfg.FwMgr")
Set objPolicy = objFirewall.LocalPolicy.CurrentProfile
if objPolicy.FirewallEnabled = -1 then

  'Enable ICMP 
        Set objICMPSettings = objPolicy.ICMPSettings
        objICMPSettings.AllowRedirect = TRUE

  'Enable Altiris Ports
        Set objShell = WScript.CreateObject("WScript.Shell")
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\forceguest", "0", "REG_DWORD"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\401:UDP", "401:UDP:*:Enabled:401", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\402:UDP", "402:UDP:*:Enabled:402", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\67:UDP", "67:UDP:*:Enabled:67", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\50:UDP", "50:UDP:*:Enabled:67", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\68:UDP", "68:UDP:*:Enabled:68", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\69:UDP", "69:UDP:*:Enabled:69", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\4011:UDP", "4011:UDP:*:Enabled:4011", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\402:TCP", "402:TCP:*:Enabled:402", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\1758:UDP", "1758:UDP:*:Enabled:1758", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\1759:UDP", "1759:UDP:*:Enabled:1759", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\1010:TCP", "1010:TCP:*:Enabled:1010", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\4949:TCP", "4949:TCP:*:Enabled:4949", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\3829:TCP", "3829:TCP:*:Enabled:3829", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\4950:TCP", "4950:TCP:*:Enabled:4950", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\4951:TCP", "4951:TCP:*:Enabled:4951", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\4952:TCP", "4952:TCP:*:Enabled:4952", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\8080:TCP", "8080:TCP:*:Enabled:8080", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\138:UDP", "138:UDP:*:Enabled:138", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\445:UDP", "445:UDP:*:Enabled:445", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\445:TCP", "445:TCP:*:Enabled:445", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\80:TCP", "80:TCP:*:Enabled:80", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\443:TCP", "443:TCP:*:Enabled:443", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\1433:TCP", "1433:TCP:*:Enabled:1433", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\135:UDP", "135:UDP:*:Enabled:135", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\137:UDP", "137:UDP:*:Enabled:137", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\139:UDP", "139:UDP:*:Enabled:139", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\52028:TCP", "52028:TCP:*:Enabled:52028", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\52029:TCP", "52029:TCP:*:Enabled:52029", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\2500:TCP", "2500:TCP:*:Enabled:2500", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\53:TCP", "53:TCP:*:Enabled:53", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\1680:TCP", "1680:TCP:*:Enabled:1680", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\1680:UDP", "1680:UDP:*:Enabled:1680", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\1701:TCP", "1701:TCP:*:Enabled:1701", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\161:TCP", "161:TCP:*:Enabled:161", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\43189:TCP", "43189:TCP:*:Enabled:43189", "REG_SZ"
        objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\43190:UDP", "43190:UDP:*:Enabled:43190", "REG_SZ"
end if
End Function

License:AJSL
By clicking the download link below, you agree to the terms and conditions in the Altiris Juice Software License
Support:User-contributed tools on the Juice are not supported by Altiris Technical Support. If you have questions about a tool, please communicate directly with the author by visiting their profile page and clicking the 'contact' tab.

Statistics
0 Favorited
0 Views
2 Files
0 Shares
0 Downloads
Attachment(s)
jpg file
9081.jpg   4 KB   1 version
Uploaded - Feb 25, 2020
zip file
FirewallandSFS.zip   891 B   1 version
Uploaded - Feb 25, 2020

Tags and Keywords

Related Entries and Links

No Related Resource entered.