* -iYung- <iyung@xxxxxxxxxx> 26. Feb 04: > a. 172.16.30.0/24 > b. 172.16.40.0/24 > c. 159.163.123.0/24 > > What i wanted to do is, I would like to have 2 WAN port and 1 LAN port. > > ----------- > | |---eth0 (a.a.a.a) > eth1 ---| | > | |---eth1 (b.b.b.b) > ----------- > > all segments connected to one router, and the router will route everthing > to 0.0.0.0/0.0.0.0 to eth1 (c.c.c.c) > > My question is, was it possible if: > > a. all internet traffic request coming from segment 172.16.30.0/24 and > 159.163.123.0/24 will go out from eth0 First, this ist not the matter of netfilter. Second, I don't understand this: you want to send requests from .30.0/24 back to .30.0/24 (eth0)? Why? AFAICS this is very foolish and will break you network. Anyway: # ip rule add from 172.16.30.0/24 table 100 # ip rule add from 159.163.123.0/24 table 100 # ip route add default dev eth0 table 100 # ip route flush cache should do the trick. > b. all internet traffic request coming from segment 172.16.40.0/24 will go > out from eth1 The same way: # ip rule add from 172.16.40.0/24 table 101 # ip route add defalut dev eth1 table 101 # ip route flush cache <URL:http://www.tldp.org/HOWTO/Adv-Routing-HOWTO/index.html> HTH, regards, Frank. -- Sigmentation fault