怎样通过命令管理Windows7桌面防火墙

(1)启用桌面防火墙
netsh advfirewall set allprofiles state on
(2)设置默认输入和输出策略
netsh advfirewall set allprofiles firewallpolicy allowinbound,allowoutbound
以上是设置为允许,如果设置为拒绝使用blockinbound,blockoutbound
(3)关闭tcp协议的139端口
netsh advfirewall firewall add rule name="deny tcp 139" dir=in protocol=tcp localport=139 action=block
(4)关闭udp协议的139端口
netsh advfirewall firewall add rule name="deny udp 139" dir=in protocol=udp localport=139 action=block
(5)关闭tcp协议的445端口
netsh advfirewall firewall add rule name="deny tcp 445" dir=in protocol=tcp localport=445 action=block
(6)关闭udp协议的445端口
netsh advfirewall firewall add rule name="deny udp 445" dir=in protocol=udp localport=445 action=block
(7)使用相同的方法,依次关闭TCP协议的21、22、23、137、138、3389、5800、5900端口。
netsh advfirewall firewall add rule name= "deny tcp 21" dir=in protocol=tcp localport=21 action=block
netsh advfirewall firewall add rule name= "deny tcp 22" dir=in protocol=tcp localport=22 action=block
netsh advfirewall firewall add rule name= "deny tcp 23" dir=in protocol=tcp localport=23 action=block
netsh advfirewall firewall add rule name= "deny tcp 3389" dir=in protocol=tcp localport=3389 action=block  学习电脑
netsh advfirewall firewall add rule name= "deny tcp 5800" dir=in protocol=tcp localport=5800 action=block
netsh advfirewall firewall add rule name= "deny tcp 5900" dir=in protocol=tcp localport=5900 action=block
netsh advfirewall firewall add rule name= "deny tcp 137" dir=in protocol=tcp localport=137 action=block
netsh advfirewall firewall add rule name= "deny tcp 138" dir=in protocol=tcp localport=138 action=block
(8)执行完毕后暂停
pause
echo 按任意键退出
2.恢复初始配置
(1)恢复初始防火墙设置
netsh advfirewall reset
(2)关闭防火墙
netsh advfirewall set allprofiles state off

转载于:https://www.cnblogs.com/chinhr/archive/2012/11/20/2778839.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/377075.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

ruby推送示例_Ruby for循环示例

ruby推送示例for循环 (The for loop) In programming, for loop is a kind of iteration statement which allows the block to be iterated repeatedly as long as the specified condition is not met or a specific number of times that the programmer knows beforehand. …

《DBNotes: Buffer Pool对于缓冲页的链表式管理》

目录Buffer Pool回顾Buffer Pool内部组成freelistflushlistLRU链表管理以及改进Buffer Pool回顾 我们知道针对数据库的增删改删操作都是在Buffer Pool中完成的,一条sql的执行步骤可以认为是这样的: 1、innodb存储引擎首先在缓冲池中查询有没有对应的数据…

一个延时调用问题

如果用下面第1行的写法,调用 [NSObject cancelPreviousPerformRequestsWithTarget:self selector:selector(removeFromSuperview) object:nil]; 可以生效 如果用下面第3行的写法,调用 [NSObject cancelPreviousPerformRequestsWithTarget:self selector:…

onclicklistener 方法使用汇总

相信很多像我一样的新手学习ANDROID开发会遇到这个问题,通过这几天的归类和总结,将我的理解写在下面,欢迎大家一起前来讨论: 以按钮BUTTON的监听事件为例,以下的监听实现都是等价的: 1.使用接口继承按钮监听…

《源码分析转载收藏向—数据库内核月报》

月报原地址: 数据库内核月报 现在记录一下,我可能需要参考的几篇文章吧,不然以后还得找: MySQL 代码阅读 MYSQL开源软件源码阅读小技巧 MySQL 源码分析 聚合函数(Aggregate Function)的实现过程 MySQL …

vim中的jk为什么是上下_JK的完整形式是什么?

vim中的jk为什么是上下JK:开玩笑 (JK: Just Kidding) JK is an abbreviation of "Just Kidding". JK是“ Just Kidding”的缩写 。 It is an expression, which is commonly used in messaging or chatting on social media networking sites like Faceb…

百度归来的学长做报告

今天下午下课到现在才总算闲下来,本来计划这个时间应该是读英语,做英语模拟题的时间,但是,我不得不写点什么来记录下刚才的事——在百度实习并且签下工作的学长做报告。 原本认为每个人的成功(请允许我目前的眼光签个好…

转:Google论文之三----MapReduce

文章来自于:http://www.cnblogs.com/geekma/p/3139823.html MapReduce:大型集群上的简单数据处理 摘要 MapReduce是一个设计模型,也是一个处理和产生海量数据的一个相关实现。用户指定一个用于处理一个键值(key-value)…

合约 cd 模式_CD的完整形式是什么?

合约 cd 模式CD:光盘 (CD: Compact Disc) CD is an abbreviation of "Compact Disc". CD是“ Compact Disc”的缩写 。 It is a digital optical disc originally developed to store the audio of recordings in the format of a data file used as a p…

《DBNotes:Join算法的前世今生》

目录NestLoopJoin算法Simple Nested-Loop JoinIndex Nested-Loop JoinBlock Nested-Loop JoinBatched Key AccessHash Join算法In-Memory Join(CHJ)On-Disk Hash Join参考链接在8.0.18之前,MySQL只支持NestLoopJoin算法,最简单的就是Simple NestLoop Joi…

如何解决迅雷插件导致IE10崩溃的问题

Windows 8里面带的IE10酷不酷?沉浸式界面果然不同凡响,IE10让人几乎认不出来了!这是微软的浏览器么?上面这张图是Windows8下Metro UI的新界面IE10,不过当我们切换回传统桌面的时候,也有IE10的经典版的。好吧…

UNITY3D与iOS交互解决方案

原地址:http://bbs.18183.com/thread-456979-1-1.html 本帖最后由 啊,将进酒 于 2014-2-27 11:17 编辑 “授人以鱼,不如授人以渔”,以UNITY3D调用iOS版的91SDK为例,利用C# / C / OBJ-C交互原理,本文将详细介绍UNITY3D与iOS之间交互…

c:if equal_C ++中的std :: equal()

c:if equalequal()作为STL函数 (equal() as a STL function) Syntax: 句法: bool equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2);Where, 哪里, InputIterator1 first iterator to start of the first sequence range I…

《DBNotes:Buffer Pool刷脏页细节以及改进》

本笔记知识沿用之前DBNotes: Buffer Pool对于缓冲页的链表式管理的部分知识 目录获取一个空闲页的源码逻辑Page_Cleaner_ThreadLRU_Manager_ThreadHazard Pointer作为驱逐算法改进参考获取一个空闲页的源码逻辑 任何一个读写请求都需要从Buffer pool来获取所需页面。如果需要的…

WordPress删除数据中标题重复文章的方法

一种是删除重复的方法是:使用插件,大家可以去官网上下载 二种删除重复的方法是:登录数据库,使用sql语句删除,具体的语句为如下代码: CREATE TABLE my_tmp AS SELECT MIN(ID) AS col1 FROM wp_posts GROUP BY post_titl…

hibernate配置

hibernate.cfg.xml <?xml version"1.0" encoding"UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC"-//Hibernate/Hibernate Configuration DTD 3.0//EN""http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd&quo…

html中表单元素_HTML中的表单元素

html中表单元素1)<input>元素 (1) The <input> Element) The <input> element is used to get input from the user in an HTML form. <input>元素用于以HTML形式从用户获取输入。 <input> tag is used to get input using input element, the …

《搜索算法——DFS、BFS、回溯》

目录深搜200. 岛屿数量695. 岛屿的最大面积130. 被围绕的区域547. 省份数量417. 太平洋大西洋水流问题回溯广搜111. 二叉树的最小深度752. 打开转盘锁深搜与广搜结合934. 最短的桥深搜 深搜DFS&#xff0c;在搜索到一个新节点时&#xff0c;立即对该新节点进行遍历&#xff0c…

AP in R

AP聚类算法是目前十分火的一种聚类算法&#xff0c;它解决了传统的聚类算法的很多问题。不仅简单&#xff0c;而且聚类效果还不错。这里&#xff0c;把前两天学习的AP算法在R语言上面的模拟&#xff0c;将个人笔记拿出来与大家分享一下&#xff0c;不谈AP算法的原理&#xff0c…

nginx 模块解析

nginx的模块非常之多&#xff0c;可以认为所有代码都是以模块的形式组织&#xff0c;这包括核心模块和功能模块&#xff0c;针对不同的应用场合&#xff0c;并非所有的功能模块都要被用到&#xff0c;附录A给出的是默认configure&#xff08;即简单的http服务器应用&#xff09…