2 networks, 1 server - just seeing if it is possible

Networking n00b here....

Because of a job opportunity I might be moving into the flat/unit next to my friend and I would like to share my up-coming server project with him.

What I would like to do is to have the server be accessed by both networks (via WiFi) allowing access to my Plex server, mass storage and other dedicated game servers (Minecraft and other Linux compatible servers) but keep both networks separate and maybe allowing certain ports (or just bridging) the connections for LAN games (ones that don't have dedicated servers like Sins of a solar empire).

The server would use my modem for internet connectivity.

How possible and difficult is this?

What Linux (or other platform) Distro would you recommend?

Can you link me to some information on how to do this?

With WiFi, you will need two separate WiFi Adapters on the server. OR, you hard wire to your network and use WiFi to his network.

Then you just make sure your systems default route is set to your network's gateway. Then when assigning services to interfaces, you bind them to be access either by all, or both your internal network's device, or the WiFi.

You can also set up routes between both networks. Which you then add to your DHCP server's assignments. When a computer in your network gets an IP Address, it will assign a route that says, To get to use

Then you do the same for his side. Then you basically have his network, and your network connected via the Server, which you are basically using as a network router.

So any basic Linux flavor can do this or do you have a recommended one?

Also, thanks for the quick reply :)

Any can do it.

I say use what you are comfortable with.

1 Like

You could also just give your sever a static Ip in your router DHCP, and then allow it through the DMZ and then just give your IP to your flat mate. That way you could both use the servers where & when ever you wanted. It would be public though.

This would only take like 5 minutes to do to.

Although for best results, for LAN gaming you would want to get a bridge for your networks to minimize latency.

SO, let me see if this is right...

I set up the server with 2 WiFi cards (I'll get decent ones) and have one connect to my WiFi (Agilly WiFi on wlan0) and the other one to my friends WiFi (Pyro WiFi on wlan1) with the correct passwords and etc.

I then make sure that my default route is my modems IP address (lets say 10.10.1.1)

I install Plex and ensure that its service is bound to both networks (wlan0 and wlan1).

If I we wanted to play something like Sins of a Solar Empire, I would just make a route that would use the port 2000 between wlan0 and wlan1 so each running instance of Sins would see each other.

Do I have the right idea with that?

I don't believe you need to worry about routes(not networking expert). You should be able to do this by just using two WIFI devices and connecting each to a different network. On each network you just connect to the IP of the server on that network. 192.168.1.175 on network 0 and 10.0.0.122 on network 1. That should cover it unless I'm mistaken. As @DeusQain said, you could hard wire one and use WIFI for the other.

I just confirmed this works. If the server is using your network for internet access then remove the default gateway on his network connection like so. This method is using a static IP so I would set it on his router so that it won't assign anything but the server to that IP so you don't get conflict. I was able to access my desktop (server) from both networks using the IP specific to that network.

Awesome @Superfish1000

That will allow him to see things on the server itself (like Plex), but will it allow him to "see" my computer if I was running a server on it?

I'm not sure I understand. Your server would be accessible to both networks. Whatever machine you're using for said server will thus be accessible. Your networks would remain isolated. You wouldn't be able to see machines on his network nor he on yours. Only the server would be visible & accessible to both.

That is great @Superfish1000 I'll just apply that to the Linux distro I'll be using (Because free).

I'll attempt a drawing and see if I can explain it better :)

You can also add DNS entries to your ISP side router, so you could add "Server.blah.blah" with the IP address for your network, and his network specific IP to his router, and you could both use the name to access the server.

How would one do that? I usually just use the machine name to access my server locally.

That would work too, as long as the machine is broadcasting it's name to both networks.

How DNS though... Is that what you meant by routes? Never had the occasion to configure.

Problem 1 (SOLVED): Server is running a program (Plex server) and I want it accessible from both networks.

Problem 2: I am hosting a game (Age of Empires) and the games server is running on my computer. How could I "bridge" the networks for the ports for that game so he could join me from his network?

ps. my drawing skills aren't up to par so I won't include one haha :)

Problem 2 is covered by problem 1 assuming AOE served by your server. As for running it from your machine, you're going to tie your networks together at that point. You could do that through your server I'm sure but @DeusQain could give you better advice than I could.

DNS is domain name service.

Routes are static routes.

DNS is SERVER.DOMAIN.TLD == 192.168.1.26

Route: 192.168.5.0:0.0.0.255 --> 192.168.1.26

meaning. For network 192.168.5.x use 192.168.1.26 as the gateway to that network.

2 Likes

When running Age of Empires, you should have a configuration setting that says something about BIND ADDRESS with instructions to either "bind to all" or bind to a specific address.

Normally bind to all is 0.0.0.0

which means that from his network he can hit the localized ip address for his network.

1 Like

Thank you. Knew the DNS part but routes I've never needed. I'm sure I'll use that at some point now.