> So, there's a trouble.
>
> I have debian etch linux. 2.6.18-4 kernel.
>
> On this computer i have three interfaces: eth0 - my lan, eth1, eth2 -
> providers.
>
> By default all internet traffic routed through eth2. But i NEED to
> route mail and icq (tcp110, tcp25, tcp5190) through eth1. How can i do
> that?
A while ago ive used a similar configuration, what ive done was:
- create additionall routing table
add all regular entries to it with changed default gateway for the second provider like:
ip route add xxx.xxx.xxx.xxx via yyy.yyy.yyy.yyy table 2
...
ip route add default via IP_OF_2ND_GATEWAY table 2
- mark desired traffic with iptables
iptables -I FORWARD -s LAN_NET/MASK -p tcp --dport XXX -j MARK --set-mark 2
- use ip rules to direct marked packets via alternative routing table
ip rule add fwmark 2 table 2
- and maby add additionall rule to make all packages originating at eth1 ip to go via table 2
ip rule add from ETH1_IP table 2
should be more or less something like this, though i dont recall if syntax was exactly like ive wrote above.
big dissadvantage of this solution is utilisation of marks, that might be used for another purpose.
--
Radek 'Goblin' Pieczonka
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
[Bugtraq]
[Fedora Legacy]
[GCC Help]
[Yosemite News]
[Yosemite Photos]
[IP Tables]
[Netfilter Devel]
[Fedora Users]