LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   forward all HTTP requests to the proxy (https://www.linuxquestions.org/questions/linux-networking-3/forward-all-http-requests-to-the-proxy-488261/)

cccc 09-30-2006 11:37 AM

forward all HTTP requests to the proxy
 
hi

howto redirect the whole HTTP traffic using proxy ?

I have tried using iptables:
Code:

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

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

p.s
but I'm not using a transparent proxy.

greetings
cccc

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:
Code:

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



All times are GMT -5. The time now is 03:59 AM.