Difference between revisions of "Port forwarding guide for netplay"

From Emulation General Wiki
Jump to navigation Jump to search
(Correcting category)
Line 112: Line 112:
 
* 7000 (TCP)
 
* 7000 (TCP)
  
[[Category:Netplay]]
+
[[Category:Online Gameplay]]

Revision as of 15:39, 25 July 2021

This guide was made by /vr/, you can join the /vr/ Netplay IRC chat at: #/vr/_Netplay on http://www.rizon.net/chat

Setting up a static IP

It is very important to setup a static IP address, if you are going to use port forwarding. When you have port forwarding setup, your router forwards ports to an IP address that you specify. This will probably work when you initially set it up, but after restarting your computer it may get a different IP address. When this happens the ports will no longer be forwarded to your computer's IP address. So the port forwarding configuration will not work.

Step 1:

  • On Windows 7, open up the start menu, and look for the Search programs and files box.
  • On Windows XP or Vista, click Run.

Step 2:

  • Type cmd in the Search programs and files box (Run box in XP or Vista), and press Enter on your keyboard.

Step 3:

  • Type ipconfig /all in that window, and then press the enter key. This will display a lot of information. If it scrolls off the top you may need to enlarge the window.

Step 4:

  • I want you to write down some of the information in this window. Take down the IP address, subnet mask, default gateway, and DNS. Make sure to note which is which. We are going to use this information a little bit later. We are only concerned with IPv4 entries, you can ignore the IPv6 stuff.
  • If your DNS IP is the same as your Default Gateway IP, it means your router is just acting as proxy between your computer and your actual DNS. Using this IP will prevent you from connecting to the internet. In order to find your true DNS IP, you'll need to log in to your router by typing the network IP address you just wrote down (192.168.x.x or something similar) in your web browser, and look for your router's Status Page. If all else fails, ask your ISP.

Step 5:

  • Once again open the start menu. This time click Control Panel.

Step 7:

  • On Windows 7, single click Change adapter settings on the left side of your screen.
  • On Windows Vista, double click Network and Sharing Center.
  • On Windows XP, double click Network Connections.

Step 8:

  • You might have more than one Internet connection listed here. You will need to determine which adapter is your connection to the Internet if this is the case. Right click on your network adapter and choose properties to open up the properties window of this internet connection.

Step 9:

  • On Windows 7 and Vista, click Internet Protocol Version 4 (TCP/IPv4) and then the Properties button.
  • On Windows XP, click Internet Protocol (TCP/IP) and then the Properties button.

Step 10:

  • Before you make any changes, write down the settings that you see on this page. If something goes wrong you can always change the settings back to what they were! You should see a dot in the Obtain an IP address automatically box. If you do not, your connection is already setup for a static IP. Just close all these windows and you are done.

Pick an IP address and enter it into the IP Address box. The IP address you choose should be very similar to the router's IP address. Only the last number of the IP address should be different. If the router's IP address is 192.168.1.1, I might choose 192.168.1.10. The IP address you choose should end with a number between 1 and 254, and should not be the same as the router's IP address. Every device that connects to your network needs to have it's own IP address.

Put the subnet mask we previously found in the subnet mask section. The default gateway should go into the Default gateway box. Enter the DNS servers we previously found into the two DNS Server boxes. Click okay all the way out of this menu.

If you find that you can not pull up webpages, the problem is most likely the DNS numbers you entered.

That's it, you should be done! If you can't connect to the internet go back and change your configuration back to what it originally was.

Forwarding ports

When you host a server, be it for file transfers or online video game multiplayer, the software listens for incoming traffic on a specific port range. If these ports are closed, whatever clients that attempt to connect to you will be forcefully rejected, and no connection will be established. Most computer firewall software allows you to add programs to their exception list the first time you execute them automatically, but most router firewalls do not.

The purpose of this tutorial is to teach you how to open these ports manually. Please note that each router brand and model has a very different kind of interface, so it's impossible to write a universal guide.

