如何在xp下通过命令行对防火墙进行配置

安全 企业动态
本文是一个XP自带的firewall的命令行操作手册

命令:

netsh firewall

参数:

? // 显示命令列表

add // 添加防火墙配置

delete // 删除防火墙配置

dump // 显示一个配置脚本

help // 显示命令列表

reset // 将防火墙配置重置为默认值。

set // 设置防火墙配置

show // 显示防火墙配置

add allowedprogram // 添加防火墙允许的程序配置。

add portopening // 添加防火墙端口配置

delete allowedprogram // 删除防火墙允许的程序配置

delete portopening // 删除防火墙端口配置

set allowedprogram // 设置防火墙允许的程序配置

set icmpsetting // 设置防火墙 ICMP 配置

set logging // 设置防火墙记录配置

set multicastbroadcastresponse // 设置防火墙多播/广播响应配置

set notifications // 设置防火墙通知配置

set opmode // 设置防火墙操作配置

set portopening // 设置防火墙端口配置

set service // 设置防火墙服务配置

show allowedprogram // 显示防火墙允许的程序配置

show config // 显示防火墙配置。

show currentprofile // 显示当前防火墙配置文件

show icmpsetting // 显示防火墙 ICMP 配置

show logging // 显示防火墙记录配置

show multicastbroadcastresponse // 显示防火墙多播/广播响应配置

show notifications // 显示防火墙操作配置

show opmode // 显示防火墙端口配置

show portopening // 显示防火墙端口配置

show service // 显示防火墙服务配置

show state // 显示当前防火墙状态

例如:

命令:

netsh firewall show allowedprogram //查看防火墙放行的程序

netsh firewall set portopening TCP 445 ENABLE //打开445端口

netsh firewall set portopening TCP 3389 ENABLE //不用说了,放行终端啦。。

netsh firewall delete allowedprogram C:\A.exe //删除放行程序A.exe

netsh firewall set allowedprogram C:\A.exe A ENABLE //添加程序C盘下的A.exe并放行

netsh firewall add allowedprogram C:\A.exe A ENABLE //添加程序C盘下的A.exe并放行 

责任编辑:王文文 来源: guochao205的空间
相关推荐

2020-04-13 07:00:00

Fedora防火墙系统运维

2010-03-24 14:23:11

CentOS防火墙

2010-09-14 10:30:55

Cisco PIX防火

2017-01-05 15:15:59

UFWUbuntu配置防火墙

2011-07-19 10:06:16

2011-03-16 12:46:29

CentOSiptables防火墙

2014-05-04 10:58:18

Linux命令行Linux发行版

2012-07-10 10:39:48

Linux防火墙

2022-04-01 12:51:44

命令Containerd

2010-09-14 09:44:06

2011-09-29 10:38:46

IPv6防火墙

2010-09-14 14:30:29

2009-06-23 16:57:28

2010-09-25 16:46:28

2014-09-16 10:09:40

Linux

2015-10-19 17:16:10

天气预报命令行Linux

2011-03-15 15:47:15

Iptables防火墙

2010-09-14 14:26:50

2009-12-09 14:34:58

2020-05-28 09:51:11

Web安全WAF漏洞
点赞
收藏

51CTO技术栈公众号