Router -> 2 dsle

Tomasz Buziak [uho] uho w xhost.one.pl
Wto, 10 Lut 2004, 19:34:40 CET


Cytowanie Marteen <marteen w go2.pl>:

> > do tego jeszcze dodac lancuszczki forward za pomoca ipchains
> 
> czy cos takiego wystarczy:
> ipchains ... forward ... -j MASQ .... -i WAN1 (lub WAN2) ??

znalazlem stare skrytpy, 

na 2xsdi wygladalo to tak:

#sdi1
ip route add default via 80.49.141.143 table 100
ip rule add from 192.168.0.1 table 100
ip rule add from 192.168.0.2 table 100
ip rule add from 192.168.0.3 table 100
ip rule add from 192.168.0.4 table 100
ip rule add from 192.168.0.5 table 100
ip rule add from 192.168.0.6 table 100
ip rule add from 192.168.0.7 table 100
ip rule add from 192.168.0.8 table 100
#sdi2
ip route add via 80.49.141.132 table 101
ip rule add from 192.168.0.9 table 101
ip rule add from 192.168.0.10 table 101
ip rule add from 192.168.0.11 table 101
ip rule add from 192.168.0.12 table 101
ip rule add from 192.168.0.13 table 101
ip rule add from 192.168.0.14 table 101
ip rule add from 192.168.0.15 table 101

#sdi1
$IPCHAINS -A forward -i ppp0 -s 192.168.0.1/24 -d 0/0 -j MASQ
$IPCHAINS -A forward -i ppp0 -s 192.168.0.2/24 -d 0/0 -j MASQ
$IPCHAINS -A forward -i ppp0 -s 192.168.0.3/24 -d 0/0 -j MASQ
$IPCHAINS -A forward -i ppp0 -s 192.168.0.4/24 -d 0/0 -j MASQ
$IPCHAINS -A forward -i ppp0 -s 192.168.0.5/24 -d 0/0 -j MASQ
$IPCHAINS -A forward -i ppp0 -s 192.168.0.6/24 -d 0/0 -j MASQ
$IPCHAINS -A forward -i ppp0 -s 192.168.0.7/24 -d 0/0 -j MASQ
$IPCHAINS -A forward -i ppp0 -s 192.168.0.8/24 -d 0/0 -j MASQ
#sdi2
$IPCHAINS -A forward -i ppp1 -s 192.168.0.9/24 -d 0/0 -j MASQ
$IPCHAINS -A forward -i ppp1 -s 192.168.0.10/24 -d 0/0 -j MASQ
$IPCHAINS -A forward -i ppp1 -s 192.168.0.11/24 -d 0/0 -j MASQ
$IPCHAINS -A forward -i ppp1 -s 192.168.0.12/24 -d 0/0 -j MASQ
$IPCHAINS -A forward -i ppp1 -s 192.168.0.13/24 -d 0/0 -j MASQ
$IPCHAINS -A forward -i ppp1 -s 192.168.0.14/24 -d 0/0 -j MASQ
$IPCHAINS -A forward -i ppp1 -s 192.168.0.15/24 -d 0/0 -j MASQ


--
Tomasz Buziak, pozdrawiam ... 
# cd /pub && more beer



Więcej informacji o liście dyskusyjnej pld-users-pl