All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] PREROUTING doubts !!
@ 2001-12-28  8:40 Arindam Haldar
  2001-12-28 11:44 ` Greg Scott
  0 siblings, 1 reply; 2+ messages in thread
From: Arindam Haldar @ 2001-12-28  8:40 UTC (permalink / raw)
  To: lartc

hi all,

i want 2 know if the follwing is correct

iptables -A PREROUTING -t nat -i eth1 ... -j REDIRECT --to-port 3128
iptables -A PREROUTING -t mangle -i eth1..... -j mark 1

the intention is to send http pkts first to transpaent squid else use 
routing based on cost & bandwidth !

will be very thanful to u 4 cealring this doubt

arindam haldar


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [LARTC] PREROUTING doubts !!
  2001-12-28  8:40 [LARTC] PREROUTING doubts !! Arindam Haldar
@ 2001-12-28 11:44 ` Greg Scott
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Scott @ 2001-12-28 11:44 UTC (permalink / raw)
  To: lartc

> iptables -A PREROUTING -t nat -i eth1 ... -j REDIRECT --to-port 3128
> iptables -A PREROUTING -t mangle -i eth1..... -j mark 1

I don't think that will do what you want.  The first iptables command will
A(dd) an entry to the nat table.  Your second command adds an entry to the
mangle table.  So even though one command immediately follows the other in
your script, packets won't see them that way.  Do this  to see the order of
tests in your tables:

iptables -L -v -n -t nat
iptables -L -v -n -t mangle

I have never been clear about the exact order of tables/chains packets see
so I don't know which table they will traverse first.

- Greg



-----Original Message-----
From: Arindam Haldar [mailto:ahiam@yahoo.com]
Sent: Friday, December 28, 2001 2:29 AM
To: lartc@mailman.ds9a.nl
Subject: [LARTC] PREROUTING doubts !!


hi all,

i want 2 know if the follwing is correct

iptables -A PREROUTING -t nat -i eth1 ... -j REDIRECT --to-port 3128
iptables -A PREROUTING -t mangle -i eth1..... -j mark 1

the intention is to send http pkts first to transpaent squid else use 
routing based on cost & bandwidth !

will be very thanful to u 4 cealring this doubt

arindam haldar


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-12-28 11:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-28  8:40 [LARTC] PREROUTING doubts !! Arindam Haldar
2001-12-28 11:44 ` Greg Scott

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.