Re: Routing based on user id

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Hi,
> on page 3 of the lartc HOWTO one can read that it's possible to do
> routing based on user id.
> Can someone explain me how to do this? And is it somehow possible to set
> the DSCP depending on the user id?
>
> Thanks,
> Jürgen Jacob

you can use the owner module in iptables

iptables -m owner -h

for DSCP you can use -j DSCP

here is a solution with fwmark:

e.g iptables -t mangle -A OUTPUT -m owner --uid-owner 0 -j MARK --set-mark 1
and then
ip rule add fwmark 0x01 table 1

after that you add all the route in table 1

ip route add ...... via ..... table 1

--
Anton Glinkov
network administrator

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

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux