Since you don't want to go through the Internet, you don't want a VPN.
You need:
- networks A and B to be different, non-overlapping IP scopes;
- a router between the two networks; and
- gateways that let you add additional routs.
The router needs to have two separate ethernet connecters on it. The reason for this is because if you are using DHCP on either network, you need to be able to isolate the DHCP traffic to the appropriate network. If you just glue the two networks together with an ethernet wire, there's no way to guarantee that PCs on network A wouldn't get DHCP from network B, and then use network B's internet.
So your network diagram would look like this:
PC A1 PC A2 PC B1 PC B2
\ / \ /
Gateway A ------ Router ----- Gateway B
| |
ADSL modem A ADSL modem B
Then, Gateway A would have a route on it telling it that Network "B" was reachable via the A address on the router; Gateway B would have a route on it telling it that network "A" was reachable via the B address on the router.
Now if you have a Linux-based firewall as either Gateway, then you can probably just put another ethernet card in it and have that Gateway act as the router as well, but that's left as an exercise for the reader.
If one of the PCs involved is stronger than consumer-grade Windows and has multiple ports, I believe that it could act as the router too. I don't think XP or Vista can act as a router, though.
Also, if you have a more "business" level firewall as either gateway, you may be able to mark some ports as a different "security zone" and use that box as the router.
Note that the Linksys or D/Link "DMZ" functionality is NOT what I am talking about here.
But my guess is we are talking $50 cheapie firewalls here, so you are probably looking at scrounging another box to do this job.
As a short term fix, you could replace one of the Gateways with a small switch, disconnect the DSL from that side of the network, and run a long cable to the other apartment. Then reboot the computers on the now-disconnected side. That would make those computers join the other network, which means that for the duration of the game they'd be using the Internet from the other apartment, but it would at least let you play. ie:
PC A1 PC A2 PC B1 PC B2
\ / \ /
Gateway A ------ cable ----- switch
|
ADSL modem A
1You don't need a middle gateway, just put DD-WRT or similar on one of the gateways. Any replacement firmware that allows you to configure vlans will do. If network A is 192.168.1.x and B is 192.168.2.x, you would just need to configure a port on a new vlan on gateway A and give it an IP of 192.168.2.2. connect that port to gateway B. Then on gateway B add a static route for 192.168.1.x through 192.168.2.2. – user23307 – 2010-03-21T17:04:16.333
@DavidMackintosh Can you please provide an example of a router that will fit the requirement? I understand that proposing specific brand or model may not be acceptable, but you could just provide the characteristics. Could a old pc running pfsense or similar software be used? – leopal – 2019-05-06T10:39:17.590
Thank you, that's very thorough. What if one was to deactivate DHCP and have all PCs use static addresses from their respective subnets? Would that remove the need for a middle router? – Alex J – 2009-09-04T15:05:49.860
It would, yes, but DHCP is very useful. – David Mackintosh – 2009-09-04T15:33:02.877
3If you disable DHCP on one router, the other one will serve as a DHCP for the whole network. – Andrew Moore – 2009-09-05T03:48:28.267