The diagram is helpfull, thank you. I'll give it a thorough look... > > Of course, that needs to happen for both locally generated traffic and > > incoming traffic, so that I link the incoming packets to the right > > applications. > > Why does this sound like NAT, where you take data from one interface and > spit it out on another (receive is done the same way)? It is a kind of NATing, just changing the IP/interface. The thing is the rules are not static, they can change at a high rate. Definitely not confident changing the rules with a script rewritting/reloading the ruleset will not break it at some point. I am currently thinking of writting a netfilter module of some sort that will handle this out.