> iptables -A OUTPUT -t mangle -p tcp --dport 25 -j MARK --set-mark 25 > ip rule add fwmark 25 lookup mail > ip route add default via xxx.xxx.xxx.xxx dev ppp0 table mail > > Running tcpdump it appears that port 25 traffic is be routed through the > ADSL connection. However, the source IP address appears to be the cable IP Correct routing is kinda odd in this case, as IPTABLES OUTPUT happens after OUTPUT ROUTING, according to KPTD (http://www.docum.org/stef.coene/qos/kptd). > address (cable is the default gateway). I have put SNAT rules in place, > however they don't seem to work. > > The SNAT rules I used were: > > iptables -t nat -A POSTROUTING -o ppp0 -j SNAT --to yyy.yyy.yyy.yyy > and the same thing with the cable connection. > > Rememeber, the packets are being generated locally through the mail server > (qmail). IPTABLES POSTROUTING happens for both locally originated and forwarded traffic (see KPTD); it should have worked. Anyway, binding the mail server to the intended IP address (by adding it to the tcpserver call) should also do this part of the job. Rubens _______________________________________________ LARTC mailing list / LARTC@xxxxxxxxxxxxxxx http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/