-   Linux - Networking (
-   -   forward all HTTP requests to the proxy (

cccc 09-30-2006 11:37 AM

forward all HTTP requests to the proxy

howto redirect the whole HTTP traffic using proxy ?

I have tried using iptables:

iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination
but it doesn't work !

this machine is a vpn gateway and should redirect the whole HTTP traffic to the proxy.

but I'm not using a transparent proxy.


acid_kewpie 10-01-2006 04:07 AM

the command there looks broadly correct, but you've said nothing useful about your setup. you say you are not using a transparent proxy? well that command IS a transparent proxy...

all i can say is that normally you'd either also specify a source address range or an incoming interface in addition to what you have there. probably useful to see what tcpdump says about what port 80 thrughput is doing.

cccc 10-01-2006 06:42 PM

according to tcpdump is not asking the proxy:

#tcpdump: listening on eth0
01:39:36.268892 > S 1108533638:1108533638(0) win 5840 <mss 1460,sackOK,timestamp 1059615 0,nop,wscale 0> (DF) [tos 0x10]
01:39:36.269068 > S 3032348248:3032348248(0) ack 1108533639 win 8192 <mss 1460>
01:39:36.269173 > . ack 1 win 5840 (DF) [tos 0x10]

All times are GMT -5. The time now is 02:40 AM.