From: Sysadmin <sysadmin@e-positive.ee>
To: lartc@vger.kernel.org
Subject: [LARTC] 3 nic -s, 1 lan, 2 internet connections, ip based routing and
Date: Thu, 10 Apr 2003 17:05:29 +0000 [thread overview]
Message-ID: <marc-lartc-104999439526968@msgid-missing> (raw)
[-- Attachment #1: Type: text/plain, Size: 2007 bytes --]
Hello.
I have problem to solve, redhat 6.3 based linux router, 3 network cards,
eth1, 192.168.10.1 connected to switch, eth0 213.180.9.x connected to
one adsl bridge and eth0 213.34.9.x connected to another adsl bridge.
Group one ---| | | eth0 213.180.9.x
| HUB | --- eth1 192.168.30.1 |
Group two ---| | | eth2 213.34.9.x
So one internal subnet, users from group one
(192.168.10.2, 192.168.10.3, 192.168.10.4, 192.168.10.5) are allowed use
eth0 and users from group two 192.168.10.10, 192.168.10.11,
192.168.10.12, 192.168.10.13 are allowed to use eth2 for internet
connection, no load balancing etc is needed, the idea is just one router
for two separate companies. So i made iptables nat rules:
$IPTABLES -A POSTROUTING -t nat -o eth0 -s 192.168.30.2 -j SNAT --to-source
213.180.9.x
$IPTABLES -A POSTROUTING -t nat -o eth0 -s 192.168.30.3 -j SNAT --to-source
213.180.9.x
$IPTABLES -A POSTROUTING -t nat -o eth0 -s 192.168.30.4 -j SNAT --to-source
213.180.9.x
$IPTABLES -A POSTROUTING -t nat -o eth0 -s 192.168.30.5 -j SNAT --to-source
213.180.9.x
$IPTABLES -A POSTROUTING -t nat -o eth2 -s 192.168.30.10 -j SNAT
--to-source 213.34.9.x
$IPTABLES -A POSTROUTING -t nat -o eth2 -s 192.168.30.11 -j SNAT
--to-source 213.34.9.x
$IPTABLES -A POSTROUTING -t nat -o eth2 -s 192.168.30.12 -j SNAT
--to-source 213.34.9.x
$IPTABLES -A POSTROUTING -t nat -o eth2 -s 192.168.30.13 -j SNAT
--to-source 213.34.9.x
But now i have routing problems, as both internet connections are
default route and i can use only one settings in /etc/syscondig/network:
GATEWAY="213.180.9.x"
GATEWAYDEV="eth0"
Then i found http://lartc.org/howto/lartc.rpdb.multiple-links.html but
seems this is not 100% what i need, as there is no internal network
interface included and routing is possible to network, not ip based.
Is it possible to get it work at all, and if so, then how?
--
Mart Pirita
--
Mart Pirita
[-- Attachment #2: Type: text/html, Size: 2833 bytes --]
next reply other threads:[~2003-04-10 17:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-10 17:05 Sysadmin [this message]
2003-04-10 17:26 ` [LARTC] 3 nic -s, 1 lan, 2 internet connections, ip based routing Martin A. Brown
2003-04-10 18:29 ` [LARTC] 3 nic -s, 1 lan, 2 internet connections, ip based Sysadmin
2003-04-10 19:13 ` Martin A. Brown
2003-04-10 19:53 ` Sysadmin
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-104999439526968@msgid-missing \
--to=sysadmin@e-positive.ee \
--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.