[问题]禁用防火墙时出这些是怎么回事?

漏洞扫描、网关、防火墙、补丁升级、数据备份和迁移、系统故障排除
回复
hodrag
帖子: 204
注册时间: 2008-03-09 12:32
送出感谢: 0
接收感谢: 0
联系:

[问题]禁用防火墙时出这些是怎么回事?

#1

帖子 hodrag » 2008-09-18 11:19

我想暂时禁用防火墙,guarddog输出:
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin
FILTERSYS=0
if [ -e /sbin/ipchains ]; then
FILTERSYS=1
fi;
if [ -e /usr/sbin/ipchains ]; then
FILTERSYS=1
fi;
if [ -e /usr/local/sbin/ipchains ]; then
FILTERSYS=1
fi;
# Check for iptables support.
if [ -e /proc/sys/kernel/osrelease ]; then
KERNEL_VERSION=`sed "s/^\([0-9][0-9]*\.[0-9][0-9]*\).*\$/\1/" < /proc/sys/kernel/osrelease`
if [ $KERNEL_VERSION == "2.6" ]; then
KERNEL_VERSION="2.4"
fi;
if [ $KERNEL_VERSION == "2.5" ]; then
KERNEL_VERSION="2.4"
fi;
if [ $KERNEL_VERSION == "2.4" ]; then
if [ -e /sbin/iptables ]; then
FILTERSYS=2
fi;
if [ -e /usr/sbin/iptables ]; then
FILTERSYS=2
fi;
if [ -e /usr/local/sbin/iptables ]; then
FILTERSYS=2
fi;
fi;
fi;
if [ $FILTERSYS -eq 0 ]; then
echo "ERROR Can't determine the firewall command! (Is ipchains or iptables installed?)"
fi;
if [ $FILTERSYS -eq 1 ]; then
echo "Using ipchains."
echo "Resetting firewall rules."
ipchains -P output ACCEPT
ipchains -P input ACCEPT
ipchains -P forward ACCEPT
ipchains -F forward
ipchains -F input
ipchains -F output
fi
if [ $FILTERSYS -eq 2 ]; then
echo "Using iptables."
echo "Resetting firewall rules."
iptables -P OUTPUT ACCEPT
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -F FORWARD
iptables -F INPUT
iptables -F OUTPUT
fi;
echo "Finished."

是权限问题吗?
hodrag
帖子: 204
注册时间: 2008-03-09 12:32
送出感谢: 0
接收感谢: 0
联系:

#2

帖子 hodrag » 2008-09-18 22:43

我把这些做成一个脚本执行了,就是不知道效果怎么样
回复

回到 “服务器维护和硬件相关”