Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Georgi Alexandrov <georgi.alexandrov@gmail.com>
To: netfilter@lists.netfilter.org
Subject: Re: Bypass transparent proxy in iptables?
Date: Fri, 06 Jan 2006 14:16:34 +0200	[thread overview]
Message-ID: <43BE5FA2.6050800@gmail.com> (raw)
In-Reply-To: <BFE309C2.4DB92%jamie@listserv.newberg.k12.or.us>

Jamie McParland wrote:

>This is probably the wrong place to ask this but i don't know where else to
>turn. I'm using IPCOP as my distro and we use iptables to do transparent
>proxy with squid.
>
>I have one site that is balling up in squid and need to totally bypass
>squid. Doing an ACL in squid doesn't work.
>
>I know i could somehow put some rule before the transparent rule and bypass
>it that way but i can't seem to figure it out. I asked the ipcop list but
>didn't have any luck there. I thought the IPTable gurus might have an idea.
>
>Thanks, 
>Jamie
>
>
>
>
>  
>
Let's asume you are using a rule like this one:
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT 
--to-port 3128

Let's asume the site you'll be bypassing is www.McParland.com.

Just add a rule before the REDIRECT one like this:

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -d 
www.McParland.com -j RETURN
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT 
--to-port 3128

That would cause tcp packets coming from eth0 with destination port 80 
and destination host www.McParland.com
to stop travelling PREROUTING chain of the nat table. E.g. they won't 
hit the REDIRECT rule and will not be
redirected to squid's port.


regards,
Georgi Alexandrov


  reply	other threads:[~2006-01-06 12:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-06  1:37 Bypass transparent proxy in iptables? Jamie McParland
2006-01-06 12:16 ` Georgi Alexandrov [this message]
2006-01-08  4:54 ` /dev/rob0

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=43BE5FA2.6050800@gmail.com \
    --to=georgi.alexandrov@gmail.com \
    --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