查看防火墙状态:
netsh advfirewall show allprofiles
关闭windows上防火墙:
netsh advfirewall set allprofiles state off
重新启动系统后,Windows防火墙将不再处于活动状态。如果要再次启用防火墙,请使用以下命令:
netsh advfirewall set allprofiles state on
不关闭防火墙将sshd添加入站规则,并开放22号端口:
netsh advfirewall firewall add rule name=sshd dir=in action=allow protocol=TCP localport=22