From: Oscar Mechanic <oscar@ufomechanic.net>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] route mail through different gateway
Date: Mon, 07 Aug 2006 12:01:09 +0000 [thread overview]
Message-ID: <1154952069.4237.81.camel@OSCARLAPLIN> (raw)
In-Reply-To: <35207fdf0608031936y2fe970d6pb855fc2f7557d5de@mail.gmail.com>
Silly mistake I always make is too forget to put in NAT on GW.
But what you have done should work. Have you confirmed that this works
on 10.0.0.5
ip route del default
ip route add default via 10.0.0.2
ip route flush cache
If that works maybe try
# Dont know which one of these I think your right it should be output
iptables -t mangle -A PREROUTING -p tcp --dport 25 -j MARK --set-mark
0x1
iptables -t mangle -A OUTPUT -p tcp --dport 25 -j MARK --set-mark 0x1
ip rule add from 10.0.0.0/8 fwmark 1 lookup 200
ip route add default via 10.0.0.2 table 200
# The I would try tcpdump -vv -ni eth? and look at the MACs
# or and check the mark
iptables -I POSTROUTING -p tcp --dport 25 -j LOG
On Fri, 2006-08-04 at 14:36 +1200, Michael wrote:
> Hi All,
>
> I've got server with one LAN card eth0 ip\x10.0.0.5
>
> default access t ointernety done through ADSL router gw 10.0.0.1
> we got second internet access through another ADSL router gw 10.0.0.2
>
> I want to send all e-mail out through gw 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 lookup mail.out
>
> But it is dosen't work
> Any help?
>
> --
> --
> Michael
> _______________________________________________
> LARTC mailing list
> LARTC@mailman.ds9a.nlhttp://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
prev parent reply other threads:[~2006-08-07 12:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-04 2:36 [LARTC] route mail through different gateway Michael
2006-08-07 12:01 ` Oscar Mechanic [this message]
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=1154952069.4237.81.camel@OSCARLAPLIN \
--to=oscar@ufomechanic.net \
--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.