MASQUERADE problem
I have a network with 3 NIC
1. (eth0-> 203.197.xxx.9) Global IP directly connected to the Internet
2. (eth1->202.142.xxx.34 gateway of the network is 202.142.xxx.33)Global IP connected to the Internet through a router with LOCAL LAN (192.168.20.0/24) running on that network
3. (eth2)Local LAN
My server runs ok when all NIC are up. My script is written that when eth0 fails to communicate the Local Lan is masqueraded to eth1.
-A POSTROUTING -s 192.168.50.0/24 -o eth1 -j MASQUERADE
This works fine for INTENET browsing and even lets me to telnet to computers that the connection to the LOCAL LAN of the eth1 from machines of eth2 network.
But the problem lies is that my IP of eth2 masquerade to the GLOBAL IP restricting me to perform some specific jobs which are based from the eth2 (192.168.50.0/24) where the some machines are given permission depending on the their IP.
Please can any one help me to say how I can perform this operation or how I can move in my Local Lan (i.e eth0->203.197.xx.0/27, eth1->202.142.0.xx/24 and 192.168.20.0/24) without getting masqueraded.
Sanjib Gupta
File -> /etc/rc.local
echo "1" > /proc/sys/net/ipv4/ip_forward
route add -net 172.168.10.0 netmask 255.255.255.0 gw 192.168.50.99
route add -net 202.142.xxx.0 netmask 255.255.255.0 gw 202.142.xxx.33
route add -net 192.168.20.0 netmask 255.255.255.0 gw 202.142.xxx.33
route add -net 192.168.10.0 netmask 255.255.255.0 gw 202.142.xxx.33
route add -net 192.168.60.0 netmask 255.255.255.0 gw 202.142.xxx.33
route add -net 192.168.65.0 netmask 255.255.255.0 gw 202.142.xxx.33
route add -net 192.168.70.0 netmask 255.255.255.0 gw 202.142.xxx.33
|