The last few weeks a few of us (including help from
Papyrus...) have been exploring how to solve the
issues surrounding how to use GPL to connect to
multiplayer games on the Internet while being on a
private subnet gatewayed by a linux box. The linux
box is configured to use IP masquerading so as to
allow multiple PCs on the private subnet to access
the internet through a single IP address.
I have been able to *host* a game on my PC which
is connected to the private subnet. I have still
not been able to connect as a client (mentioned
in previous messages).
Below is a simple ascii diagram of the setup I am
talking about:
----------------
| |
| | PC Running GPL (hosting)
| 192.168.0.2 |
----------------
|
|
|
----------------
| 192.168.0.1 | Linux system acting
| | as gateway; performing
| 55.66.77.88 | IP masquerading for addresses
---------------- on private (192.168.0.x) subnet
|
|
... the Internet ...
|
|
---------------- PC 'out there' acting as a GPL
| 33.44.55.66 | client
| |
| |
----------------
Assuming that you have IP masquerading
correctly enabled so that outgoing packets
are masqueraded properly, all that needs to
be done is to use some sort of manual forwarding
on the linux box. I used a program called
'ipautofw'. Use the program to unconditionally
forward any requests to the GPL server port
(which by default is 32766) to the internal
machine running the GPL server.
In my case, the command looks like:
ipautofw -A -r udp 32765 32766 -h 192.168.0.2 -v -u
(I've actually specified two ports here - the
documentation for the command states that
operation is unstable if a range is not specified).
If you are using VROC to host a game (which
many people do), make sure that
(a) you specify your IP address in VROC setup
to be the IP address of your linux gateway.
(b) when you start up the GPL server, you allow
connections only from your 'internal' IP
address, since that is the IP address that
will be in the packets sent to it via the
gateway.
I hosted a game through VROC lasted night and
it seemed to work a-ok.
I'm not sure if John and others have had a
problem with hosting or not.... maybe they just
had a problem connecting as clients. In any
case, I thought I would write this up as a bit
of info for those who do not yet know how to
do this. Of course in order to host a game with
many people (i.e. >4 or 5) one needs to have a
high speed connection.
...Andrew
P.S. I am using the linux 2.0.33 kernel