操作系统:ubuntu 11.10 / centos 6.3
2,防火墙打开脚本 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