From: "Martin A. Brown" <mabrown-lartc@securepipe.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] split traffic
Date: Tue, 01 Oct 2002 22:35:16 +0000 [thread overview]
Message-ID: <marc-lartc-103351179510267@msgid-missing> (raw)
In-Reply-To: <marc-lartc-102258819906396@msgid-missing>
Omar,
It looks like you want to set a different default route for the
10.0.0.0/24 network. This can be done as follows:
# ip route add default via 192.168.1.1 table 1
# ip rule add from 10.0.0.0/24 table 1
Your iptables line should work just dandily.....
I think what you are getting confused about is why your existing route
doesn't work. I'd suggest thinking about the name of the chain in the nat
table: POSTROUTING!!
Unless routing table 1 contains something else, there's no explicit
instruction for the outbound packets from 10.0.0.0/24. Add a default
route to that table, and you should have a better solution.
Check out "Multiple Connections to the Internet" in Chapter 7 in my
guide (which is still in the process of being written):
http://plorf.net/linux-ip/
Good luck,
-Martin
: I have the next network:
:
:
: Users LAN Servers LAN
: (10.0.0.0/24 (mail and web [200.30.57.32/24]
: web surf main activity) homologated ip's)
: | |
: | |
: | |
: | |
: |________________________________|
: |
: eth1:1 10.0.0.138 | eth1 200.30.57.33
: |
: {Linux Firewall. kernel 2.4.18}
: |
: eth2 | eth0 200.30.53.22/30
: 192.168.1.2/30|
: |
: _______________/ \______________
: | |
: | |
: {adsl router} {Cisco router} 200.30.53.21/30
: |192.168.1.1 |
: |(phone line) |(DS0)
: | |
: | |
: { -------- Internet ------- }
:
:
:
:
: A network with two links to internet: a DS0 and an adsl.
:
: I want that servers with homologated ip's go via the DS0, and end users,
: with 10.0.0.0 addresses go via adsl. Both links through the same
: firewall.
:
: Also, end users must have Nat, and servers dont. For this i use:
: iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o eth2 -j MASQUERADE
:
: The default gateway in the firewall is the cisco router, my question is:
: How can I make to force packets from 10.0.0.0 go via eth2(192.168.1.2) ?
:
:
: I imagine something like:
:
: ip route add 192.168.1.1/30 via 192.168.1.2 table 1
: ip rule add from 10.0.0.0/24 table 1
:
:
: But doesn't work. What'd be the correct way to do it?
:
:
: Omar
:
:
:
:
:
:
:
: _______________________________________________
: LARTC mailing list / LARTC@mailman.ds9a.nl
: http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
:
--
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-10-01 22:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-28 12:15 [LARTC] split traffic Emil Terziev
2002-05-28 16:36 ` Stef Coene
2002-10-01 22:27 ` Omar Armas
2002-10-01 22:35 ` Martin A. Brown [this message]
2002-10-14 20:55 ` Omar Armas
2002-10-15 0:09 ` Dawid Kuroczko
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-103351179510267@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.