# Splitting web access between isp's

## ivanova

I'm connecting to two  isp's and I want to split web traffic between them. I want to use IM on the one isp and general high bandwidth applications on the other. It looks like it is possible with route, but I'm lost in the man pages  :Wink: 

Do someone have a simple working solution?

Thanks

----------

## Zi7

How do you mean to differentiate among packets?

Following the app that's created it? Following the content of the packet? Following the destination port? Following the destination address?

Whatever, i'd use an iptables rule to do that... ^^

----------

## Brainfart

You'll probably have to go by port numbers.  A random look the iptables site found this, which said:

 *Quote:*   

> Specifying Protocol
> 
> The protocol can be specified with the `-p' (or `--protocol') flag. Protocol can be a number (if you know the numeric protocol values for IP) or a name for the special cases of `TCP', `UDP' or `ICMP'. Case doesn't matter, so `tcp' works as well as `TCP'.
> 
> The protocol name can be prefixed by a `!', to invert it, such as `-p ! TCP' to specify packets which are not TCP.

 

I don't know of a better way to do it off the top of my head...

----------

## ivanova

Yeah, but how do I redirect/filter traffic to go to different interfaces?

----------

## Zi7

You'll have to use the ROUTE target in the 'mangle' table.

----------

## ivanova

 *Zi7 wrote:*   

> You'll have to use the ROUTE target in the 'mangle' table.

 

Thanks  :Wink: 

Something like this should do the trick right?

```
iptables -t mangle -A PREROUTING -p tcp --dport 5222 -j ROUTE --oif eth1
```

But I get this error

```
iptables v1.3.5: Unknown arg `--oif'

Try `iptables -h' or 'iptables --help' for more information.
```

----------

## manuels

old topic. but anyway: I'm having the same problem.

Did you solve it?

----------

