LMLPHP后院

Windows 远程关闭防火墙技术

maybe yes 发表于 2023-06-24 11:01

这个事情困扰了我多次了,以至于我要记录一下。

众所周知,软件都是越来越难用的,为什么会这样呢,因为门槛越来越高,以至于大部分人类都脱节了,而大型软件服务商总是担心别人的安全,于是一道又一道门槛建立起来了。

比如苹果手机的,每次连接 WIFI 网络的 MAC 地址都不一样,导致每次查看路由器都会出现陌生的设备。

比如 Windows 的防火墙,XP 时代应该没有影响,后来不知道什么时候开始,强制开启了。

比如 Chrome 浏览器,总是莫名其妙的提醒用户,"您要访问的是诈骗网站 x.x.x.x 上的攻击者可能会诱骗您做一些危险的事情,例如安装软件或泄露您的个人信息(如密码、电话号码或信用卡信息)。了解详情" 或者是 钓鱼网站 等等。

这样的例子,数不胜数。世界正在朝着没有意思的方向发展。我真的是觉得这些软件厂商们想多了,或者是干了很多分外的事情,这个不应该是你管了,并且你也管不好。

C:\Users\lin>netsh firewall show state

Firewall status:
-------------------------------------------------------------------
Profile                           = Standard
Operational mode                  = Enable
Exception mode                    = Enable
Multicast/broadcast response mode = Enable
Notification mode                 = Enable
Group policy version              = Windows Defender Firewall
Remote admin mode                 = Disable

Ports currently open on all network interfaces:
Port   Protocol  Version  Program
-------------------------------------------------------------------
No ports are currently open on all network interfaces.

IMPORTANT: Command executed successfully.
However, "netsh firewall" is deprecated;
use "netsh advfirewall firewall" instead.
For more information on using "netsh advfirewall firewall" commands
instead of "netsh firewall", see KB article 947709
at https://go.microsoft.com/fwlink/?linkid=121488 .

执行之后再看,Operational mode 已经显示 Disable 了。

C:\Users\lin>netsh firewall set opmode mode=disable

IMPORTANT: Command executed successfully.
However, "netsh firewall" is deprecated;
use "netsh advfirewall firewall" instead.
For more information on using "netsh advfirewall firewall" commands
instead of "netsh firewall", see KB article 947709
at https://go.microsoft.com/fwlink/?linkid=121488 .

Ok.


C:\Users\lin>netsh firewall show state              

Firewall status:
-------------------------------------------------------------------
Profile                           = Standard
Operational mode                  = Disable
Exception mode                    = Enable
Multicast/broadcast response mode = Enable
Notification mode                 = Enable
Group policy version              = Windows Defender Firewall
Remote admin mode                 = Disable

Ports currently open on all network interfaces:
Port   Protocol  Version  Program
-------------------------------------------------------------------
No ports are currently open on all network interfaces.

IMPORTANT: Command executed successfully.
However, "netsh firewall" is deprecated;
use "netsh advfirewall firewall" instead.
For more information on using "netsh advfirewall firewall" commands
instead of "netsh firewall", see KB article 947709
at https://go.microsoft.com/fwlink/?linkid=121488 .

只能说,幸好开启了 SSH 服务端,并且 SSH 服务端不受 firewall 的管辖,可见 Windows 的软件管理之混乱。比如你要关闭 Windows 的自动重启功能,你会发现,这他妈 UI 设计的,一层又一层,风格都完全不一样了。

2024-11-22 06:01:03 1732226463 0.019905