multiple routing tables for internal router programs
Maybe a strange request, I'll try to explain this as clearer as I can (forgive my bad english, please :-) ).
I'm setting a linux box as a router. My router uses multiple routing tables, so I can address the traffic from specific ip addresses of my lan to distinct ISPs providers (specifying a different default gateway fo r each table), marking packets with iptables (prerouting marks).
This works with the forwarding traffic (lan-ISPs) that crosses my router.
But how can I reach the same result for programs that are working INTO the linux box? All I want is that a program (ping, for examples, or a VOIP server, better) uses a secondary routing table in the same machine. In this mode, I can manipulate route settings for different classes of program in my router.
Is it possible?
Thanks
Quoted 1 line · Andrea
But how can I reach the same result for programs that are working INTO the linux box? All I want is that a program (ping, for examples, or a VOIP server, better) uses a secondary routing table in the same machine. In this mode, I can manipulate route settings for different classes of program in my router.
Just like you are using IPTables to mark packets now and then based routing decisions based on the IPTables mark, mark packets inbound as you want to.
There is no limit on the number of ways that you can mark packets, inbound, outbound, source port, destination port, what ever.
(That is if I have understood you correctly.)
Grant. . . .