netsh advfirewall firewall add rule name=新端口 protocol=TCP localport=新端口 dir=in action=allow 本文以33088端口为例,用管理员身份在命令提示符下运行下面命令,便可在Windows防火墙中开启33088端口。 netsh advfirewall firewall add rule name=33088 protocol=TCP localport=33088 dir=in action=allow 以上...
防火墙添加端口指令一、Firewall开启80端口 (1)查看firewall防火墙版本。 firewall-cmd --version # 0.4.4.4 (2)查看firewall防火墙的状态。...firewall-cmd --state # running (3)在firewall中添加80端口的权限。提示成...
6 接着把上面的测试防火墙设置删除掉:netsh firewall delete portopening protocol=TCP port=3389当然,系统会同样出现相同的提示。7 既然系统都建议使用advfirewall这个参数了,下面来看看这个参数:8 同样的,假设添加本地的TCP的3389端口对外开放:netsh advfirewall firewall add rule name=baidujingyan dir=in ac...
netsh advfirewall firewall add rule name="Open Port 443" dir=in action=allow protocol=TCP localport=443 Here is how you'd open the same ports for only the Domain and Private profiles (not Public) with PowerShell: New-NetFirewallRule -DisplayName 'HTTP(S) Inbound' -Profile @('Domain'...
# 开启防火墙:netsh advfirewallsetallprofiles state on 1. 2. #关闭防火墙:netsh advfirewallsetallprofiles state off 1. 2. 3.2 入站出站规则设置 添加入站规则 # 允许netsh advfirewall firewalladdrulename=xiaomu1dir=inaction=allowprotocol=tcplocalport=5000# 阻止netsh advfirewall firewalladdrulename...
netsh advfirewall firewall add rule name = SQLPort dir = in protocol = tcp action = allow localport = 1433 remoteip = localsubnet profile = DOMAIN 如需使用 netsh 來設定 SQL Server 的指令碼,請參閱<如何在執行 Windows XP Service Pack 的系統上使用指令碼,以程式設計方式開啟 SQL Server 所使...
netsh advfirewall firewall add rule name="SGAccessOutboundRule" dir=outprotocol=tcp action=allowremoteport=8061-8080,18061-18080 如果管理的环境中,安装了saltstack,执行命令如下: 1.入站规则 salt"DEV-SH-TTP-01"cmd.run “netsh advfirewall firewall add rule name="SGAccessInboundRule"dir=inprotoco...
netsh advfirewall firewall add rule name="SGAccessOutboundRule" dir=out protocol=tcp action=allow remoteport=8061-8080,18061-18080 如果管理的环境中,安装了saltstack,执行命令如下: 1.入站规则 salt "DEV-SH-TTP-01" cmd.run “netsh advfirewall firewall add rule name="SGAccessInboundRule" dir=...
echo 当前端口号为%CurrentPortNumber%,即将修改远程桌面端口 echo 自动添加防火墙规则 echo%date%%time%echo Designed by GeekLaozhang set/p c=请输入新的端口:if"%c%"==""goto end goto edit:edit netsh advfirewall firewall add rule name="RDPPORTLatest-TCP-In"dir=inaction=allow protocol=TCPlocalp...
运行命令:netsh firewall add portopening protocol=TCP port=135 name="RPC (TCP/135)" mode=ENABLE scope=SUBNET 运行命令:netsh firewall add allowedprogram program="%ProgramFiles%\Microsoft SQL Server\100\DTS\Binn\MsDtsSrvr.exe" name="SSIS Service" scope=SUBNET ...