* [LARTC] routing ... ip rule, ip route ... please correct me
@ 2001-02-27 19:27 Krepper
0 siblings, 0 replies; only message in thread
From: Krepper @ 2001-02-27 19:27 UTC (permalink / raw)
To: lartc
<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>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-02-27 19:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-27 19:27 [LARTC] routing ... ip rule, ip route ... please correct me Krepper
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.