http://www.csdn.net/ http://www.arm.com/zh/ https://www.kernel.org/ http://www.linuxpk.com/ http://www.51develop.net/ http://linux.chinaitlab.com/ http://www.embeddedlinux.org.cn http://bbs.pediy.com/
分类: LINUX
2013-01-29 16:24:51
操作系统: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