免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1885 | 回复: 2
打印 上一主题 下一主题

[proxy] 【求助】我用脚本启动代理,出现下面的提示。那位指定一二?! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-09-05 11:55 |只看该作者 |倒序浏览
Starting firewall /lib/modules/2.4.18-14smp/kernel/net/ipv4/netfilter/ipchains.o
: init_module: Device or resource busy
Hint: insmod errors can be caused by incorrect module parameters, including inva
lid IO or IRQ parameters.
      You may find more information in syslog or the output from dmesg
/lib/modules/2.4.18-14smp/kernel/net/ipv4/netfilter/ipchains.o: insmod /lib/modu
les/2.4.18-14smp/kernel/net/ipv4/netfilter/ipchains.o failed
/lib/modules/2.4.18-14smp/kernel/net/ipv4/netfilter/ipchains.o: insmod ipchains
failed
/lib/modules/2.4.18-14smp/kernel/net/ipv4/netfilter/ipfwadm.o: init_module: Devi
ce or resource busy
Hint: insmod errors can be caused by incorrect module parameters, including inva
lid IO or IRQ parameters.
      You may find more information in syslog or the output from dmesg
/lib/modules/2.4.18-14smp/kernel/net/ipv4/netfilter/ipfwadm.o: insmod /lib/modul
es/2.4.18-14smp/kernel/net/ipv4/netfilter/ipfwadm.o failed
/lib/modules/2.4.18-14smp/kernel/net/ipv4/netfilter/ipfwadm.o: insmod ipfwadm fa
iled
Bad argument `ACCEPT'
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `ACCEPT'
Try `iptables -h' or 'iptables --help' for more information.
Input and output Sucess
./firewall: line 47: echo_success: command not found

论坛徽章:
0
2 [报告]
发表于 2003-09-05 11:57 |只看该作者

【求助】我用脚本启动代理,出现下面的提示。那位指定一二?!

脚本firewall如下:

#! /bin/sh

IPTABLES=/sbin/iptables
EXTERNAL="eth0"
INTERNAL="eth1"
IP=10.36.6.0.0/255.255.0.0


$IPTABLES -P INPUT ACCEPT
$IPTABLES -P FORWARD ACCEPT
$IPTABLES -P OUTPUT ACCEPT

$IPTABLES -t nat -P PREROUTING ACCEPT
$IPTABLES -t nat -P POSTROUTING ACCEPT
$IPTABLES -t nat -P OUTPUT ACCEPT

$IPTABLES -F
$IPTABLES -t nat -F


$IPTABLES -X
$IPTABLES -t nat -X

start() {
       echo -n $"Starting firewall "
       # Enable IPV4 Packet Forwarding
       echo 1 >; /proc/sys/net/ipv4/ip_forward
       for i in /lib/modules/`uname -r`/kernel/net/ipv4/netfilter/*
       do
               t=`echo $i |sed 's/\.o$//g'`
               module=`basename $t`
               modprobe $module
       done
      #
      #允许ICMP数据包(ping)
      $IPTABLES -A INPUT -p icmp -j ACCEPT

      #允许内部网之间的数据通讯

      $IPTABLES -A INPUT -i $INTERNAL -s $PRINET -j ACCEPT
      $IPTABLES -A OUTPUT -o $INTERNAL -d $PRINET -j ACCEPT
      echo "Input and output Sucess"


      $IPTABLES -t nat -A POSTROUTING -o $EXTERNAL -j MASQUERADE
      echo_success
}


stop(){
       echo -n $"Stopping Firewall"

       flush

       for i in /lib/modules/`uname -r`/kernel/net/ipv4/netfilter/*
       do
               t=`echo $i |sed 's/\.o$//g'`
              module=`basename $t`
               modprobe -r $module
       done

       # Disale IPV4 Packet Forwarding
       echo "0" >; /proc/sys/net/ipv4/ip_forward
       echo_success
}

restart()
{
       stop
       start
}

# See how we were called.
case "$1" in
       start)
               start
               ;;
       stop)
               stop
               ;;
       restart)
               restart
               ;;
       *)
               echo $"Usage: $0 {start|stop|restart}"
               exit 1
esac

论坛徽章:
0
3 [报告]
发表于 2003-09-09 10:39 |只看该作者

【求助】我用脚本启动代理,出现下面的提示。那位指定一二?!

有错误也可以成功,作为透明代理:)
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP