From: "the sew" Date: Thu, 02 Nov 2006 07:13:04 +0000 Subject: [LARTC] src routing and fwmark Message-Id: MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============1716308878==" List-Id: To: lartc@vger.kernel.org --===============1716308878== Content-Type: multipart/alternative; boundary="----=_Part_1734_8178624.1162451584508" ------=_Part_1734_8178624.1162451584508 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I've got 2 lines from two diffrent ISP's, one is a leased line and another a DSL line, I route certain ips over the DSL line for faster access and would like email to go over the leased line as it has a static ip and is our sending mailserver ip I would like to send mail to the same ips that is routed over DSL via the leased line, otherwise my server gets blacklisted with the DSL ip my routing table 164.148.0.0/14 dev ppp0 scope link 196.0.0.0/8 dev ppp0 scope link default via 196.34.17.1 dev eth0 proto zebra equalize If I send mail to a ip on 196.0.0.0/8 on port 25 it must go via 196.34.17.1 my other routing tables: 200 dmz 201 ppp ip rule add fwmark 25 table dmz ip route add default via 196.34.17.1 table dmz iptables -t mangle -A OUTPUT -p tcp --dport 25 -j MARk --set-mark 25 I can see the packets get matched but still goes via ppp0, is there anyway to overcome this? Thanks Sew ------=_Part_1734_8178624.1162451584508 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi,

I've got 2 lines from two diffrent ISP's, one is a leased line and another a DSL line,

I route certain  ips over the DSL line for faster access and would like email to go over the leased line as it has a static ip and is our sending mailserver ip

I would like to send mail to the same ips that is routed over DSL via the leased line, otherwise my server gets blacklisted with the DSL ip

my routing table

164.148.0.0/14 dev ppp0  scope link
196.0.0.0/8 dev ppp0  scope link
default via 196.34.17.1 dev eth0  proto zebra equalize

If I send mail to a ip on 196.0.0.0/8 on port 25 it must go via 196.34.17.1

my other routing tables:
200     dmz
201     ppp

ip rule add fwmark 25 table dmz
ip route add default via 196.34.17.1 table dmz

iptables -t mangle -A OUTPUT -p tcp --dport 25 -j MARk --set-mark 25


I can see the packets get matched but still goes via ppp0, is there anyway to overcome this?

Thanks

Sew


------=_Part_1734_8178624.1162451584508-- --===============1716308878== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --===============1716308878==--