All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Samad <alex@samad.com.au>
To: netfilter@lists.netfilter.org
Subject: Re: route outgoing smtp via a specific interface
Date: Mon, 3 May 2004 12:13:43 +1000	[thread overview]
Message-ID: <20040503021343.GJ4200@samad.com.au> (raw)
In-Reply-To: <86u0yytkrb.fsf@poke.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1295 bytes --]

On Mon, May 03, 2004 at 02:30:32AM +0200, Christer Ekholm wrote:
> Antony Stone <Antony@Soft-Solutions.co.uk> 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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-05-03  2:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-02 22:50 route outgoing smtp via a specific interface Christer Ekholm
2004-05-02 23:05 ` Antony Stone
2004-05-02 23:25   ` Christer Ekholm
2004-05-02 23:45     ` Antony Stone
2004-05-03  0:30       ` Christer Ekholm
2004-05-03  2:13         ` Alexander Samad [this message]
2004-05-03  6:15           ` Christer Ekholm
2004-05-03  4:07 ` Alexis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040503021343.GJ4200@samad.com.au \
    --to=alex@samad.com.au \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.