All of lore.kernel.org
 help / color / mirror / Atom feed
* Re-routing of output traffic
@ 2007-06-20 12:06 François Delawarde
  0 siblings, 0 replies; 2+ messages in thread
From: François Delawarde @ 2007-06-20 12:06 UTC (permalink / raw)
  To: netfilter

Hello all!

If i'm not wrong, outgoing traffic generated by local processes pass 
through the following:

Local Process ==> OUTPUT [mangle] ==> OUTPUT [nat] ==> Rerouting ==> 
OUTPUT [filter] ==> POSTROUTING ...


I'm interested in using a specific routing table for one of my local 
processes (the entire story is complicated).

I tried the following without success:

iptables -t mangle -A OUTPUT -m owner --gid-owner <group of process> -j 
MARK --set-mark <mark value>
ip rule add prio 1 fwmark <mark value> table 12
ip route add default via 192.168.1.1 table 12


But doing the following, it works perfectly:

iptables -t mangle -A OUTPUT -m owner --gid-owner <group of process> -j 
TOS --set-tos <tos value>
ip rule add prio 1 tos <tos value> table 12
ip route add default via 192.168.1.1 table 12



I had read that MARKing a paquet could trigger the "Rerouting" part, but 
it appears that in the real world, the "Rerouting" part takes place only 
when we actually change something in the packet like TOSing it or 
DNATing it.

Is this a bug, or is it supposed to work that way? Is there anyway of 
doing what I want using MARKs (and without having to use the ROUTE target)?

I'm using iptables 1.3.7 with unpatched debian etch kernel 2.6.18-4.

Thank you,
François.


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

* Re-routing of output traffic
@ 2007-06-20 12:08 François Delawarde
  0 siblings, 0 replies; 2+ messages in thread
From: François Delawarde @ 2007-06-20 12:08 UTC (permalink / raw)
  To: netfilter

Hello all!

If i'm not wrong, outgoing traffic generated by local processes pass
through the following:

Local Process ==> OUTPUT [mangle] ==> OUTPUT [nat] ==> Rerouting ==>
OUTPUT [filter] ==> POSTROUTING ...


I'm interested in using a specific routing table for one of my local
processes (the entire story is complicated).

I tried the following without success:

iptables -t mangle -A OUTPUT -m owner --gid-owner <group of process> -j
MARK --set-mark <mark value>
ip rule add prio 1 fwmark <mark value> table 12
ip route add default via 192.168.1.1 table 12


But doing the following, it works perfectly:

iptables -t mangle -A OUTPUT -m owner --gid-owner <group of process> -j
TOS --set-tos <tos value>
ip rule add prio 1 tos <tos value> table 12
ip route add default via 192.168.1.1 table 12



I had read that MARKing a paquet could trigger the "Rerouting" part, but
it appears that in the real world, the "Rerouting" part takes place only
when we actually change something in the packet like TOSing it or
DNATing it.

Is this a bug, or is it supposed to work that way? Is there anyway of
doing what I want using MARKs (and without having to use the ROUTE target)?

I'm using iptables 1.3.7 with unpatched debian etch kernel 2.6.18-4.

Thank you,
François.



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

end of thread, other threads:[~2007-06-20 12:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-20 12:08 Re-routing of output traffic François Delawarde
  -- strict thread matches above, loose matches on Subject: below --
2007-06-20 12:06 François Delawarde

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.