[squid-users] Proxy Setup

From: Mohammad Shakir <shakirgil@dont-contact.us>
Date: Thu, 27 Nov 2003 09:03:43 -0800 (PST)

I have Red Hat Linux 7.3 with squid-2.4.STABLE6-1.7.2,
kernel-2.4.18-3,iptables-1.2.5-3.

I want to run cable network with 100 users with normal
dialup.

I have 4 PC PIII 733Mhz with 256MB RAM and USR 56K
External Modem with Linux 7.3 configure Squid and 4
telephone lines.

Now I want all my request come on server1 ( for this I
setup dhcp on server1 and define gateway,DNS to
server1 to all clients),
I also setup MASQUREAD on server1 so all clients are
connected with Internet.

But if any request come for browsing means tcp port 80
Linux automatically forward that request on server2,
server3, server4.
Actually I want to distribute all browsing request to
server2, server3 and server4.

I know 4 normal telephone line is not best for 100
users but right now I do not have any other resource.

I am sending herewith my script which I am using on
server1.

# Flush all Rules
/sbin/iptables --flush
/sbin/iptables --table nat --flush
/sbin/iptables --delete-chain
/sbin/iptables --table nat --delete-chain

# for transprent proxy
/sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp
--dport 80 -j REDIRECT --to-port 8080

# for MASQUREADE
/sbin/iptables --table nat --append POSTROUTING -s
192.168.0.0/24 --out-interface ppp0 -j MASQUERADE
/sbin/iptables -A INPUT -m state --state
ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -A INPUT -m state --state NEW -i ! ppp0
-j ACCEPT
/sbin/iptables -P INPUT DROP #only if the first two
are succesful
/sbin/iptables -A FORWARD -i ppp0 -o ppp0 -j REJECT

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

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
Received on Thu Nov 27 2003 - 10:03:44 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:21:40 MST