LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   route packets by their remote port (https://www.linuxquestions.org/questions/linux-networking-3/route-packets-by-their-remote-port-355072/)

spastikman 08-19-2005 11:46 PM

2x DSL. Route packets dependending on remote port.
 
Hi !

I have a problem.
I have a lanhouse in Portugal with 2 dsl lines connected to one server with three NICs.

eth0 -> DSL 4Mbits -> 192.168.2.1
eth1 -> DSL 8Mbits -> 192.168.3.1
eth2 -> Local Intranet -> 192.168.1.1 (server IP)

What I want to do, is force all trafic from intranet with destination ports 1-25000;40000-65535, to go through eth1 gateway.
All the remaining destination ports (normaly the ones used by CS), to go through eth0.

This way I would avoid players from lagging because of downloads, etc etc etc.


Can anyone give me a hint how to do it ?

Thanks.

spastikman 08-20-2005 08:32 AM

any ideia ?

jdogpc 08-20-2005 08:52 AM

Está a usar algum software de firewall ou apenas a ditribuição pura e simsples?

carl.waldbieser 08-20-2005 12:23 PM

Re: 2x DSL. Route packets dependending on remote port.
 
Quote:

Originally posted by spastikman
Hi !

I have a problem.
I have a lanhouse in Portugal with 2 dsl lines connected to one server with three NICs.

eth0 -> DSL 4Mbits -> 192.168.2.1
eth1 -> DSL 8Mbits -> 192.168.3.1
eth2 -> Local Intranet -> 192.168.1.1 (server IP)

What I want to do, is force all trafic from intranet with destination ports 1-25000;40000-65535, to go through eth1 gateway.
All the remaining destination ports (normaly the ones used by CS), to go through eth0.

This way I would avoid players from lagging because of downloads, etc etc etc.


Can anyone give me a hint how to do it ?

Thanks.

If you are using some sort of Firewall front-end software, you may want to check and see if that does what you want first. Otherwise, check out "iptables". I think it will let you do what you want to do.

EDIT: Do a "$man iptables" and check out the "TARGET EXTENSIONS" section and look for the "ROUTE" extension. This does exactly what you want to do. Just match on the ports you want to redirect, and then call the ROUTE target to send them to the NIC you want.


All times are GMT -5. The time now is 08:04 PM.