Cross-Platform LAN-Party 101 Guide

    This guide aims at putting you into the position of conducting a LAN party at home. Contrary to what one might think a successful cross-platform LAN-party needs some preparation or it might end up in a horrible mess. We assume that the reader has some knowledge about their operating system, i.e. Windows, Linux or Mac OS X.
    The exact commands you need to do may differ slightly depending on your distro or OS version. Since this is a practical guide we will go through the topic systematically by splitting it up into a preparatory part (i.e. what you need to do before your guests come), a carry-it-out part (i.e. what to do when your guests are there) and a troubleshooting part (i.e. what you should do if something doesn’t work out-of-the-box).

    Preparation

    Must-have items

    Be sure to have the following items readily available at home before the event.

    • Gigabit Networking Switch with at least 8 ports
    • LAN cables
    • A selection of multiplayer games of different genres*

    * a few commented suggestions by the author can be found in a future post.

    Setting up a local filesharing server

    We will make use of the SMB (“Samba”) protocol and set up a file server hosted on your computer. The advantages of Samba are platform-independence (standard file server in OS X and Windows and supported by Linux) and ease of use. Alternative feasible solutions not discussed here are setting up a local FTP server and ssh access (supported by Windows 10). Should none of the aforementioned work you can still resort to file exchange via external hardware, but that is probably N times slower than the former methods where N is the number of guests on your party.

    Setting up and accessing a SMB server on Linux

    # Install the necessary packages (pacman stands for your distro's package manager)
    sudo pacman -S samba smbclient
    # If you only want to access samba servers and /etc/samba/smb.conf is not present
    sudo touch /etc/samba/smb.conf
    # If you want to set up a samba server 
    sudo nano /etc/samba/smb.conf
    # Add the following to the file
    # [share_name]
    #       path = /path/to/shared/folder
    #	writeable = yes
    #	browseable = yes
    #	public = yes
    # At least executable (X or 1) permissions is needed for the others to access your shared folder
    sudo chmod 711 -R /path/to/shared/folder
    # Now it is REALLY IMPORTANT to (re)start the samba daemon
    sudo systemctl restart smbd
    sudo systemctl restart nmbd
    # check whether that has worked
    sudo systemctl status smbd
    # Let's now create a dummy user on your system without login, shell and homedir 
    # We do this to avoid giving your personal password to everyone else on your party
    #nohome
    useradd -M guest
    #nologin
    usermod -L guest
    #noshell
    usermod -s /bin/false guest 
    # Let's now add the user to the smbpasswd users
    smbpasswd -a guest
    # Now the most relaxed way to access the server as a client is to mount them
    sudo mkdir -p /path/to/mount/point
    # Hint: instead of your local ip you can also enter your computer name (after the @ in each line of the bash)
    sudo mount -t cifs -o username=guest //your_server's_local_ip/share_name /path/to/mount/point
    # Less convenient way to access the files, but nonetheless a feasible alternative
    # show all available shares on servers i.e. share_name in this example
    smbclient -L //server
    smbclient - U guest //your_server's_local_ip/share_name
    # Once you got access to the server (you will get this symbol in front of each line smb:>)
    cd /to/the/desired/directory
    # downlink direction
    get file
    # or folder
    prompt
    recurse
    mget directory
    # uplink direction
    put file
    # or folder
    mput directory
    
    

    Setting up and accessing a SMB server on Windows 10

    Let’s first take a look at how to share a folder.

    1. right-click on a folder you want to share and select Properties.
    2. Advance Sharing > check Share the Folder
    3. select Sharing > Share > add everybody

    Let us now discuss how to access a shared folder.

    1. go to “This Computer”
    2. right-click and select add network address
    3. the address is \\your_file_server\share_name
    4. the username is guest if you followed the server setup in the linux section or the user name of an account on some else’s computer
    5. the password is the user’s password on the other machine

    Setting up and accessing a SMB server on OSX

    % stub: missing server setup on MAC

    Now let us move on to how to access shared files on MAC OSX.
    %stub: only server-access syntax given, missing navigation

    1. the address is smb://your_server/your_share

    How to test that everything is set up correctly

    I tested that at least the server is set up correctly by accessing the server with my Raspberry Pi (any other device in your network is just as good) that is connected to the LAN via the Switch.

    ssh pi@your_raspberry
    sudo mount -t cifs -o username=guest //your_server's_local_ip/share_name /path/to/mount/point
    cd /path/to/mount/point
    ls
    

    Testing and Patching

    Opening up the router’s ports to enable TCP/IP and UDP/IP multiplayer over the internet

    Find out which ports are needed for multiplayer in your games. Open up the respective ports in your router menu. Access the router by typing its local IP into the address bar of your browser. Use sudo arp-scan --localnet to find out the IP address of your router (typically host number 1 in your subnet). If that doesn’t work refer to your router’s manual. Use fritz.box as the address if you own a Fritz!Box

    Running the game on your OS

    Once you have tested your file server it is now time to test your games. If you are using Linux I recommend using the PlayOnLinux Wine wrapper. If you are on MAC OSX I recommend the Wineskin Wine wrapper. Make sure you have patched the game to the newest version. Setup the game in a fresh wineprefix (virtual system) and read the notes on the game on WineHQ. If available apply special Widescreen patches and other fixes to your games so that they run flawlessly at least in single player mode. Then try to host a multiplayer game (nobody can join if you are alone at home, but you can at least rule out some problems related to closed ports that way) and see if problems occur in a stage this early.

    Carry-It-Out

    1. Make sure everyone is in the same subnet and has a static local IP address, e.g. person A has 192.168.1.32/24 (subnet mask 255.255.255.0) and person B has 192.168.1.35. Linux code example: sudo ifconfig eth0 192.168.1.32/24, where eth0 is your network interface. To list all interfaces simply use ifconfig.
    2. Access the file server, install and patch the games.
    3. Run the game and enjoy for the unlikely case that everything works right away!
    4. Else refer to the troubleshooting section

    Troubleshooting

    OSX-related problems

    1. Update your system to the newest version available (e.g. 10.13.3 High Sierra is a mess, 10.13.4 fixes some problems)
    2. Use Winetricks to set your VRAM to 2 GB (easily done through Wineskin interface if you prefer a GUI) and deactivate auto-detect hardware
    3. Reboot!

    Other problems

    • Deactivate your firewall or add the application to exceptions.
    • To deactivate your firewall on Linux completely (if you have any set up) by doing sudo iptables --flush. Warning: This removes all rules from your iptables. You might want to save them before
    • Directplay through Wine is buggy . Add your_local_ip your_hostname to /etc/hosts.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Prove, that you are human! *