Operating System - Linux
1831343 Members
3077 Online
110024 Solutions
New Discussion

Why the second linux router can not through the masqurade via the other router?

 
SOLVED
Go to solution

Why the second linux router can not through the masqurade via the other router?

all linux router,topologic as bellows:
(internet)gw(inside interface=192.168.6.4)<->(6.254)firewall with masqurade(192.168.0.254)<->(192.168.0.249)linuxrouter1(192.168.1.254)<->(192.168.1.21)linuxroute2(192.168.10.254)<->client(192.168.10.21)

all setting in the linuxrouter1, linuxroute2 are depend on the static route, and client can ping router1(192.168.1.254) via router2, meanwhile the linuxroute2 can ping the gw inside interface(192.168.6.4) via the router1 and the firewall with masqurade.
Now the problem is that the client can not ping the internet gw as it done by the route1, what could be the reason? whether the masqurade can not happen to between the routers?
enclosed is the route table in two routers.


route1:
[root@fw1 root]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.10.0 192.168.1.21 255.255.255.0 UG 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.0.254 0.0.0.0 UG 0 0 0 eth0

the route2:
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 eth0

4 REPLIES 4
Stuart Browne
Honored Contributor
Solution

Re: Why the second linux router can not through the masqurade via the other router?

So 192.168.6.0/24 doesn't know how to talk to 192.168.10.0/24 ?

What's the routing table on 192.168.6.254 look like? Either that, or your firewall-with-masquerade is not masquerading other subnets.
One long-haired git at your service...

Re: Why the second linux router can not through the masqurade via the other router?

Dear,
It is said that I should add one route entry in the 192.168.6.4, or get the firewall masquerade on the both side?

Thanks,
Frederick

Re: Why the second linux router can not through the masqurade via the other router?

Dear Stuart,
I may got confused that once you are right, how the 192.168.6.4 can reply the ping from 192.168.0.0/24? it is simliar but only have the secondary router??

thanks
Frederick

Re: Why the second linux router can not through the masqurade via the other router?

I May see, the the third layer is defference between the two subnet.
thanks gentlman.

Fredeick