From: "Martin A. Brown" <mabrown-lartc@securepipe.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] routing to 2 different Internet connections
Date: Mon, 09 Sep 2002 15:31:01 +0000 [thread overview]
Message-ID: <marc-lartc-103158551130442@msgid-missing> (raw)
In-Reply-To: <marc-lartc-103158485229636@msgid-missing>
Rimas,
This pseudo-code may not be the correct solution for you, but it should
help you get on the right track...there is documentation out there to help
you figure out what you need to do--good luck!
# -- are you following the LARTC two-link howto?
# http://lartc.org/howto/lartc.rpdb.multiple-links.html#AEN261
# make sure you set up default routes in two separate routing tables
ip route add default via $ETH0_GW table eth0.link
ip route add default via $ETH2_GW table eth2.link
# -- add rules to the RPDB in order from most general to most specific
#
ip rule add from 10.105.105.0/24 table eth2.link
ip rule add from 10.105.105.100 table eth0.link
ip rule add from 10.105.105.101 table eth0.link
ip rule add from 10.105.105.102 table eth0.link
ip rule add from 10.105.105.103 table eth0.link
ip rule add from 10.105.105.104 table eth0.link
ip rule add from 10.105.105.105 table eth0.link
As I mentioned above, Rimas, you'll want to look at the split access howto
of the LARTC HOWTO. If that's not enough to make sense of it, you'll need
to refer to the iproute2 manual, which is available as HTML here:
http://defiant.coinet.com/iproute2/ip-cref/
Post to the list with more specific questions if you have them....and
hopefully somebody else with a more elegant solution will post in the
interim.
Ciao for now,
-Martin
: Hi folks,
:
: I have iptables rules:
: iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE
: iptables -A POSTROUTING -t nat -o eth2 -j MASQUERADE
: That will masquerade all packets going out of the two external interfaces.
:
: How to make a routing with iproute2 to direct packets from
: 10.105.105.100-105 via eth0 and to direct packets from the rest of and
: 10.105.105.0/24 via eth2 ?
:
: Thanks in advance
:
: Rimas
:
--
Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next prev parent reply other threads:[~2002-09-09 15:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-09 15:19 [LARTC] routing to 2 different Internet connections Rimas
2002-09-09 15:31 ` Martin A. Brown [this message]
2002-09-10 10:39 ` Rimas
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=marc-lartc-103158551130442@msgid-missing \
--to=mabrown-lartc@securepipe.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 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.