On Mon, May 03, 2004 at 02:30:32AM +0200, Christer Ekholm wrote: > Antony Stone <Antony@xxxxxxxxxxxxxxxxxxxx> writes: > > > Ah. Sorry if my previous response seemed a little terse - I did not realise > > you were aware of iproute2 and had tried so much of it already. > > Don't be sorry, your assumption was perfectly valid. > > > > >> I think my problem is that I need this to work from the host with the > >> connections to the providers. (localhost). > >> > >> My next thought was to use iptables to add a SNAT rule. But SNAT is only > >> allowed in POSTROUTING, and I think I would need that in OUTPUT > > > > I would recommend that you do try such a rule, since POSTROUTING happens after > > OUTPUT (and FORWARD). > > > > Try: > > > > iptables -A POSTROUTING -t nat -p tcp --dport 25 -j SNAT --to 217.215.183.181 > > > > Ok, that almost makes it work. tcpdump shows the packets with the > correct sourceaddr, and I can see the returnpackets also. But they > doesn't seem to reach my telnet process, because it just sits waiting. > > $telnet vishnu.netfilter.org 25 > Trying 213.95.27.115... On a different thought can't you tell your mta to bind to a specific interface or use a specific address ( I can with exim) > > -- > Christer > >
Attachment:
signature.asc
Description: Digital signature