[CentOS] redirecting traffic using iptables

Mon Jan 31 14:58:07 UTC 2011
Robert Spangler <mlists at zoominternet.net>

On Monday 31 January 2011 07:46, Jobst Schmalenbach wrote:

>    iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80  -j DNAT --to
> $PROXY:3128 iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 443 -j
> DNAT --to $PROXY:3128
>
>  browser tell me "invalid request".

From the man pages:

   DNAT
       --to-destination ipaddr[-ipaddr][:port-port]


You could combined these two rules into one with Multiport.
Check the MAN pages.


-- 

Regards
Robert

Linux
The adventure of a lifetime.

Linux User #296285
Get Counted
http://counter.li.org/