Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / How to host game behind a router?

Author
Message
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 3rd Apr 2016 11:59
Hello everybody. I need your input regarding multiplayer.

Lets say that we made a multiplayer game in AppGameKit, and wishes to host it over the internet for other clients to connect to.
And we happened to be behind a router.

What IP address do the clients needs to connect to?
Can we do it without port-forwarding?
And if really absolutely need to port-forward, is there an easy way to do it?

I've only tested the program over local network, and I assumed the requirement would change if played over the internet connection.

So, is there an easy way to host it over the internet, behind a router?
merlin_it
7
Years of Service
User Offline
Joined: 7th Apr 2016
Location:
Posted: 7th Apr 2016 16:01
Hello There,

I am brand new to AppGameKit, but not to networking.

Unless you are directly connected to the internet, (no router between your modem and computer, definitely not a good idea) you will have to use port forward.
From behind the router, any device can go to a webpage such as www.ipchicken.com to find your external IP address. This is what you will provide to whom ever you are sending the game to.
Port-forwarding has to be done at the router level, by knowing what your default gateway is, you can web to that address, log in to the router and under the "Advanced" or "Game App" area you can configure the port you have setup in your game to point to the internal ip address of the device hosting the game.

From a visual point of view it would look something like

Client A connects to external IP n.n.n.n:65202(port) Router of n.n.n.n says that's me, oh port 65202 that goes to x.x.x.x:65202 on your LAN side. Where x.x.x.x is the IP of your device hosting the game.

Hope that helps.


hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 8th Apr 2016 01:41 Edited at: 8th Apr 2016 01:43
Hey merlin_it, thanks for the insight.

My router at my permanent resident broke down today, just when I decided to return home (nice timing), so currently I'm using mobile internet hotspot which tethered to my PC.

Any idea on how to port-forward on Android, so that my PC which is tethered to it can host a game?

I tried to use apps Port Forwarder like http://play.google.com/store/apps/details?id=at.bherbst.net&hl=en
but I failed to understand which IP my game(host) need to connect to (internal i guess), and which port to use (as there are 2 ports opened (supposedly), one on my PC and one on my smartphone).
Not sure what it meant by public interface ( wlan0, lo, and rmnet0) either.
merlin_it
7
Years of Service
User Offline
Joined: 7th Apr 2016
Location:
Posted: 9th Apr 2016 05:44
Honestly, don't know if you want to even entertain trying to to do that on a hotspot connection.

Public interface is what has the externally routable IP address. The internal IP address is what is displayed when you look at the WIFI settings on the attached device. That IP address is an "internal" or non-routable ip address.
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 10th Apr 2016 07:19
Ok something freakish happened.

My router was fine before, but suddenly it refused to connect.

This site can’t be reached
192.168.1.6 refused to connect.
ERR_CONNECTION_REFUSED


I tried both the local and public IP address. but to no avail.

Anybody have any idea?

Login to post a reply

Server time is: 2024-03-28 12:59:01
Your offset time is: 2024-03-28 12:59:01