|
我在网吧做了LINUX代理服务器
做好了以后
客户机每次上网都要重新启动下网络连接才能上网
不知道什么原因
大家看看
两个网卡
ETH0是内网
ETH1是外网
rc.fw内容是:
#!/bin/sh
/sbin/modprobe ip_tables
/sbin/modprobe ip_nat_ftp
/sbin/modprobe ip_conntrack_ftp
/sbin/iptables -F
/sbin/iptables -F -t nat
/sbin/iptables -X
/sbin/iptables -Z
/sbin/iptables -P INPUT ACCEPT
/sbin/iptables -P FORWARD ACCEPT
/sbin/iptables -P OUTPUT ACCEPT
#/sbin/iptables -A FORWARD -d 219.137.43.172 -j DROP
#/sbin/iptables -A FORWARD -d 222.190.30.243 -j DROP
echo "1"> /proc/sys/net/ipv4/ip_forward
echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
echo "1">/proc/sys/net/ipv4/tcp_syncookies
/sbin/iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
/sbin/iptables -A FORWARD -s 0/0 -d 0/0 -j ACCEPT
rc.local文件内容是:
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
./etc/rc.d/rc.fw
我的LINUX版本是REDHAT9.03
还有请教个问题
我网吧用两个网段,客户机就有了两个网关
我应该怎么做?
先谢谢大家了~ |
|