windows 防火墙批量设置出站规则 - NOTEBOOK
windows 防火墙批量设置出站规则
系统脚本/命令发布于 2026-11-05
摘要 : alt + R 输入:wf.msc , 可以打开Windows Defender 防火墙。
如果要阻止某些 adobe 程序联网,只要增加”出站规则“即可,可以设置只拦截外网访问、放行内网访问。
可以使用 CMD 命令批量设置出站规则。
alt + R 输入:
wf.msc
可以打开Windows Defender 防火墙。
如果要阻止某些 adobe 程序联网,只要增加”出站规则“即可。
可以通过 CMD 代码批量录入防火墙规则,(
右键以管理员身份运行)例如:
netsh advfirewall firewall add rule name="阻止Notepad" dir=out program="C:\Windows\notepad.exe" action=block profile=any enable=yes
//下面这行是双向示例,按需打开
netsh advfirewall firewall add rule name="阻止XX软件_IN" dir=in program="D:\test\a.exe" action=block profile=any enable=yes
如果想要设置内网放行、外网阻止,则一个程序需要设置2条规则:
//1. 允许该程序出站访问局域网 LocalSubnet
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\xxx\app.exe" remoteip=LocalSubnet protocol=any enable=yes profile=private
//2. 阻止该程序出站访问任意(外网)
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\xxx\app.exe" remoteip=any protocol=any enable=yes profile=private
例如:
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\Acrobat.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\Acrobat.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\ADNotificationManager.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\ADNotificationManager.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\acrotray.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\acrotray.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\AdobeCollabSync.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\AdobeCollabSync.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\acrodist.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\acrodist.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\CRWindowsClientService.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\CRWindowsClientService.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\LogTransport2.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\LogTransport2.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\Eula.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\Eula.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\AcroShareTarget.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\AcroShareTarget.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\AcroTextExtractor.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\AcroTextExtractor.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\AcroBroker.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\AcroBroker.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\acrobat_sl.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\acrobat_sl.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\NGL\cefWorkflow\adobe_licensing_wf_acro.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\NGL\cefWorkflow\adobe_licensing_wf_acro.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\NGL\cefWorkflow\adobe_licensing_wf_helper_acro.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\NGL\cefWorkflow\adobe_licensing_wf_helper_acro.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\GC\AGSService.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\GC\AGSService.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\OSSLLibs\AdobeFips.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\OSSLLibs\AdobeFips.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\RDCNotificationClient\FullTrustNotifier.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\RDCNotificationClient\FullTrustNotifier.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\x64\CreatePDFPrinterUtility64.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\x64\CreatePDFPrinterUtility64.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\x86\Acrobat\Acrobat.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\x86\Acrobat\Acrobat.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\AcrobatInfo.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\AcrobatInfo.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\ADelRCP.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\ADelRCP.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\Adobe Crash Processor.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\Adobe Crash Processor.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\CRLogTransport.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\CRLogTransport.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\CRWindowsClientService.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\CRWindowsClientService.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Acrobat DC\Acrobat\ShowAppPickerforPDF.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Acrobat DC\Acrobat\ShowAppPickerforPDF.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Adobe Creative Cloud Experience\CCXProcess.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Adobe Creative Cloud Experience\CCXProcess.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Adobe Creative Cloud Experience\libs\node.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Adobe Creative Cloud Experience\libs\node.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Photoshop 2024\Photoshop.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Photoshop 2024\Photoshop.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Photoshop 2024\node.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Photoshop 2024\node.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Photoshop 2024\LogTransport2.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Photoshop 2024\LogTransport2.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Photoshop 2024\CRWindowsClientService.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Photoshop 2024\CRWindowsClientService.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Adobe Illustrator 2022\Support Files\Contents\Windows\Illustrator.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Adobe Illustrator 2022\Support Files\Contents\Windows\Illustrator.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Adobe Illustrator 2022\Support Files\Contents\Windows\LogTransport2.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Adobe Illustrator 2022\Support Files\Contents\Windows\LogTransport2.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Adobe Illustrator 2022\Support Files\Contents\Windows\CRLogTransport.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Adobe Illustrator 2022\Support Files\Contents\Windows\CRLogTransport.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Adobe Illustrator 2022\Support Files\Contents\Windows\CRWindowsClientService.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Adobe Illustrator 2022\Support Files\Contents\Windows\CRWindowsClientService.exe" remoteip=any protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=allow program="C:\Program Files\Adobe\Adobe Illustrator 2022\Support Files\Contents\Windows\AIRobin.exe" remoteip=LocalSubnet protocol=any enable=yes profile=any
netsh advfirewall firewall add rule name="阻止 Adobe外网" dir=out action=block program="C:\Program Files\Adobe\Adobe Illustrator 2022\Support Files\Contents\Windows\AIRobin.exe" remoteip=any protocol=any enable=yes profile=any