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 ..."