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”

  • 相关阅读:
    手动安装pydev
    pyqt5猜数小程序
    python IDE之sublime真是个好东东
    python根据字典自动生成一组省和市名
    ubuntu编译安装postgresql
    python生成随机日期字符串
    chrome浏览器视频插件
    python @的用法
    PyQt5调入数据库数据在表格中显示
    计算机视觉2D几何基元及其变换介绍和OpenCV WarpPerspective源码分析
  • 原文地址:https://www.cnblogs.com/sprinng/p/6549860.html
Copyright © 2011-2022 走看看