LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   2 routes to 2 WANs - separate applications how? (https://www.linuxquestions.org/questions/linux-networking-3/2-routes-to-2-wans-separate-applications-how-772739/)

salmonix 12-01-2009 01:03 PM

2 routes to 2 WANs - separate applications how?
 
Hi there,
I am seeking a solution to the following scenario:

PC box - 4 NICs.
eth0 -> DHCP -> connected to the NET directly (via modem)
wlan0 -> static/192.168.5.10 -> routed also to access NET.
rest of the nics are managing LAN

Default gw is eth0.

Now, I would like to force some applications to use wlan0 exclusively and not doing any traffic via eth0.
Or with other words: any application that is listening on wlan0 should reach the net via the gw of 192.168.5.0 network (that is 192.168.5.1), the rest should go via eth0.

Is there any solution at all?

Thanx!

never say never 12-01-2009 03:57 PM

Sounds like a router to me.

Might Check out PFSense
It is based on Free BSD and has many, MANY options.

salmonix 12-02-2009 01:42 AM

Quote:

Originally Posted by never say never (Post 3776181)
Sounds like a router to me.

Might Check out PFSense
It is based on Free BSD and has many, MANY options.

Yes it is a routing problem that I should work around using linux if possible. Thanx for calling my attention to pfSense, anyway!

zhjim 12-02-2009 02:51 AM

Quote:

Originally Posted by salmonix (Post 3775957)
Hi there,
I am seeking a solution to the following scenario:

PC box - 4 NICs.
eth0 -> DHCP -> connected to the NET directly (via modem)
wlan0 -> static/192.168.5.10 -> routed also to access NET.
rest of the nics are managing LAN

Default gw is eth0.

Now, I would like to force some applications to use wlan0 exclusively and not doing any traffic via eth0.
Or with other words: any application that is listening on wlan0 should reach the net via the gw of 192.168.5.0 network (that is 192.168.5.1), the rest should go via eth0.

Is there any solution at all?

Thanx!

check out the http://lartc.org/. They way that could be done is to mark certain packets depending on port (application) and then have them routed through the desired out interface. There also is a similar setup inside the latc manual.

Progs involved would be
iptables - to mark package
ip rule - to route package through certain device

Maybe this also can be done through some fancy rewrites with iptables. But I can't come up with one

salmonix 12-03-2009 04:43 AM

Quote:

Originally Posted by zhjim (Post 3776725)
check out the http://lartc.org/. They way that could be done is to mark certain packets depending on port (application) and then have them routed through the desired out interface. There also is a similar setup inside the latc manual.

Progs involved would be
iptables - to mark package
ip rule - to route package through certain device

Maybe this also can be done through some fancy rewrites with iptables. But I can't come up with one

Yes, I have ended up with Advancer Routing topic (AdvRouting Howto for start), and some mangling ip tables thingy. I hope I'll settle it... :)


All times are GMT -5. The time now is 09:23 PM.