Re: [squid-users] Squid3 stable8 web cache proxy - iptables help!

From: <wh_at_msdrd.com>
Date: Fri, 24 Jul 2009 06:23:26 -0700

echo "%%% Transparent Proxy %%%"
iptables -t nat -A PREROUTING -i $LAN_IFACE -p tcp \
        -s $LAN_ADDRESSES --sport $UNPRIVPORTS --dport 80 \
        -j REDIRECT --to-port 3128

iptables -A INPUT -i $LAN_IFACE -p tcp \
        -s $LAN_ADDRESSES --sport $UNPRIVPORTS -d $LAN_IP --dport 3128 \
        -m state --state NEW -j ACCEPT
        
# Now enable response from squid as server sport 80
iptables -A OUTPUT -o $LAN_IFACE -p tcp \
        -s $LAN_IP --sport 80 --dport $UNPRIVPORTS \
        -m state --state ESTABLISHED,RELATED -j ACCEPT
        
echo "... Done Transparent Proxy ..."
Received on Fri Jul 24 2009 - 13:23:37 MDT

This archive was generated by hypermail 2.2.0 : Tue Jul 28 2009 - 12:00:05 MDT