分类: LINUX
2014-09-21 13:02:18
原文地址:linux下防火墙的开启和关闭 作者:andyhzw
操作系统:ubuntu 11.10 / CentOS 6.3
firewall_close.sh:
#!/bin/bash #centos begin #check the firewall status #/etc/init.d/iptables stutas #Temporary closed firewall #/etc/init.d/iptables stop #Permanent closed firewall #chkconfig iptables off #centos end #ubuntu begin #check the firewall status ufw status #Temporary closed firewall ufw disable #ubuntu end exit
firewall_open.sh:
#!/bin/bash #centos begin #check the firewall status #/etc/init.d/iptables stutas #Temporary closed firewall #/etc/init.d/iptables start #Permanent closed firewall #chkconfig iptables on #centos end #ubuntu begin #check the firewall status ufw status #Temporary open firewall ufw enable #ubuntu end exit