Suppose you have a machine, P, inside a firewall, which you want to proxy to an external Quake II server, Q. Further suppose you have a machine inside the firewall, A (A can be the same as P), and a machine outside the firewall, B (B can be the same as Q).
To proxy P to Q, first write a configuration file on B:
cookie Hello_World listen 17000 client allow A # Access control global allow P # A single redirect redirect A port 12000 to Q port 27910 # S'all.Call it myconfig.conf. Now start the server on B:
B$ rq2ps -f my(20416) pid 20416 created socket 17000. Waiting for client to connect...
And start the client on A:
A$ rq2pc B 17000 Hello_World Attempting to connect to B (XXXXXXXX), port 17000... Connection successful. Authenticating and downloading ACLs and proxy options.. Connection successful. Creating listening sockets ... Opened file descriptor 4 to proxy port 12000, client YYYYYYYY (to server ZZZZZZZZ, 27910)
Now, just start Quake II on P and issue:
] connect A:12000... and that's it. You can also use game selectors like gamespy or xqf.
The Hello_World string above is a cookie used to provide some additional level of security: the client has to present a cookie identical to the cookie in the server's configuration file before it will be allowed to connect to the server.
Don't worry about any shutting down rogue file descriptor messages you may see after using xqf or gamespy: they simply indicate that the client port (in this case, the port the program opened momentarily to check the server) has gone away unexpectedly, and are harmless (though too many of them will cause performance problems).