* mangle squid packets
@ 2005-07-01 20:31 marcus
2005-07-05 11:49 ` Jan Engelhardt
0 siblings, 1 reply; 4+ messages in thread
From: marcus @ 2005-07-01 20:31 UTC (permalink / raw)
To: netfilter
Hi, I've managed to work a 3 gateway linux router using this mangle rule
to mark local net incoming packets:
iptables -A PREROUTING -t mangle -s 10.0.0.0/8 -d 0/0 -j MARK --set-mark 3
Works, great. But i cant do the same with squid activated, I'm using
transparent proxy:
iptables -t nat -A PREROUTING -i eth0 -p TCP --dport 80 -j REDIRECT
--to-port 3128
I dont know what mangle rule I need to mark squid transparent packets, I
have tried all the following (One at a time):
iptables -A PREROUTING -t mangle -s 10.0.0.0/8 -d 0/0 -j MARK
--set-mark 3
iptables -A PREROUTING -t mangle -s 127.0.0.1 -d 0/0 -j MARK
--set-mark 3
iptables -A PREROUTING -t mangle -p tcp --dport 80 -j MARK
--set-mark 3
iptables -A PREROUTING -t mangle -p tcp --dport 3128 -j MARK
--set-mark 3
Any ideas??
Thanks.
--
<http://www.lanhelp.com.br> Atenciosamente,
Marcus Leandro
Suporte / Consultoria
marcus@lanhelp.com.br
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: mangle squid packets
2005-07-01 20:31 mangle squid packets marcus
@ 2005-07-05 11:49 ` Jan Engelhardt
2005-07-05 18:18 ` Askar
0 siblings, 1 reply; 4+ messages in thread
From: Jan Engelhardt @ 2005-07-05 11:49 UTC (permalink / raw)
To: marcus; +Cc: netfilter
>I dont know what mangle rule I need to mark squid transparent packets, I
>have tried all the following (One at a time):
Because Squid practically starts a new connection, you need special help
from squid itself to mark outgoing packets based on incoming ones.
This is done by TPROXY, a netfilter module from Balabit.com.
Unfortunately, they do not have a version for 2.6.11 and up yet.
Jan Engelhardt
--
| Alphagate Systems, http://alphagate.hopto.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mangle squid packets
2005-07-05 11:49 ` Jan Engelhardt
@ 2005-07-05 18:18 ` Askar
2005-07-05 20:32 ` Jan Engelhardt
0 siblings, 1 reply; 4+ messages in thread
From: Askar @ 2005-07-05 18:18 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: netfilter
Before marking squid packets you have to define route with "ip"
iproute2 command more info could be find on www.lartc.org , below is
an example of iproute + iptables for your firewall machine.
echo 112 squid.out >> /etc/iproute2/rt_tables
ip rule add fwmark 3 table squid.out
ip route add default via xxx.xxx.xxx.xx dev eth0 table squid.out
ip route flush cache
# repacle xxx.xxx.xx with squid server ip
#####
here is iptables part
iptables -A PREROUTING -i eth0 -t mangle -p tcp --dport 80 -j MARK --set-mark 3
regards
Askar
hope this would helps
On 7/5/05, Jan Engelhardt <jengelh@linux01.gwdg.de> wrote:
>
> >I dont know what mangle rule I need to mark squid transparent packets, I
> >have tried all the following (One at a time):
>
> Because Squid practically starts a new connection, you need special help
> from squid itself to mark outgoing packets based on incoming ones.
>
> This is done by TPROXY, a netfilter module from Balabit.com.
> Unfortunately, they do not have a version for 2.6.11 and up yet.
>
>
>
> Jan Engelhardt
> --
> | Alphagate Systems, http://alphagate.hopto.org/
>
>
>
--
I love deadlines. I like the whooshing sound they make as they fly by.
Douglas Adams
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mangle squid packets
2005-07-05 18:18 ` Askar
@ 2005-07-05 20:32 ` Jan Engelhardt
0 siblings, 0 replies; 4+ messages in thread
From: Jan Engelhardt @ 2005-07-05 20:32 UTC (permalink / raw)
To: Askar; +Cc: netfilter
>Before marking squid packets you have to define route with "ip"
>iproute2 command more info could be find on www.lartc.org , below is
>an example of iproute + iptables for your firewall machine.
As for my part, I (plan to) go with an ebtables solution, which does not
involve all the bothering with routing. Of course, you need to need to know
etherbridges :)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-07-05 20:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-01 20:31 mangle squid packets marcus
2005-07-05 11:49 ` Jan Engelhardt
2005-07-05 18:18 ` Askar
2005-07-05 20:32 ` Jan Engelhardt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.