Microsoft Windows XP
[Version 5.1.2600
](C) Copyright 1986-2001 Microsoft Corp.
C
:\WINDOWS>netsh firewall set allowedprogram ?
set allowedprogram
[ program =
] path
[ [ name =
] name
[ mode =
] ENABLE
|DISABLE
[ scope =
] ALL
|SUBNET
|CUSTOM
[ addresses =
] addresses
[ profile =
] CURRENT
|DOMAIN
|STANDARD
|ALL
]
Sets firewall allowed program configuration.
Parameters
:
program - Program path and file name.
name - Program name (optional).
mode - Program mode (optional).
ENABLE - Allow through firewall (default).
DISABLE - Do not allow through firewall.
scope - Program scope (optional).
ALL - Allow all traffic through firewall (default).
SUBNET - Allow only local network (subnet) traffic through firewall.
CUSTOM - Allow only specified traffic through firewall.
addresses - Custom scope addresses (optional).
profile - Configuration profile (optional).
CURRENT - Current profile (default).
DOMAIN - Domain profile.
STANDARD - Standard profile.
ALL - All profiles.
Remarks
: 'scope' must be 'CUSTOM' to specify 'addresses'.
Examples
:
set allowedprogram C
:\MyApp\MyApp.exe MyApp ENABLE
set allowedprogram C
:\MyApp\MyApp.exe MyApp DISABLE
set allowedprogram C
:\MyApp\MyApp.exe MyApp ENABLE CUSTOM
157.60.0.1,172.16.0.0/16,10.0.0.0/255.0.0.0,LocalSubnet
set allowedprogram program = C
:\MyApp\MyApp.exe name = MyApp mode = ENABLE
set allowedprogram program = C
:\MyApp\MyApp.exe name = MyApp mode = DISABLE
set allowedprogram program = C
:\MyApp\MyApp.exe name = MyApp mode = ENABLE
scope = CUSTOM addresses =
157.60.0.1,172.16.0.0/16,10.0.0.0/255.0.0.0,LocalSubnet