Microsoft Windows [Version 6.1.7000] (C) Copyright 2009 Microsoft Corp. C:\Windows>netsh advfirewall consec set rule ?
Usage: set rule
group=| name=[type=dynamic|static][profile=public|private|domain|any[,...] (default=any)][endpoint1=any|localsubnet|dns|dhcp|wins|defaultgateway|||||][endpoint2=any|localsubnet|dns|dhcp|wins|defaultgateway|||||][port1=0-65535|[,...]|any][port2=0-65535|[,...]|any][protocol=0-255|tcp|udp|icmpv4|icmpv6|any]
new
[name=][profile=public|private|domain|any[,...]][description=][mode=transport|tunnel][endpoint1=any|localsubnet|dns|dhcp|wins|defaultgateway|||||][endpoint2=any|localsubnet|dns|dhcp|wins|defaultgateway|||||][action=requireinrequestout|requestinrequestout|
requireinrequireout|requireinclearout|noauthentication][enable=yes|no][type=dynamic|static][localtunnelendpoint=any||][remotetunnelendpoint=any||][port1=0-65535|[,...]|any][port2=0-65535|[,...]|any][protocol=0-255|tcp|udp|icmpv4|icmpv6|any][interfacetype=wiresless|lan|ras|any][auth1=computerkerb|computercert|computercertecdsap256|
computercertecdsap384|computerpsk|computerntlm|anonymous[,...]][auth1psk=][auth1ca="[certmapping:yes|no][excludecaname:yes|no][catype:root|intermediate (default=root)]| ..."][auth1healthcert=yes|no][auth1ecdsap256ca="[certmapping:yes|no][excludecaname:yes|no][catype:root|intermediate (default=root)]| ..."][auth1ecdsap256healthcert=yes|no (default=no)][auth1ecdsap384ca="[certmapping:yes|no][excludecaname:yes|no][catype:root|intermediate (default=root)]| ..."][auth1ecdsap384healthcert=yes|no (default=no)][auth2=computercert|computercertecdsap256|computercertecdsap384|
userkerb|usercert|usercertecdsap256|usercertecdsap384|userntlm|
anonymous[,...]][auth2ca="[certmapping:yes|no][catype:root|intermediate (default=root)]| ..."][auth2ecdsap256ca="[certmapping:yes|no][catype:root|intermediate (default=root)]| ..."][auth2ecdsap384ca="[certmapping:yes|no][catype:root|intermediate (default=root)]| ..."][qmpfs=dhgroup1|dhgroup2|dhgroup14|ecdhp256|ecdhp384|mainmode|none][qmsecmethods=authnoencap:+[valuemin]+[valuekb]|
ah:+esp:-+[valuemin]+[valuekb]|default][exemptipsecprotectedconnections=yes|no (default=no)][applyauthz=yes|no (default=no)]
Remarks:
- Sets a new parameter value on an identified rule. The command fails
if the rule does not exist. To create a rule, use the add command.
- Values after the new keyword are updated in the rule. If there are
no values, or keyword new is missing, no changes are made.
- A group of rules can only be enabled or disabled.
- If multiple rules match the criteria, all matching rules will be
updated.
- Rule name should be unique and cannot be "all".
- Auth1 and auth2 can be comma-separated lists of options.
- Computerpsk and computerntlm methods cannot be specified together
for auth1.
- Computercert cannot be specified with user credentials for auth2.
- Certsigning options ecdsap256 and ecdsap384 are only supported on
Windows Vista SP1 and later.
- Qmsecmethods can be a list of proposals separated by a ",".
- For qmsecmethods, integrity=md5|sha1|sha256|aesgmac128|aesgmac192|
aesgmac256|aesgcm128|aesgcm192|aesgcm256 and
encryption=3des|des|aes128|aes192|aes256|aesgcm128|aesgcm192|aesgcm256.
- If aesgcm128, aesgcm192, or aesgcm256 is specified, it must be used for
both ESP integrity and encryption.
- Aesgmac128, aesgmac192, aesgmac256, aesgcm128, aesgcm192, aesgcm256,
sha256 are only supported on Windows Vista SP1 and later.
- If qmsemethods are set to default, qmpfs will be set to default
as well.
- Qmpfs=mainmode uses the main mode key exchange setting for PFS.
- The use of DES, MD5 and DHGroup1 is not recommended. These
cryptographic algorithms are provided for backward compatibility
only.
- The " characters within CA name must be replaced with \'
- For auth1ca and auth2ca, the CA name must be prefixed by 'CN='.
- catype can be used to specify the Certification authority type -
catype=root/intermediate
- authnoencap is supported on Windows 7 and later.
- authnoencap means that the computers will only use authentication,
and will not use any per packet encapsulation or encryption
algorithms to protect subsequent network packets exchanged as part
of this connection.
- QMPFS and authnoencap cannot be used together on the same rule.
- AuthNoEncap must be accompanied by at least one AH or ESP integrity
suite.
- When mode=tunnel action must be requireinrequireout, requireinclearout
or noauthentication.
- requireinclearout is not valid when mode=Transport.
- applyauthz can only be specified for tunnel mode rules.
- exemptipsecprotectedconnections can only be specified
for tunnel mode rules. By setting this flag to "Yes",
ESP traffic will be exempted from the tunnel.
AH only traffic will NOT be exempted from the tunnel.
- Port1, Port2 and Protocol can only be specified when mode=transport.
- Valuemin(when specified) for a qmsecmethod should be between 5-2880
minutes. Valuekb(when specified) for a qmsecmethod should be
between 20480-2147483647 kilobytes.
Examples:
Rename rule1 to rule 2:
netsh advfirewall consec set rule name="rule1" new
name="rule2"
Change the action on a rule:
netsh advfirewall consec set rule name="rule1"
endpoint1=1.2.3.4 endpoint2=4.3.2.1 new action=requestinrequestout
Add a rule with custom quick mode proposals:
netsh advfirewall consec set rule name="Custom QM" new
endpoint1=any endpoint2=any
qmsecmethods=authnoencap:aesgmac256,ah:aesgmac256+esp:aesgmac256-none