0

How can I match the IP:Port pair in Linux to handle that packet via some particular table? Is that possible or traffic marking is the only way I can go?

1
  • You should probably ask this in on of the Linux forums.
    – Ron Maupin
    Mar 21 '16 at 14:47
2

I don't know of any other way as marking the packets via iptables in the mangle chain and then use policy routing to base the routing on the mark.

So in my humble opinion "traffic marking" is the only way to go.

Edit: A general explanation for policy-routing with iptables and ip can be found here (this was the first explanation i found that takes into account that iptables and ip use different numeral systems (decimal / hexadecimal))

2
  • Hi, could you please provide a link with explanation/examples for the average tech? That'll help all interested.
    – user4565
    Apr 20 '16 at 20:38
  • edited my answer
    – Silent-Bob
    Apr 21 '16 at 11:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.