centos6.4停止防火墙
CentOS6关闭防火墙使用以下命令,<br>//临时关闭 service iptables stop //禁止开机启动 chkconfig iptables off<br>CentOS7中若使用同样的命令会报错,<br>stop iptables.service Failedtostop iptables.service: Unit iptables.servicenot loaded.<br>这是因为CentOS7版本后防火墙默认使用firewalld,因此在CentOS7中关闭防火墙使用以下命令,<br>//临时关闭 systemctl stop firewalld //禁止开机启动 systemctl disable firewalld Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.<br>当然,如果安装了iptables-service,也可以使用下面的命令,<br>yum install-y iptables-services//关闭防火墙 service iptables stop Redirectingto /bin/systemctl stop iptables.service //检查防火墙状态 service iptables status Redirectingto /bin/systemctl status iptables.service 鈼iptables.service- IPv4 firewallwith iptables Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled; vendor preset: disabled) Active: inactive (dead)
@echo offREM 关闭“为 Internet 连接共享和 Windows防火墙提供第三方协议插件的支持”sc config alg start= disabledREM 关闭“Windows自动更新功能”sc config wuauserv start= disabledREM 关闭“剪贴簿查看器”sc config clipsrv start= disabledREM 关闭“Messenger”sc config Messenger start= disabledREM 关闭“通过NetMeeting远程访问此计算机”sc config mnmsrvc start= disabledREM 关闭“打印后台处理程序”sc config Spooler start= disabledREM 关闭“远程修改注册表”sc config RemoteRegistry start= disabledREM 关闭“监视系统安全设置和配置”sc config wscsvc start= disabledREM 关闭“系统还原”sc config srservice start= disabledREM 关闭“计划任务”sc config Schedule start= disabledREM 关闭“TCP/IP NetBIOS Helper”sc configlmhostsstart= disabledREM 关闭“Telnet服务”sc config tlntsvr start= disabledREM 关闭“防火墙服务”sc config sharedaccess start= disabledREM 关闭“Computer Browser”sc config Browser start= disabledREM 关闭“错误报警”sc config Alerter start= disabledREM 关闭“错误报告”sc config ERSvc start= disabledREM 关闭“本地和远程计算机上文件的索引内容和属性”sc config cisvc start= disabledREM 关闭“管理卷影复制服务拍摄的软件卷影复制”sc config SwPrv start= disabledREM 关闭“支持网络上计算机 pass-through 帐户登录