From: Nelson Castillo <nelsoneci@gmail.com>
To: lartc@vger.kernel.org
Subject: [LARTC] Routing for multiple uplinks and SNAT to 2 source IPs
Date: Sun, 29 May 2005 00:22:43 +0000 [thread overview]
Message-ID: <2accc2ff050528172293d5751@mail.gmail.com> (raw)
Hi,
I configured a router box to use 2 providers, as described
in the HOWTO. (Apendix 1)
I want to use both links to reach a single smtp server. As I read
in the kptd and in some old messages of this list, doing a SNAT
in the postrouting chain comes _after_ the routing desision.
So I guess the following lines I'm trying to use are wrong.
(See Apendix 1)
What can I do to have multiple connection to the same IP to
use both links?
Do the following lines have some effect after I do SNAT in the
mangle table of the POSTROUTING chain?
# use the right route if the source address is already set
ip rule add from $IP1 table T1
ip rule add from $IP2 table T2
Thanks a lot!
Nelson.-
Apendix 1:
# SNAT the internal networks using round robin. I think this wont work.
iptables -t nat -A POSTROUTING -o $IF1 -s 192.168.0.0/255.255.255.0
-j SNAT --to-source $IP1 --to-source $IP2
iptables -t nat -A POSTROUTING -o $IF1 -s 192.168.10.0/255.255.255.0
-j SNAT --to-source $IP1 --to-source $IP2
iptables -t nat -A POSTROUTING -o $IF2 -s 192.168.0.0/255.255.255.0
-j SNAT --to-source $IP1 --to-source $IP2
iptables -t nat -A POSTROUTING -o $IF2 -s 192.168.10.0/255.255.255.0
-j SNAT --to-source $IP1 --to-source $IP2
[1] http://lartc.org/howto/lartc.rpdb.multiple-links.html
[2] http://www.docum.org/docum.org/kptd/
--
Homepage : http://geocities.com/arhuaco
The first principle is that you must not fool yourself
and you are the easiest person to fool.
-- Richard Feynman.
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
next reply other threads:[~2005-05-29 0:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-29 0:22 Nelson Castillo [this message]
2005-05-29 16:29 ` [LARTC] Routing for multiple uplinks and SNAT to 2 source IPs gypsy
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=2accc2ff050528172293d5751@mail.gmail.com \
--to=nelsoneci@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox