LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 09-30-2006, 11:37 AM   #1
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,608

Rep: Reputation: 45
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
 
Old 10-01-2006, 04:07 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,384

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
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.
 
Old 10-01-2006, 06:42 PM   #3
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,608

Original Poster
Rep: Reputation: 45
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]
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
slapt-get, howto pass username and passwd for http requests to our proxy !! Padmakiran Slackware 13 05-05-2010 09:05 AM
LVS(UltraMonkey) Director does not forward requests fentisen Linux - Networking 1 03-27-2006 08:19 AM
Forward FTP Requests mitt Linux - Networking 7 04-08-2005 10:11 AM
forward all dns requests to one page Moszer Linux - Networking 4 05-25-2004 01:34 PM
Mod_Proxy (Apache) won't forward requests bentman78 Linux - Software 1 04-20-2004 08:49 AM


All times are GMT -5. The time now is 11:56 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration