Re: route outgoing smtp via a specific interface

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

 



On Monday 03 May 2004 12:25 am, Christer Ekholm wrote:

> Antony Stone <Antony@xxxxxxxxxxxxxxxxxxxx> writes:
> > On Sunday 02 May 2004 11:50 pm, Christer Ekholm wrote:
> >> I have two IP-providers. And the faster one of them blocks smtp. I
> >> have been trying to route smtp to the slower while still routing
> >> everything else to the faster, without success. Is it possible at all?
> >
> > IProute2, http://lartc.org
>
> Thankyou for the answer. I have read that, and tried everything I
> could think of.

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.

> 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

Regards,

Antony.

-- 
Never write it in Perl if you can do it in Awk.
Never do it in Awk if sed can handle it.
Never use sed when tr can do the job.
Never invoke tr when cat is sufficient.
Avoid using cat whenever possible.

                                                     Please reply to the list;
                                                           please don't CC me.



[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