Skip to contentSkip to conversation

owner based routing

DISCUSSION Ignatich 2 participants 2 messages Oct 9, 2005 – Oct 10, 2005 netfilter

lore
Share & tools
lore

Ignatich

author
#0 lore raw

Hello netfilter developers,

I have a following problem. My linux server has two interfaces: the first connected to internet and the second connected to LAN. In LAN I have another hardware ADSL router connected to another (much slower) ISP.

I want LAN users to use linux server as internet gateway and still be able to use ADSL link to download files via http/ftp/bt on my server in background.

At first glance I thought that ipt_owner is all I need, but unfortunately it only works in OUTPUT chain (and in INPUT and POSTROUTING chain if I apply owner-socketlookup patch from patch-o-matic, but that doesn't help here).

Is it possible to configure owner-based routing via some other way? If not then how much work required to make ipt_owner work in PREROUTING table? Does netfilter team plan to add such functionality? I'm no linux kernel programmer but experienced with C so I might be able to help if that's not very complicated.

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

Is it possible to configure owner-based routing via some other way?

It is possible to solve what you described without any reference to who owns which processes on the router...

You want to learn about policy routing. Read all of www.lartc.org. When you still have problems, ask a _users_ mailing list or newsgroup.

Roughly, you want to formulate a solution to your task which is based on looking at IP addresses, and network interface names, only.

The best you can do with owner, and the overall concept of a process-identity-based firewall functionality, is to forget about it.

Quoted 2 lines

If not then how much work required to make ipt_owner work in PREROUTING table?

Very much work. At PREROUTING, we don't even know whether the packet will be for the local machine or another one behind the router...

Quoted 1 line

Does netfilter team plan to add such functionality?

As far as I know, no. To the contrary: functionality is removed.

Quoted 3 lines

I'm no
linux kernel programmer but experienced with C so I might be able to help if that's not very complicated.

It is very complicated.

When processing packets in the kernel, especially for receive, the concept of a user level process does not make much sense, if you look at it in detail. At the moment the packet is received (and netfiltered), there isn't even a guarantee that the process that will ultimately handle it, already exists!

best regards
Patrick