how do I get netwok games to connect over wan [SOLVED]

If none of the more specific forums is the right place to ask

how do I get netwok games to connect over wan [SOLVED]

Postby Bob C » 2020-12-19 17:13

How to safely connect Debian computers over the internet for games is my question really.
I want to play the pacman type game called Njam with a someone in another part of the world.

i can connect and play Njam between two computers on the LAN in my house. To get that working, I needed to created a rule in the ufw firewall on each computer.
On computer A 192.168.0.101 ALLOW IN 192.168.0.102
On computer B "192.168.0.102 ALLOW IN 192.168.0.101".
-------------------------------------
Now I want to connect to a computer on the internet. To try this, I connected computer B to a vpn.
Then I created a new rule, like the rules above, in the ufw firewall using computer B's WAN ip address.
However the computers did not connect.

Any suggestions on how to do this?

Thanks
Last edited by Bob C on 2020-12-26 16:48, edited 3 times in total.
Bob C
 
Posts: 26
Joined: 2007-11-26 17:23
Location: Montreal, QC Canada

Re: how do I get netwok games to connect over wan

Postby Head_on_a_Stick » 2020-12-19 19:42

If you're connecting to the internet through a router then I think you will have to enable port forwarding on the router and also open the relevant port(s) in the router's firewall.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13041
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: how do I get netwok games to connect over wan

Postby mm3100 » 2020-12-20 04:58

Another thing you can do is try zerotier
https://www.zerotier.com/

Basically, once you install clients on all devices and connect them to same zero tier network, it will behave like another lan network, so all you would need is get ip of devices inside zerotier network and use it as local one. That is how I did some games that didn't play nicely with router forwarding.
mm3100
 
Posts: 45
Joined: 2020-10-21 21:39

Re: how do I get netwok games to connect over wan [SOLVED]

Postby Bob C » 2020-12-26 16:34

Thanks for the help.
I was able to play njam over the internet, by setting up port forwarding in this general way;
1. [configure router] Access the configuration GUI of the router, by entering the router’s LAN IP address into a web browser.
2. [configure router] In the Forwarding section enter the LAN IP address of the computer which is running the game server
3. [configure router] In the Forwarding section enter the port number used by the game
4. [configure computer running game server] In the firewall of the computer, add a rule to allow in the port number used by the game
5. Someone running the game client and connecting over the internet enters my WAN ip address, which gets them to the router, which was set up for port forwarding as described above.
For security when not playing the game, the router allows the port forwarding rules to be disabled.
Bob C
 
Posts: 26
Joined: 2007-11-26 17:23
Location: Montreal, QC Canada


Return to General Questions

Who is online

Users browsing this forum: No registered users and 12 guests

fashionable