The following website http://portforward.com/english/routers/port_forwarding/routerindex.htm has detailed, specific guides for a great number of router models and brands and has a wealth of information on how to open ports for many different software. But, alas, does not cover each and every one in existence. I encourage you to try and find yours if it's included. If not, I will try my best to guide you using a guide for another router.

Step 1:

For this example, I will be using screenshots from a 2wire 1000hg router.

  • On Windows 7, open up the start menu, and look for the Search programs and files box.
  • On Windows XP or Vista, click Run.
  • On Linux
    Figure 1: If you do not have iproute2 installed, install it. Otherwise, you can find your gateway IP (or hostname) with "route" and "ifconfig".
    • You'll want to open your favorite terminal (in most DEs it's just called "Terminal"). execute the command "ip route".
      If you get something like "command not found". (Fig 1)
    • You'll see something like "default via xxx.xxx.xxx.xxx" (like the first command in my image). The numbers specified by the 'x's is your router IP address.
    • You'll put this in your web browser to access your router settings. Most routers that prompt username and password can be entered with "admin" and "admin".
    • Now skip to Step 6.

Step 2:

  • Type cmd in the Search programs and files box (Run box in XP or Vista), and press Enter on your keyboard.===
    Figure 2
    ===

Step 3:

  • Type ipconfig /all in that window, and then press the enter key.

Step 4:

  • Make note of the IP listed on Default Gateway.

Step 5:

  • Open your web browser, and type in this IP address. (Fig 2)

Step 6:

  • Click the Firewall Settings button, or anything that looks like it on your router's interface. (Fig 3)
    Figure 3

  • Depending on your router, you'll see a list with every device currently connected to your router along with their MAC and IP address, and some firewall exceptions if someone else had set some beforehand. Some routers also keep a list of every device that has ever connected to your router, even if it isn't connected at the moment (if you suspect someone stealing your internet connection, you can find out now).

Step 7:

  • Click the Firewall Settings button. Use the Select a computer box to choose a computer to forward ports to. This box contains a list of computer names that are visible on your network. (Fig 4)
    Figure 4
  • Some routers feature drop down menus listing every device with varying degrees of detail, while others show a table with each device. Alongside these, most routers also have a predetermined list with the most popular applications preconfigured with the rules necessary to get it running without much hassle.

Step 8:

  • Click the Add a new user-defined application link.
  • You will get a Window similar to this one (Fig 5), regardless of router.
  • The Application Name can be whatever you want, but it helps if you name it exactly as the software whose ports your forwarding. Just remember that you can't use a name that's already being used by another Exception Rule.
    Figure 5
  • Next you'll choose Protocol. TCP or UDP. Some routers allow you to choose one or the other, while others give you a third option to choose both simultaneously.
    • Also, depending on the software your opening ports for, you'll need one or the other, or both. If the software documentation doesn't say which, it's better to open the ports using both protocols.
  • Next we have a Port Range. In this section, we'll write down the port or port range that we'll be opening.
  • If you're just opening a single port, only write it down in the first box and leave the other one blank.
  • If you're opening, for example, 100 ports between port 1500 and 1600, you write down 1500 in the first box and 1600 in the second.
  • Everything else can be safely ignored. You can add a Definition or Application Type if you want, but it isn't necessary.
  • If the router doesn't allow you to pick both UDP and TCP at the same time, you will need to make 2 separate entries for the same port.
  • After you're done adding your port, click Add Definition or Accept or anything that allows you to save your changes.

There are some routers that allow you to make Exception Rules, but don't automatically assign them to your computer/device. There should be an option to do so.
I assume that even though this guide will not apply to most of you, that you can figure it out by comparing these screenshots to your own interface. If you're still having trouble understanding how it works, feel free to join the /vr/ IRC channel: #/vr/_Netplay at http://www.rizon.net/chat.

Ports to open

Once you've figured it out, you should try opening these ports as practice:

ZSNES

  • 7845 (TCP/UDP)

Kega Fusion

  • 5394 (TCP/UDP)

Open Kaillera P2P client

  • 27886 (TCP/UDP)
    • The Multiplayer Client doesn't need port forwarding

GGPO

  • 6000-6009 (UDP)
  • 7000 (TCP)