News: This forum is now permanently frozen.
Pages: [1]
Topic: Static route setup for linking networks.  (Read 2060 times)
« on: May 21, 2013, 20:30:49 »
watercooled *
Posts: 11

So, I've been at this for hours, trying to get it to work on a lab setup but to no avail. I'm sure I'm missing something simple but I'm making no progress while I'm stressed.

Essentially, what I'm trying to do is join two otherwise completely separate networks in order to allow data transfer between the two. In other words, I want any traffic destined for the LAN subnet of one system to pass through an OPT<--->OPT link to the other, and vice-versa. Public IP re-routing would be nice too, but I understand m0n0wall doesn't currently support NAT reflection so I'll skip over that for now. Tongue

Example:

Network 1:
LAN 192.168.0.1/24
OPT1 192.168.10.1/24
Static route - OPT1 192.168.20.0/24 192.168.10.2

Network 2:
LAN 192.168.20.1/24
OPT1 192.168.10.2/24
Static route - OPT1 192.168.0.0/24 192.168.10.1

I've opened up the firewalls for ease of testing, but I can't seem to successfully ping the other network from clients. Even if I scrap the static routes, I can only ping the IP of the remote OPT interface from the local m0n0wall system (selecting OPT1 target, of course), not any local clients. Is there some issue linking OPT interfaces?

This post http://forums.wi-fiplanet.com/showthread.php?10720-Linking-two-(physically-separated)-networks&s=15aae54e586324a643fe8069de4e365f&p=40519#post40519, on another forum, looks like a fairly similar setup, but I'm just using a direct connection rather than a wireless bridge.

Many thanks in advance!
« Reply #1 on: May 21, 2013, 21:28:06 »
Lee Sharp *****
Posts: 517

Try this...

Static route - LAN 192.168.20.0/24 192.168.10.2
Static route - LAN 192.168.0.0/24 192.168.10.1
« Reply #2 on: May 21, 2013, 21:41:48 »
watercooled *
Posts: 11

Thanks for the reply. It seems to solve part of the problem, I can now ping the remote LAN interface from the local m0n0wall box, but traffic (pings) still isn't passing from any clients on the LAN to the other one.

Also, unless I'm missing something, the following quote from the m0n0wall guide is misleading:
Quote
Interface: select the interface to which the route must be applied. This is the interface off of which the destination network is located.

I've probably messed something up without noticing as I see no reason I shouldn't be able to ping even the remote OPT interface from the local LAN as I've used OPT interfaces for other purposes in the past and traffic passed between them without such problems, so I might try restoring defaults and starting over.
« Reply #3 on: May 21, 2013, 22:57:50 »
watercooled *
Posts: 11

OK so even after starting from scratch, that strange issue remains. I can ping from m0n0>m0n0, but for some reason client>m0n0>m0n0 fails. If I replace the second m0n0 with another system, so client>m0n0>client, it works as expected.

I've no idea why the OPT interface on the remote m0n0 will respond to pings directly from the other m0n0 but not clients connected to it?

Edit: And going by the status LEDs on the NICs, of which there are separate ones for transmit and receive, it seems the ping is being transmitted to the remote m0n0, but nothing is being returned.
« Last Edit: May 21, 2013, 23:08:07 by watercooled »
« Reply #4 on: May 22, 2013, 16:55:51 »
watercooled *
Posts: 11

OK just to update, I've sorted it, but I'm not exactly sure how, or more specifically why it wasn't working in the first place.

The routes I posted are correct for my purposes, the interface you select has to be the one the destination network can be reached on.

I can only assume, being tired, human error was to blame, entering the wrong gateways either side or something.

In response to the last issue I was having, again being tired and stressed, I wrongly assumed m0n0wall would respond to any pings on the same interface. Of course, if the source IP of a ping isn't in its routing table it won't know where to send it. Add the correct static route on the destination box and it responds as expected.

Thanks for looking, and hopefully this can be of some help if anyone else gets stuck. Smiley
 
Pages: [1]
 
 
Powered by SMF 1.1.20 | SMF © 2013, Simple Machines