我要投稿
  • 您当前的位置:365bet官方 -> 技术教程 -> 服务器网络 -> 服务器教程 -> LinuxBSD教程 -> 教程内容
  • [ 收藏本页教程 ]
  • 如何手动关闭端口LinuxBSD教程

    教程作者:佚名    教程来源:不详   教程栏目:LinuxBSD教程    收藏本页
    目的:因为看到前面几篇有关关闭端口的文章没有配图,有点难理解,也有不少朋友问到如何手动关闭端口,所以就写了篇很容易懂的文章来教大家如何关闭端口,希望能够帮助到需要的人~!
    方法1 防火墙拦截
      
    因为防火墙有拦截数据的功能,所以如果我们利用该功能将通往135端口的接收和发送数据全部拦截下来,就可以阻止他人连接我们的135端口了~
      我们以天网防火墙为例子,因为用的人多,操作也简单,一看就明白了~立刻行动吧!
      a.打开天网防火墙,可以见到如图所示的界面,单击“自定义规则”,我们要自己来增加一个规则,
      所以再单击“增加规则”。
      
    screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('/jishu511524532http://bbs.365dn.com/attachment/2710386e88f36e2.jpg');}" src="/images/jishuUploadPic2006-62006617172353401.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0>
      b.现在可以看到一个增加IP规则的对话框。
      规则的名称和说明没有限制,喜欢就好~不过为了方便查看,我们就叫“拦截135端口”   
      数据包方向:接收或发送(同时阻止通过135端口接收和发送数据)
      
      对方IP地址:任何地址
      
      数据包协议类型:TCP (因为135端口是一种TCP协议端口)
      
      本地端口:从135到135(定义了要拦截的端口只为135端口)
      
      对方端口:从0到0    (端口为0时为对方的任何端口)
      TCP标志:SYN
      
      当满足上面条件时:拦截
      好了,一个IP规则制作完成~确定!
      
    screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('/jishu511524532http://bbs.365dn.com/attachment/f77c7c9c1e5c3c3.jpg');}" src="/images/jishuUploadPic2006-62006617172353420.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0>
      c.如图:把我们刚刚制作好的规则放到同类规则的最顶端
      使用向上箭头直到不能再向上,并选上勾,然后保存(这一步忘记就白辛苦了|||)
      其它端口的关闭设置方法类似,如要开放端口,把‘拦截’改为‘通行’就可以了。
    screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://bbs.365dn.com/attachment/796db02a6c645b4.jpg');}" src="/images/jishuUploadPic2006-62006617172354355.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0>
    方法2 自定义安全策略
      如果我们手头暂时没有防火墙工具的话,那么可以利用http://www.chinahtml.com/systems/2/' target=_blank>Windowshttp://www.chinahtml.com/systems/' target=_blank>服务器自身的IP安全策略功能,来自定义一个拦截135端口的安全策略。
      
      a.打开控制面板,找到管理工具里面的本地安全设置。
    screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://bbs.365dn.com/attachment/382f8f332d08598.jpg');}" src="/images/jishuUploadPic2006-62006617172354235.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0>
      b.看到如图的界面,我们选择左边的IP安全策略,在本地机器
    screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://bbs.365dn.com/attachment/64a4344581ee0cb.jpg');}" src="/images/jishuUploadPic2006-62006617172354906.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0>
      然后在右边空白处单击右键,选择创建IP安全策略。出现了一个设置向导。点击下一步
       
    screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://bbs.365dn.com/attachment/2f01a651764b85d.jpg');}" src="/images/jishuUploadPic2006-62006617172354750.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0>
      名称也是看自己喜欢了,我们还是叫拦截135端口~下一步
      
      去掉激活默认响应规则的勾,下一步
    screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://bbs.365dn.com/attachment/8fc0902fba901e1.jpg');}" src="/images/jishuUploadPic2006-62006617172354509.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0>
      点击完成,我们就创建好了,
    screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://bbs.365dn.com/attachment/a304eb10900d78b.jpg');}" src="/images/jishuUploadPic2006-62006617172355388.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0>
      接下来设置我们用这个规则来干什么,我们是拦截135端口所以添加一个IP安全规则,单击添加(不需要向导所以去掉添加向导的勾)
    screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://bbs.365dn.com/attachment/ead14aad0476a13.jpg');}" src="/images/jishuUploadPic2006-62006617172355332.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL
    我要投稿   -   广告合作   -   关于本站   -   友情连接   -   网站地图   -   联系我们   -   版权声明   -   设为首页   -   加入收藏   -   网站留言
    Copyright © 2009 - 20012 www.www.ct131.com All Rights Reserved.365bet官方 版权所有