From: Krepper Guillermo Billy billy@ciudadglobal.com.ar
To: lartc@vger.kernel.org
Subject: [LARTC] routing ... ip rule, ip route ... please correct me
Date: Tue, 27 Feb 2001 19:27:11 +0000 [thread overview]
Message-ID: <marc-lartc-98373940417060@msgid-missing> (raw)
<PRE>Hi, how are all of you
Well tecnicaly this is not a question its like a correction. So lets get
going.
I have 2 conecctions to the internet:
eth0: 200.1.1.1 64Kbit
eth0:0 200.1.1.2
eth0:1 200.1.1.3
eth1: 66.1.1.1 256Kbit
eth1:0 66.1.1.2
eth1:1 66.1.1.3
eth1:2 66.1.1.4
This are conected to a linux PC. I allso have 3 IP class "private" networks
eth2: 192.168.101.1
eth2:0 192.168.201.1
eth2:1 192.168.220.1
So what I want to do is:
for 192.168.101.0/24 go via eth0
for 192.168.201.0/24 go via eth0
for 192.168.220.0/24 go via eth1
I still haven't this 2 connections and don't have the necesary hardware to
make a home test. So I made a script, here is a fragment of what I can not
test and would like someone to tell me if it's wrong or OK.
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.101.0/24 -j SNAT \
--to 200.1.1.1
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.201.0/24 -j SNAT \
--to 200.1.1.2
iptables -t nat -A POSTROUTING -o eth1 -s 192.168.220.0/24 -j SNAT \
--to 66.1.1.1
echo 500 eth064K >> /etc/iproute2/rt_tables
ip rule add from 192.168.101.0/24 table eth064K
ip rule add from 192.168.201.0/24 table eth064K
ip route add default dev eth0 table eth064K
**NOTE: can I use "via" here?, should I?, witch IP should I use, 200.1.1.1?
echo 600 eth1256K >> /etc/iproute2/rt_tables
ip rule add from 192.168.220.0/24 table eth1256K
ip route add default dev eth1 table eth1256K
**NOTE: same as above
ip route flush cache
-------------------------------------------------------------------------------
Thanks
Billy
</PRE>
reply other threads:[~2001-02-27 19:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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-98373940417060@msgid-missing \
--to=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