Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "saspan" <saspan@web.de>
To: netfilter@lists.netfilter.org
Subject: Re: redirecting on a local machine
Date: Fri, 19 Jan 2007 20:48:37 +0100	[thread overview]
Message-ID: <009901c73c02$d046cad0$0700a8c0@stormbook> (raw)
In-Reply-To: 45B11AF9.8060209@plouf.fr.eu.org

From: "Pascal Hambourg" <pascal.mail@plouf.fr.eu.org>

>> iptables -t -nat -A OUTPUT -m owner ! --owner-uid squid -p tcp --dport 
>> 80 -j REDIRECT --to-destination 3128
>
>'--to-destination' is not a valid option for REDIRECT. The only valid 
>option is '--to-ports'.

Sorry, sure, that is what it actually looked like. 
I pasted the code quickly from my memory.
The rule I used was

iptables -t -nat -A OUTPUT -m owner ! --owner-uid squid -p tcp --dport 
80 -j REDIRECT --to-ports 3128

>> doesn't seem to work,
>
>That does not provide much info. Can you elaborate ?

The browser sends http-request, it is redirected to squid
and then network-timeout-error occurs in the browser .

>> cause a browser would not be expecting a reply 
>> from a transparent proxy when waiting for replies to its requests.
>
>Huh ?

See: 
The browser sends http-request to e.g. 99.9.9.9.1:80.
The request is redirected to proxy on 127.0.0.1:3128.
Browser waits for reply from 99.9.9.9:80.
Actually the reply will come from proxy on 127.0.0.1:3128.

Do you see the problem?

Regards

Sascha




  reply	other threads:[~2007-01-19 19:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-19 18:44 redirecting on a local machine saspan
2007-01-19 18:47 ` Jan Engelhardt
2007-01-19 18:54   ` saspan
2007-01-19 19:24 ` Pascal Hambourg
2007-01-19 19:48   ` saspan [this message]
2007-01-19 22:23     ` Jan Engelhardt
2007-01-27 14:57       ` Jan Engelhardt
2007-01-19 22:34     ` Pascal Hambourg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='009901c73c02$d046cad0$0700a8c0@stormbook' \
    --to=saspan@web.de \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox