Need help: IP routing based on userid

Need help: IP routing based on userid

Post by Wu, Simon [WDLN2:2X38:EXCH » Mon, 02 Apr 2001 07:27:32



Hello,

I am running Linux with Redhat6.2. I need to create a routing table
based on userid.

/sbin/route doesn't seem to have the option.

The Advanced Routing Howto mentioned it is capable with /sbin/ip route,
but didn't give more details. I could find any manpage or other detailed
info on /sbin/ip.

Any help will be greatly appreciated.

Simon

 
 
 

Need help: IP routing based on userid

Post by Kenneth Stephe » Tue, 03 Apr 2001 12:01:40



> Hello,

> I am running Linux with Redhat6.2. I need to create a routing table
> based on userid.

> /sbin/route doesn't seem to have the option.

> The Advanced Routing Howto mentioned it is capable with /sbin/ip route,
> but didn't give more details. I could find any manpage or other detailed
> info on /sbin/ip.

> Any help will be greatly appreciated.

> Simon

Simon,

        If your objective is to provide a different routing scheme for each
user, then I'm afraid it cant be done. A routing table is set for a
machine - not at the user level. Thus it is even theoretically
impossible to do what you need.

        If on the other hand, you have applications whose network traffic needs
to be redirected based on the user of the application, you will need to
read up on the protocol used by the application. Without more
information on what you are trying to do, it would be hard to help you.

Kenneth

 
 
 

Need help: IP routing based on userid

Post by Manfred Bart » Tue, 03 Apr 2001 12:47:04



Quote:> I am running Linux with Redhat6.2. I need to create a routing table
> based on userid.

> /sbin/route doesn't seem to have the option.

That is because it doesn't support what you want.  ;)

Routing by user-ID should be possible in an indirect way but only
for traffic originating from the local host:

The new Netfilter which is part of Linux 2.4.x has a module which
can match the owner of a local socket/port. You may be able to use
that to give the packet a ``firewall-mark'' and then use that as
per the Advanced Routing Howto.

For packets which originate at a different host there is no ready
solution because IP, TCP and UDP packets do not carry any user-id
information as part of the protocol.  I suppose you could devise
some sort of encapsulation protocol up to your router, but you'd
be on your own.  ...  Don't let that stop you  :)

Quote:> The Advanced Routing Howto mentioned it is capable with /sbin/ip
> route, but didn't give more details. I could find any manpage or
> other detailed info on /sbin/ip.

Information on Advanced Routing is still a bit thin.  You'll just
have to keep looking.  Often you will find very useful comments and
tips in the source code of the relevant software.

Here are some of my bookmarks:
    <http://snafu.freedom.org/linux2.2/iproute-notes.html>
    <http://icawww1.epfl.ch/linux-diffserv/>
    <http://qos.ittc.ukans.edu/>

--
Manfred
---------------------------------------------------------------
ipchainsLogAnalyzer, NetCalc, whois at: <http://logi.cc/linux/>