rec.autos.simulators

How to host a GPL race behind a firewall ?

Ulrich Diedrichse

How to host a GPL race behind a firewall ?

by Ulrich Diedrichse » Sat, 29 Dec 2001 00:12:18

Hi,

Is it possible to host a race behind a linux firewall/router ?

I am using a Linux kernel 2.4 with iptables. From different sources I
figured out that GPL (VROC) uses
some ports, so I tried following iptables rules:

iptables -N gpl
iptables -A gpl -i $INTERFACE -p udp --sport 6969:6971 -j ACCEPT
iptables -A gpl -i $INTERFACE -p udp --sport 32766:32786 -j ACCEPT
iptables -A PREROUTING -t nat -p udp --sport 32766:32786 -i $INTERFACE -j
DNAT --to $DEST_LAN_IP
iptables -A PREROUTING -t nat -p udp --sport 6969:6971 -i $INTERFACE -j
DNAT --to $DEST_LAN_IP
iptables -A FORWARD -j gpl

Unfortunatly it doesn't work. Has anybody an idea, what's wrong or missing
here ?

Thanks in advance and a happy new racing year for everybody,

Uli

Jens H. Kruus

How to host a GPL race behind a firewall ?

by Jens H. Kruus » Sat, 29 Dec 2001 01:37:25

Hi Uli,

I have a fair idea what works, but I can't understand your rules and
arguments. Could you write them out as some kind of standard fw config
rules?

/Jens



Ulrich Diedrichse

How to host a GPL race behind a firewall ?

by Ulrich Diedrichse » Sat, 29 Dec 2001 05:35:40



Hi Jens,

The rules are pretty easy. This script forwards all in and outcoming UDP
data from my Linux router to my windows pc.
The ports 6969  - 6971 and 32766 - 32786 for UDP are forwarded
using NAT.

The main question is: Is it possible to host a race behind a linux firewall
?

Regards,

Uli

Jens H. Kruus

How to host a GPL race behind a firewall ?

by Jens H. Kruus » Sat, 29 Dec 2001 06:13:40

Both to and from ports? Also, you cannot be certain that all
servers/clients use 32766-32786. If you are using VROC you also need TCP
incoming on port 113, and TCP out to 6667 and 32000.

/Jens





> > Hi Uli,

> > I have a fair idea what works, but I can't understand your rules and
> > arguments. Could you write them out as some kind of standard fw
config
> > rules?

> > /Jens

> Hi Jens,

> The rules are pretty easy. This script forwards all in and outcoming
UDP
> data from my Linux router to my windows pc.
> The ports 6969  - 6971 and 32766 - 32786 for UDP are forwarded
> using NAT.

> The main question is: Is it possible to host a race behind a linux
firewall
> ?

> Regards,

> Uli

Biz

How to host a GPL race behind a firewall ?

by Biz » Sat, 29 Dec 2001 12:59:47

From different sources?  It's all in the readme11.txt file.

5. MULTIPLAYER - FIREWALLS
--------------------------

With GPL 1.0.0.0 it was difficult, if not impossible, to configure a firewall that would allow a GPL
client or server to run behind it.  This should now be fixed.  GPL now uses a range of 21
consecutive ports ([32766..32786], by default) for client/server communications, and  ports 6970 for
status broadcast and 6971 for ping responses.

To run from a machine with a private IP address behind a Linux firewall, you need to use a
combination of IP masquerading and IP autoforwarding.  The following three rules can be used.

ipfwadm -F -a accept -m -S a.a.a.a/m.m.m.m -D 0.0.0.0/0
ipautofw -A -r udp 6970 6971 -h a.a.a.a -v -u
ipautofw -A -r udp 32766 32786 -h a.a.a.a -v -u

where a.a.a.a is the address of the machine behind the firewall, and m.m.m.m is the netmask.  If you
run a server behind the firewall, clients should connect to the IP address of the firewall.

If you want to run more than one server behind a firewall, you'll need to give each of the servers
its own port range for client/server communications, and also include these port ranges in the
ipautofw rules.  In core.ini on each of the additional server machines, add the following:

--
Biz

"Don't touch that please, your primitive intellect wouldn't understand
alloys and compositions and,......things with molecular structures,....and
the....." - Ash


Uwe Schuerkam

How to host a GPL race behind a firewall ?

by Uwe Schuerkam » Sat, 29 Dec 2001 20:47:51


> Hi Uli,

> I have a fair idea what works, but I can't understand your rules and
> arguments. Could you write them out as some kind of standard fw config
> rules?

> /Jens



>> Hi,

>> Is it possible to host a race behind a linux firewall/router ?

here's what works for me (both hosting and joining)

IP=`/sbin/ifconfig $IF | grep inet | cut -d : -f 2 | cut -d -f 1`
MASK=`/sbin/ifconfig $IF | grep Mas | cut -d : -f4`
NET=$IP/$MASK

# gpl

$IPT -A PREROUTING -t nat -p udp -d $NET --dport 6970:6971 -j DNAT --to 192.168.1.2

$IPT -A PREROUTING -t nat -p udp -d $NET --dport 32766:32786 -j DNAT --to 192.168.1.2

192.168.1.2 is my gpl machine on the local network.

HTH

uwe

--
Uwe Schuerkamp //////////////////////////// http://www.schuerkamp.de/
Herford, Germany \\\\\\\\\\\\\\\\\\\\\\\\\\ (52.0N/8.5E)
Ever wondered what's wrong with the world?      http://bnetwork.com/
PGP Fingerprint:  2E 13 20 22 9A 3F 63 7F  67 6F E9 B1 A8 36 A4 61

P Gag

How to host a GPL race behind a firewall ?

by P Gag » Tue, 01 Jan 2002 06:31:33

I'm using a cbale modem and Tiny Personal Firewall, to host GPL races
does this mean I have to do the following?

Set up a new filter rule.

Call the rule, say, "GPL server".

Set up protocol as UDP.

Set up direction as incoming.

Set up local end point as port range, and then enter the port range as
from 32766 to 32786.

Set up remote end point as any address and any port.

What about the application? do I need to set that as GPL.exe or WINVROC.exe?

Any info appreciated ta....

Ren?? van Lobbereg

How to host a GPL race behind a firewall ?

by Ren?? van Lobbereg » Fri, 04 Jan 2002 10:23:18


> I'm using a cbale modem and Tiny Personal Firewall, to host GPL races
> does this mean I have to do the following?

> Set up a new filter rule.

> Call the rule, say, "GPL server".

> Set up protocol as UDP.

> Set up direction as incoming.

> Set up local end point as port range, and then enter the port range as
> from 32766 to 32786.

> Set up remote end point as any address and any port.

> What about the application? do I need to set that as GPL.exe or WINVROC.exe?

> Any info appreciated ta....

Here are two screenshots :
http://www.renevanl.cistron.nl/tpf-gpl1.gif
http://www.renevanl.cistron.nl/tpf-gpl2.gif

No probs joining, haven't tested hosting yet though.

--
Ren van Lobberegt, The Netherlands.
http://www.toptown.com/INNERCIRCLE/1846/

AMCA webmaster : http://www.amcaracing.nl/

pjgt..

How to host a GPL race behind a firewall ?

by pjgt.. » Sat, 05 Jan 2002 09:45:58

Thanx for the info...

8-)

*Peter* -  http://www.cix.co.uk/~peterpc/home.html


rec.autos.simulators is a usenet newsgroup formed in December, 1993. As this group was always unmoderated there may be some spam or off topic articles included. Some links do point back to racesimcentral.net as we could not validate the original address. Please report any pages that you believe warrant deletion from this archive (include the link in your email). RaceSimCentral.net is in no way responsible and does not endorse any of the content herein.