I want to setup a little game server to play on with my friends, I pay for a vps, but it just doesn't have the hardware to run this game server. My own pc could run the server, but opening ports to my pc from the outside internet isn't really an option for me.
So what would be ideal for me would be to forward a port from my pc, through my vps, but I don't really have any networking knowledge and information I found online is pretty confusing to me.
As far as I understand, it might be possible through ssh?
I saw that this person was doing something similar: How to forward a port from one machine to another?
Though, I am a bit confused about the awnser that question got. It mentions doing:
ssh -L 2222:localhost:8888 -N -o GatewayPorts=yes hostname-of-M
In the question, M is supposed to be the main machine, and S the machine server through which the traffic should be routed. The person anwsering mentions: "You can use localhost instead of M" which makes me think that you are supposed to run this command from machine M
But if M is localhost, then where in this command are you actually connecting to S?
I tried using the ip of my vps instead of "hostname-of-M" but that doesn't seem to do much.
So that is where I am at, I think it should be possible through ssh? But I am not entirely sure of that? Is this ssh stuff only possible if M's ip is visible from S, and should I then be running the ssh command from S?. I am just very confused about what this command is supposed to be doing exactly. So... Am I even on the right track here but just missing a step? or do I need a totally different approach?