All pastes #178989 Raw Edit

Untitled

public text v1 · immutable
#178989 ·published 2006-09-21 20:02 UTC
rendered paste body

# talvez nem precise das redes internas no scope link, tem que testar

ip route add 192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.2 table T1
ip route add 192.168.0.0/24 dev eth3  proto kernel  scope link  src 192.168.0.1 table T1
ip route add default via 192.168.1.1 table T1

ip route add 10.0.0.0/24 dev eth2  proto kernel  scope link  src 10.0.0.2 table T2
ip route add 10.0.1.0/24 dev eth1  proto kernel  scope link  src 10.0.1.2 table T2
ip route add default via 10.0.1.1 table T2


# Mal ae, por causa das regras do iptables os pacotes vão chegar com outro FROM
#ip rule add from 192.168.0.0/24 lookup T1
#ip rule add from 10.0.0.0/24 lookup T2

# Regras corretas
ip rule add from 192.168.1.2 lookup T1
ip rule add from 10.0.0.2 lookup T2