Service/port based routing
Gilad Ben-Yossef
gilad at codefidence.com
Sun Jun 28 15:17:19 IDT 2009
geoffrey mendelson wrote:
>
> I have two routers on my network. let's say 192.168.1.1 and
> 192.168.1.2. One connects to Netvision the other to 012. Now host
> based routing is simple, e.g. I can say route all packets to host
> 1.2.3.4 via gateway 192.168.1.1 and using a default route, everything
> else via 192.168.1.2.
>
> What I want to do is become more granular. I want to be able to route
> all packets to/from a specific port via one router, and everything
> else to use the
> default route.
>
> These are all connections to/from this particular system, I don't need
> to do it for everything on my network, or I can do it indiviudally.
> Currently the systems are running Ubuntu 9.04 with the latest kernel,
> but if I need to I can change them.
>
Either do it globally with packet marks and specific routing table as
Shimi suggested, or, which may or may not be simpler in your case
depending on the specifics, you ca force connection from a specific
socket or application via a specific device - here's how:
http://tuxology.net/2008/05/15/forcing-connections-through-a-specific-interface/
Cheers,
Gilad
--
Gilad Ben-Yossef
Chief Coffee Drinker & CTO
Codefidence Ltd.
Web: http://codefidence.com
Cell: +972-52-8260388
Tel: +972-8-9316883 ext. 201
Fax: +972-8-9316884
Email: gilad at codefidence.com
Check out our Open Source technology and training blog - http://tuxology.net
"Now the world has gone to bed
Darkness won't engulf my head
I can see by infra-red
How I hate the night."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20090628/b2540202/attachment.html>
More information about the Linux-il
mailing list