Network gaming between two firewall'ed machines using ssh port forwarding


Intro

Crack-Attack rules. But if you're behind a firewall, you won't be able to play against a friend who's also behind a firewall. That sucks. If you or a friend of yours is an admin of an ssh server somewhere, let's use it to forward the game connection :).


Step by step

Prepare the ssh server to forward not only to the loopback address

By default, open-ssh will forward only to the loopback network address (e.g. localhost), when doing port forwarding. Set the GatewayPorts option to yes in the ssh server config file (usually /etc/ssh/sshd_config), so that we will be able to access the forwarded port from outside the ssh server. For more details, read sshd_config(5).

Forward the server port

On one of the two gamers machine, log on the ssh server and forward the Crack-Attack port:

    ssh -R 10000:localhost:8080 username@ssh.server.org

This will allow connections on the port number 10000 of ssh.server.org to be forwarded to port number 8080 of the local machine.

Launch Crack-Attack server

On the same machine you did the previous step, launch the Crack-Attack server.

    crack-attack --server

Launch Crack-Attack client

On the other machine, launch the Crack-Attack client as if you would connect to the ssh server on port number 10000:

    crack-attack ssh.server.org:10000

That's it! Enjoy.


Last update: Mon Sep 15 17:03:45 2003