工具/原材料
win7电脑。
1、打开电脑同时按“win+R”快捷键打开运行命令的窗口;
/iknow-pic.cdn.bcebos.com/7e3e6709c93d70cf2dce0442f6dcd100baa12b4c"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/7e3e6709c93d70cf2dce0442f6dcd100baa12b4c?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/7e3e6709c93d70cf2dce0442f6dcd100baa12b4c"/>
2、打开运行命令的窗口以后,在打开栏里输入“services.msc”的命令;
/iknow-pic.cdn.bcebos.com/faedab64034f78f0ba7d34bc77310a55b3191c0e"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/faedab64034f78f0ba7d34bc77310a55b3191c0e?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/faedab64034f78f0ba7d34bc77310a55b3191c0e"/>
3、打开命令以后,在弹出的界面可中找到并双击Windowsfirewall防火墙的设置;
/iknow-pic.cdn.bcebos.com/dc54564e9258d1094f8407fddf58ccbf6c814d1e"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/dc54564e9258d1094f8407fddf58ccbf6c814d1e?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/dc54564e9258d1094f8407fddf58ccbf6c814d1e"/>
4、双击打开防火墙以后,在弹出对话框中将启动类型设置成禁用即可关闭防火墙。
/iknow-pic.cdn.bcebos.com/d058ccbf6c81800a18c82041bf3533fa828b474b"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/d058ccbf6c81800a18c82041bf3533fa828b474b?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/d058ccbf6c81800a18c82041bf3533fa828b474b"/>
关闭防火墙命令:systemctl stop firewalld.service开启防火墙:systemctl start firewalld.service
关闭开机自启动:systemctl disable firewalld.service
开启开机启动:systemctl enable firewalld.service
1. 永久性生效
开启:chkconfig iptables on
关闭:chkconfig iptables off
2. 即时生效,重启后失效
开启:service iptables start
关闭:service iptables stop
所谓防火墙指的是一个由软件和硬件设备组合而成、在内部网和外部网之间、专用网与公共网之间的界面上构造的保护屏障。是一种获取安全性方法的形象说法,它是一种计算机硬件和软件的结合,使Internet与Intranet之间建立起一个安全。
需要说明的是对于Linux下的其它服务都可以用以上命令执行开启和关闭操作。在开启了防火墙时,做如下设置,开启相关端口,修改/etc/sysconfig/iptables文件,添加以下内容:-ARH-Firewall-1-INPUT-mstate——stateNEW-mtcp-ptcp——dport80-jACCEPT-ARH-Firewall-1-INPUT-mstate——stateNEW-mtcp-ptcp——dport22-jACCEPT或者:/etc/init.d/iptablesstatus会得到一系列信息,说明防火墙开着。
欢迎分享,转载请注明来源:夏雨云
评论列表(0条)