Whole document tree
    

Whole document tree

Gamers: The LooseUDP patch

6.10. Gamers: The LooseUDP patch

The LooseUDP patch allows NAT-friendly games that usually use UDP connections to both WORK and perform quite well behind a Linux IP Masquerade server. Currently, LooseUDP is available as a patch for 2.0.36+ kernels and it is already built into 2.2.3+ kernels though it is now DISABLED by DEFAULT in 2.2.16+.

To get LooseUDP running on a 2.0.x kernel, follow the following steps:

  • Have the newest 2.0.x kernel sources uncompressed in the /usr/src/linux directory

  • ABSOLUTELY REQUIRED for v2.0.x: Download and install the IPPORTFW patch from Section 3.2.3and as described in Section 6.7of the HOWTO.

  • Download the LooseUDP patch from Section 3.2.3

    Now, put the LooseUDP patch in the /usr/src/linux directory. Once this is done, type in:

    For a compressed patch file:  zcat loose-udp-2.0.36.patch.gz | patch -p1

    For a NON-compressed patch file:  cat loose-udp-2.0.36.patch | patch -p1

    Now, depending on the version of your "patch", You will then see the following text:

    patching file `CREDITS'
    patching file `Documentation/Configure.help'
    patching file `include/net/ip_masq.h'
    patching file `net/ipv4/Config.in'
    patching file `net/ipv4/ip_masq.c'

  • If you see the text "Hunk FAILED" only ONCE and ONLY ONCE at the very beginning of the patching, don't be alarmed. You probably have an old patch file (this has been fixed) but it still works. If it fails completely, make sure you have applied the IPPORTFW kernel patch FIRST.

    Once the patch is installed, re-configure the kernel as shown in Section 3.2.3 and be sure to say "Y" to the "IP: loose UDP port managing (EXPERIMENTAL) (CONFIG_IP_MASQ_LOOSE_UDP) [Y/n/?]" option.

To get LooseUDP running on a 2.2.x kernel, follow the following steps:

  • In the /etc/rc.d/rc.firewall script, goto the BOTTOM of the file and find the LooseUDP section. Change the "0" in the line: echo "0" > /proc/sys/net/ipv4/ip_masq_udp_dloose to a "1" and re-run the rc.firewall ruleset. An example of this is given in both Section 3.4.2 example and Section 6.4.3 example.

Once you are running the new LooseUDP enabled kernel, you should be good to go for most NAT-friendly games. Some URLs have been given for patches to make games like BattleZone and others NAT friendly. Please see Section 6.3.1 for more details.