From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michele Petrazzo - Unipex srl Subject: Re: Setting up a proxy with iptables Date: Sat, 02 Aug 2008 10:04:22 +0200 Message-ID: <48941506.6080409@unipex.it> References: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: netfilter-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: "linuxmc@libero.it" Cc: sargon97 , netfilter linuxmc@libero.it wrote: > Hi, have you try with a rule like > > $IPTABLES -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j DNAT > --to-destination 82.109.120.222:8080 > > ? > > Best regards ! Marco > Should be better the redirect target: $IPTABLES -t nat -A PREROUTING -i $INTERNAL -p tcp --dport 80 -j REDIRECT --to-ports $PROXY_PORT $IPTABLES -t nat -A PREROUTING -i $INTERNAL -p tcp --dport 443 -j REDIRECT --to-ports $PROXY_PORT Ciao, MIchele