zoukankan      html  css  js  c++  java
  • netsh学习

    show allowedprogram –显示被允许的程序配置

    show config - 显示防火墙的配置

    show currentprofile -显示 Windows 防火墙的当前配置文件.

    show icmpsetting -显示 Windows 防火墙中的 ICMP 配置

    show logging -显示 Windows 防火墙中的日志记录配置

    show multicastbroadcastresponse –显示防火墙的组播/广播响应配置

    show notifications -显示 Windows 防火墙中的通知配置

    show opmode -显示 Windows 防火墙中的操作配置

    show portopening -显示 Windows 防火墙中的端口配置

    show service -显示 Windows 防火墙中的服务配置

    show state -显示 Windows 防火墙的当前状态

    当然,如果想精确配置防火墙,请使用如下的命令:

    netsh firewall set allowedprogram 编辑 Windows 防火墙中的允许程序配置

    netsh firewall set icmpsettings 编辑 Windows 防火墙中的 ICMP 配置

    netsh firewall set logging 编辑 Windows 防火墙中的日志记录配置

    netsh firewall set notifications 编辑 Windows 防火墙中的通知配置

    netsh firewall set opmode 编辑 Windows 防火墙中的操作配置

    netsh firewall set portopening 编辑 Windows 防火墙中的端口配置

    netsh firewall set service 编辑 Windows 防火墙中的服务配置

    delete portopening 用于删除现有的基于端口例外。

    delete allowedprogram 用于删除现有的基于程序例外。

    add allowedprogram 用于添加基于程序的例外。

    add portopening 用于创建基于端口的例外。

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

    dump 显示一个配置脚本。

    例子
    进入 Windows 防火墙的全局操作模式,并且打开TCP 80端口允许http访问,
    依次使用命令:
    “ set opmode enable”
    “add portopening TCP 80 "My Web Port"”
    “add portopening protocol=ALL port=53 name=DNS mode=ENABLE scope=CUSTOM”


    打开端口实现文件和打印共享
    需要打开137和138 UDP端口.,139和 445 TCP端口依次使用命令:
    “add portopening UDP 137 blah enable subnet”
    “ add portopening UDP 138 blah enable subnet”
    “add portopening TCP 139 blah enable subnet”
    “add portopening TCP 445 blah enable subnet”

  • 相关阅读:
    TCP/IP 协议体系结构模型
    A*算法详解
    导航规划之CH算法介绍
    Crp(customizable route planning) 算法介绍
    机器学习面试题总结(笔记)
    机器学习面试问题总结
    机器学习面试常见问题
    seata-微服务集成seata
    seata-部署seata连接nacos
    Sentinel授权规则-规则管理三种模式
  • 原文地址:https://www.cnblogs.com/sprinng/p/6549860.html
Copyright © 2011-2022 走看看