All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@o2.pl>
To: lartc@vger.kernel.org
Subject: [LARTC] Re: route mail through different gateway
Date: Thu, 10 Aug 2006 13:14:54 +0000	[thread overview]
Message-ID: <ebfbf7$85b$1@sea.gmane.org> (raw)

On 04-08-2006 04:36, Michael wrote:
> Hi All,
> 
> I've got server with one LAN card eth0 ip\x10.0.0.5 <http://10.0.0.5>
> 
> default access t ointernety done through ADSL router gw 10.0.0.1 
> <http://10.0.0.1>
> we got second internet access through another ADSL router gw 10.0.0.2 
> <http://10.0.0.2>
> 
> I want to send all e-mail out through gw 10.0.0.2 <http://10.0.0.2>
> How it can be done?
> I've tried to mark packets:
> iptables -t mangle -A OUTPUT -p tcp --dport 25 -j MARK --set-mark 0x1
> and
> ip ru add fwmark 0x1 table mail.out
> ip ro add default via 10.0.0.2 <http://10.0.0.2> lookup mail.out

You mean:

ip ro add default via 10.0.0.2 table mail.out

Try this also:

echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter

Jarek P.

PS: I hope you have this mail.out properly added (or replace this 
with a number e.g.: 100) and fwmark enabled in kernel config.

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

                 reply	other threads:[~2006-08-10 13:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='ebfbf7$85b$1@sea.gmane.org' \
    --to=jarkao2@o2.pl \
    --cc=lartc@vger.kernel.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.