有谁可以帮我一下让怎么让我的机器代理上网啊

由 无名小子 在 07-31-2003 22:28 发表:

有谁可以帮我一下让怎么让我的机器代理上网啊

我有两台机器一台装的是WIN2K和MANDRAKE9.0另外一台装的是RED HAT 9。0和win98我有谁可以告诉我怎么用WIN2K让RED HAT上网啊或着用MANDRAKE让

RED HAT9。0上网啊

我的WIN2K装了个ccproxy5.30做为代理软件不知道可以让他地理RED HAT LINUX上网,有谁可以告诉我怎么才能让WIN2K或MANDRAKE作为他让RED HAT的代理吗谢谢麻烦知道的告诉兄弟一下

我的机器已经可以相互PING通了WIN2K上用的是PPPOE虚礼拨号上网有谁可以帮我一下谢谢。


由 无名小子 在 08-01-2003 09:50 发表:


有水可以来帮帮我吗


由 空心菜 在 08-01-2003 15:18 发表:


#!/bin/bash

Script name: ipt_masq

A simple script for masquerading, used in Linux (kernel 2.4.x).

Copyleft 2002 by netman ([email protected]).

Redistribution of this file is permitted under the terms of

the GNU General Public License (GPL).

Date: 2002/02/04

Version: 1.2

PATH=/sbin:/usr/sbin:/bin:/usr/bin

RC_SQUID=/etc/rc.d/init.d/squid

EXT_IF=ppp0

INT_IF=eth1

ALLOWED_ICMP="0 3 3/4 4 11 12 14 16 18"

DENIED_ICMP="8"

------------- ensure iptables ----------

which iptables &>/dev/null || {

echo

echo "$(basename $0): iptables program is not found."

echo " Please install the program first."

echo

exit 1

}

------------- disable ipchains ----------

lsmod | grep ipchains &>/dev/null && {

echo "Disabling ipchains..."

rmmod ipchains &>/dev/null

}

------------- modules -----------

echo "Loading modules..."

modprobe ip_tables &>/dev/null || {

echo -n "$(basename $0): loading ip_tables module failure."

echo " Please Fix it!"

exit 3

}

for file in /lib/modules/uname -r/kernel/net/ipv4/netfilter/ip_conntrack_*.o

do

module=$(basename $file)

modprobe ${module%.*} &>/dev/null

done

for file in /lib/modules/uname -r/kernel/net/ipv4/netfilter/ip_nat_*.o

do

module=$(basename $file)

modprobe ${module%.*} &>/dev/null

done

------------- ipforwarding -----------

echo "Turning on IP forwarding..."

echo "1" > /proc/sys/net/ipv4/ip_forward

------------- anti spoofing -----------

echo "Turning on anti-spoofing..."

for file in /proc/sys/net/ipv4/conf/*/rp_filter; do

echo "1" > $file

done

------------- flushing ----------

echo "Cleaning up..."

iptables -F -t filter

iptables -X -t filter

iptables -Z -t filter

iptables -F -t nat

iptables -X -t nat

iptables -Z -t nat

------------- policies -------------

echo "Setting up policies to ACCEPT..."

iptables -P INPUT ACCEPT

iptables -P OUTPUT ACCEPT

iptables -P FORWARD ACCEPT

iptables -t nat -P PREROUTING ACCEPT

iptables -t nat -P POSTROUTING ACCEPT

iptables -t nat -P OUTPUT ACCEPT

------------- ICMP -------------

echo "Creating icmpfilter chain..."

iptables -N icmpfilter

for TYPE in $DENIED_ICMP; do

iptables -A icmpfilter -i $EXT_IF -p icmp \

--icmp-type $TYPE -j DROP

done

for TYPE in $ALLOWED_ICMP; do

iptables -A icmpfilter -i $EXT_IF -p icmp \

--icmp-type $TYPE -j ACCEPT

done

------------- block -------------

echo "Creating block chain..."

iptables -N block

iptables -A block -m state --state ESTABLISHED,RELATED -j ACCEPT

iptables -A block -m state --state NEW,INVALID -i $EXT_IF -j DROP

iptables -A block -m state --state NEW -i ! $EXT_IF -j ACCEPT

iptables -A block -j DROP

------------- filter -------------

echo "Filtering packets..."

iptables -A INPUT -j

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus