policy-based routing-help
Hello All,
I have a linux box with advanced routing enabled.
I have two NIC one connected to LAN and another connected to two different ISPs router.
Even in LAN interface i have two ip address that get packet from two different network.
LAN1 has ip address in 172.16.1.0/32 and LAN2 has ipaddress in 172.16.5.0/32 so i asigned 172.16.1.1 and aliase as 172.16.5.1 in linux box LAN interface and in internet interface 10.3.3.5 and aliase as 192.1.157.34.
I want LAN1 users go through 10.3.3.5 and LAN2 user go through 192.1.157.34
I set default gw as 10.3.3.6 in eth1.
and policy route as
echo 200 suresh >> /etc/iproute2/rt_tables
ip rule add from 172.16.1.0/32 table suresh
ip rule ls
0: from all lookup local 32765: from 172.16.1.0/32 lookup suresh 32766: from all lookup main 32767: from all lookup default
ip route add default via 192.1.157.35 dev eth1 table suresh ip route flush cache
My problem i can communicate from LAN2 but i can not communicate from LAN1 where i set policy routing.
Do i need some more configuration in Advanced routing and Should i need to use iptables for masquerading
Thanks
Suresh
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hello All,
I have a linux box with advanced routing enabled.
I have two NIC one connected to LAN and another connected to two different ISPs router.
Even in LAN interface i have two ip address that get packet from two different network.
LAN1 has ip address in 172.16.1.0/32 and LAN2 has ipaddress in 172.16.5.0/32 so i asigned 172.16.1.1 and aliase as 172.16.5.1 in linux box LAN interface and in internet interface 10.3.3.5 and aliase as 192.1.157.34.
I want LAN1 users go through 10.3.3.5 and LAN2 user go through 192.1.157.34
I set default gw as 10.3.3.6 in eth1.
and policy route as
echo 200 suresh >> /etc/iproute2/rt_tables
ip rule add from 172.16.1.0/32 table suresh
ip rule ls
0: from all lookup local 32765: from 172.16.1.0/32 lookup suresh 32766: from all lookup main 32767: from all lookup default
ip route add default via 192.1.157.35 dev eth1 table suresh ip route flush cache
My problem i can communicate from LAN2 but i can not communicate from LAN1 where i set policy routing.
Do i need some more configuration in Advanced routing and Should i need to use iptables for masquerading
Thanks
Suresh
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/