routing mail on a different gateway

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Good Morning,

I have a linux box with two dsl modems on it (connection is done via pppoe), I'm trying to route default traffic on the primary connection (ppp0) and mail traffic on another one (ppp1).

This traffic should be able to come from the localhost or the lan via NAT.

I run Slackware 9.1 (Kernel 2.4.22), recompiled with necessary options for using iproute2.

According to the advanced routing howto, I did the following :

iptables âA PREROUTING âi eth0 ât mangle âp tcp ââdport 25 âj MARK ââsetâmark 1
iptables âA PREROUTING âi lo ât mangle âp tcp ââdport 25 âj MARK ââsetâmark 1


I'm not sure whether "lo" is needed.

echo 201 mail.out >> /etc/iproute2/rt_tables
ip rule add fwmark 1 table mail.out

/sbin/ip route add default via [Second's ISP Gateway] dev ppp1 table mail.out

I get no error message, and ip rule ls and ip route show params where recorded.

But if I do telnet somemail.server.com 25, I get a timeout and no data is sent via ppp1 (seen using ifconfig ppp1 or tcpdump -i ppp1).

I can't figure what can be wrong nor where I should start looking for.
I also looked in the ip-cref doc and found nothing that could help me.

Feel free to ask me on any point I would have forgotten.

Do you have an idea in order to solve this problem ?

Thanks, in advance !

Julien.




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux