# Simple routing question[Solved]

## madchaz

Apparently, I fail at google today and I can't for the life of me find the info I need to do what I'm trying to do. 

Some information. 

My network is setup as follow. 

Big bad internet is connected to a gentoo virtual machines used as a router

The router as 4 network interfaces. One for the internet (wan) and 3 for other networks. For convinience, let's call them LAN1, LAN2 and LAN3

Machines on the LAN1 and LAN2 network can get on the internet fine using NAT. Those on LAN3 can't, by design. 

The Router as the following IPs

LAN1: 192.168.27.2

LAN2: 192.168.2.2

LAN3: 192.168.10.2

Now I want to be able to connect to hosts in LAN3 from LAN1 via the router, who is LAN1's default gateway. I want to do this "directly", IE using the real IP address of, say 192.168.10.X from any host sitting in LAN1 that as an IP of 192.168.27.Y

How do I get the router to route the packets from LAN1 to LAN3? I had this running on the "router distro" I was using before using the web UI, but can't for the life of me find the right cli command to get the result!

Edit: Edited to correct some errors

----------

## papahuhn

I don't understand your netwok setup and/or what you try to achieve. You want to connect from LAN1 to LAN3 "directly"(?) via an IP from LAN2? Can you elaborate this a little more?

----------

## madchaz

The router sits in all networks and is the default gateway.

I want hosts in LAN1 to be able to ping and connect to any services offered by machines in LAN3.  

So if I ping a machine in LAN3 from a machine in LAN1, the router handles it correctly and the ping gets there and I get a reply.

----------

## papahuhn

In the network topology you described, this should have worked already.

----------

## madchaz

Well, it's not working at the moment. If I try to connect to something in LAN3 from LAN1, it times out.

----------

## madchaz

 *papahuhn wrote:*   

> I don't understand your netwok setup and/or what you try to achieve. You want to connect from LAN1 to LAN3 "directly"(?) via an IP from LAN2? Can you elaborate this a little more?

 

Sorry, had a typo in my post. 

No, from LAN1 to LAN3. Edited that post to correct

----------

## madchaz

OK, fixed it. Guess I was looking in the wrong place. Had an error in my firewall script blocking the trafic. 

>.<

----------

