MAC OS X Server Lion – how to join two subnets

mac-osx-serversubnetvpn

I've got two routers connected to two different providers. I also have Mac OS X Lion server connected to both of them, so it looks like this:

   [INTERNET]        [INTERNET]
       |                  |
    [router]          [router]
       |                  |
[192.168.1.0/24]  [192.168.10.0/24]
       |                  | 
       |---[Mac Server]---|
       |                  |
  [computers #A]    [computers #B]

No what I'm trying to do is to make computers from subnet #A see computers from subnet #B and vice-versa. Mac Server has 192.168.1.100 and 192.168.10.100 IPS and it sees both networks. However when I'm setting VPN I can see only a network depending from which subnet I connect from. So if I connect to VPN via 192.168.1.100 I can see 192.168.1.0/24 network and ONLY 192.168.10.100 IP (server itself). When I connect via 192.168.10.100 I can see 192.168.10.0/24 network and ONLY 192.167.1.100.

Is there is something missing here? I didn't set any routing/nat except those created magically by MAC OS X itself. It also doesn't have to be via VPN – I just want connect those subnets, nothing more.

Thanks in advance!

Best Answer

If you want subnet A to see subnet B, you will need to add a static route on the server, and then also add the route to each PC

Server:

route -n add 192.168.1.0/24 192.168.1.100
route -n add 192.168.10.0/24 192.168.10.100

Clients

[root@192.168.10.x]# route -n add 192.168.1.0/24 192.168.10.100
[root@192.168.1.x]# route -n add 192.168.10.0/24 192.168.1.100