Skip to contentSkip to conversation

owner based routing

DISCUSSION Ignatich 2 participants 2 messages Oct 11, 2005

lore
Share & tools
lore

Ignatich

author
#0 lore raw

Hello,

Quoted 2 lines · Ignatich
Quoted 2 lines

Since ipt_owner does not work in PREROUTING chain and fwmark is pointless, I thought that ipt_ROUTE from p-o-m can help me.

dr> Why is fwmark pointless?

Quoted 1 line
Quoted 1 line

Any ideas how to solve my problem?

dr> I would try -j MARK --set-mark $UID for your -m owner matched packets dr> and use a ip rule / ip route combination. I've not done this, but I dr> don't see why it wouldn't work.

It's pointless because ipt_owner does not work in PREROUTING table. So even if I mark packet routing decision is already made.

Signature · 1 line
 Ignatich                          mailto:[email protected]
#1 lore raw
Quoted 4 lines · Ignatich

dr> Why is fwmark pointless?

It's pointless because ipt_owner does not work in PREROUTING table. So even if I mark packet routing decision is already made.

The mangle table OUTPUT chain is consulted before routing.

root@room101:~# iptables -vt mangle -A OUTPUT -m owner --uid-owner rob0 -j MARK --set-mark 0x80
MARK  all opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0  OWNER UID match 1000 MARK set 0x80

Did you try this?

Signature · 2 lines
    mail to this address is discarded unless "/dev/rob0"
    or "not-spam" is in Subject: header