* How to NOT redirect..
@ 2002-11-07 18:40 Karina Gómez Salgado
2002-11-07 21:56 ` Antony Stone
2002-11-07 22:59 ` Anders Fugmann
0 siblings, 2 replies; 4+ messages in thread
From: Karina Gómez Salgado @ 2002-11-07 18:40 UTC (permalink / raw)
To: netfilter
Hi, I'm using iptables for redirect requests to port 80 to port 3128 of
Squid.
But I have a problem, because some of the squid users have trouble
accessing certain services through the proxy, i want to this users
bypass the proxy when they try to reach certain sites.
So How can i deny the redirect ?
I've excluded certain users for their source address... making the
redirection to the remaining ip addresses.
But now i want to send all traffic to squid, all but certain
destinations...
Is there a way to do that ?
I appreciate any help,
Thanks,
Karina
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to NOT redirect..
2002-11-07 18:40 How to NOT redirect Karina Gómez Salgado
@ 2002-11-07 21:56 ` Antony Stone
2002-11-08 1:19 ` Karina
2002-11-07 22:59 ` Anders Fugmann
1 sibling, 1 reply; 4+ messages in thread
From: Antony Stone @ 2002-11-07 21:56 UTC (permalink / raw)
To: netfilter
On Thursday 07 November 2002 6:40 pm, Karina Gómez Salgado wrote:
> Hi, I'm using iptables for redirect requests to port 80 to port 3128 of
> Squid.
>
> But I have a problem, because some of the squid users have trouble
> accessing certain services through the proxy, i want to this users
> bypass the proxy when they try to reach certain sites.
>
> So How can i deny the redirect ?
>
> I've excluded certain users for their source address... making the
> redirection to the remaining ip addresses.
>
> But now i want to send all traffic to squid, all but certain
> destinations...
>
> Is there a way to do that ?
Yes. Depending on how many destination address you do / don't want to
redirect, you could use any of the following three methods (there are almost
certainly others as well):
1. Add a "-d a.b.c.d" to your DNAT rule so that only packets matching the
destination address get DNATted. You then need one of these rules for each
destination you want the DNAT to apply to.
2. Add a "-d ! a.b.c.d" if you want to stop a single destination from being
DNATted. You can only use one of these rules, otherwise two of them in
combination will have the same effect as not using "-d ! a.b.c.d" at all.
3. Use your existing DNAT rule in the PREROUTING nat chain, but insert some
rules before it which match a destination address using "-d a.b.c.d" and use
the target "-j ACCEPT" so that these packets bypass the DNAT rule.
Basically suggestion 1 allows you to apply DNAT to as many destination
addresses as you like; suggestion 2 allows you to exclude one address or
address range from being DNATted; and suggestion 3 allows you to exclude as
many addresses or ranges as you want.
Somewhere in this you should be able to achieve your goal.
Antony.
--
Software development can be quick, high-quality, or low-cost.
The customer gets to pick any two out of three.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to NOT redirect..
2002-11-07 18:40 How to NOT redirect Karina Gómez Salgado
2002-11-07 21:56 ` Antony Stone
@ 2002-11-07 22:59 ` Anders Fugmann
1 sibling, 0 replies; 4+ messages in thread
From: Anders Fugmann @ 2002-11-07 22:59 UTC (permalink / raw)
To: Karina Gómez Salgado; +Cc: netfilter
Karina Gómez Salgado wrote:
> Hi, I'm using iptables for redirect requests to port 80 to port 3128 of
> Squid.
>
> But I have a problem, because some of the squid users have trouble
> accessing certain services through the proxy, i want to this users
> bypass the proxy when they try to reach certain sites.
>
I had a simillar problem where clients could access sites directly, but
not when the transparent quid was setup. The problem was that the server
had ECN enabled. Some brain-dead routers/firewalls filter out all
packets with the ECN bit set. Disabling ECN on the firewall solved the
problems.
Try to look at the value of /proc/sys/net/ipv4/tcp_ecn. If the value is
'1', then do an 'echo 0 > /proc/sys/net/ipv4/tcp_ecn' on the machine
running the squid and see if the problem persists.
This might be an easier way to solve the problem rather than adding
specific rules to let machines bypass the proxy.
Regards
Anders Fugmann
--
Author of FIAIF
FIAIF is an intelligent firewall
http://fiaif.fugmann.dhs.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to NOT redirect..
2002-11-07 21:56 ` Antony Stone
@ 2002-11-08 1:19 ` Karina
0 siblings, 0 replies; 4+ messages in thread
From: Karina @ 2002-11-08 1:19 UTC (permalink / raw)
To: Antony Stone; +Cc: netfilter
Thank's a lot...
Now my problem is solved, and it was so easy!!
Regards,
Karina
Antony Stone wrote:
> On Thursday 07 November 2002 6:40 pm, Karina Gómez Salgado wrote:
>
> > Hi, I'm using iptables for redirect requests to port 80 to port 3128 of
> > Squid.
> >
> > But I have a problem, because some of the squid users have trouble
> > accessing certain services through the proxy, i want to this users
> > bypass the proxy when they try to reach certain sites.
> >
> > So How can i deny the redirect ?
> >
> > I've excluded certain users for their source address... making the
> > redirection to the remaining ip addresses.
> >
> > But now i want to send all traffic to squid, all but certain
> > destinations...
> >
> > Is there a way to do that ?
>
> Yes. Depending on how many destination address you do / don't want to
> redirect, you could use any of the following three methods (there are almost
> certainly others as well):
>
> 1. Add a "-d a.b.c.d" to your DNAT rule so that only packets matching the
> destination address get DNATted. You then need one of these rules for each
> destination you want the DNAT to apply to.
>
> 2. Add a "-d ! a.b.c.d" if you want to stop a single destination from being
> DNATted. You can only use one of these rules, otherwise two of them in
> combination will have the same effect as not using "-d ! a.b.c.d" at all.
>
> 3. Use your existing DNAT rule in the PREROUTING nat chain, but insert some
> rules before it which match a destination address using "-d a.b.c.d" and use
> the target "-j ACCEPT" so that these packets bypass the DNAT rule.
>
> Basically suggestion 1 allows you to apply DNAT to as many destination
> addresses as you like; suggestion 2 allows you to exclude one address or
> address range from being DNATted; and suggestion 3 allows you to exclude as
> many addresses or ranges as you want.
>
> Somewhere in this you should be able to achieve your goal.
>
> Antony.
>
> --
>
> Software development can be quick, high-quality, or low-cost.
>
> The customer gets to pick any two out of three.
--
LSCI Karina Gómez Salgado
mailto:kgs@acabtu.com.mx
Systems Administrator & Web Projects Manager
BTU Comunicación, S.A. de C.V.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-11-08 1:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-07 18:40 How to NOT redirect Karina Gómez Salgado
2002-11-07 21:56 ` Antony Stone
2002-11-08 1:19 ` Karina
2002-11-07 22:59 ` Anders Fugmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox