Port Forwarding Guide
If you only need to know what you need set up for a software firewall like ZoneAlarm, Norton or McAfee, skip all the way almost to the end. If you use a router and a software firewall, follow both the router and software firewall configuration guides.
Because the configuration specifics of different brands of routers, different models of the same brand and even different firmware revisions of the same model router bay differ, I cannot offer specifics on your particular router. Unless you're using a SmoothWall Linux box like me, or a Siemens Speedstream (which I have but don't use) don't ask. (But if you know enough to set up a SmoothWall box, you probably don't need to read this guide.) If you are unsure of anything, read your router's manual. It will tell you how to do most of this.
If I get more free time I may add specific instructions for some popular commercial router, specifically Linksys, D-Link and Netgear (in that order). Please PM me with links screenshots of your router's config pages if possible. I may be able to use them to better this guide.
The first thing you should do is read the netplay.txt packaged with ZSNES . This may be able to answer some of your questions and explain some of the limitations of netplay.
First off, you need to know your public IP address. If you have a router, which if you're reading this thread you probably do, your public IP address is different from the private IP address of your computer. Without this IP address, nobody can connect to you. Check out IP Chicken to find your public IP address. This is the IP address that the other person would put in the IP box in ZSNES.
NOTE: YOUR IP ADDRESS IS MOST LIKELY DYNAMIC AND WILL CHANGE OVER TIME SO YOU MAY NEED TO FIND IT OUT EVERY TIME YOU WANT TO NETPLAY
The second thing you'll need to know is the IP address of your computer. Go to the Start menu, then to Run. On Windows 95/98/me, type in winipcfg and hit enter. You may have to use the drop-down box to select your ethernet card/network adaptor/NIC, depending on the terminology used by the driver. (If it says dial-up, PPP, or AOL adaptor, you have the wrong device and need to use the drop-down box.) Your IP address will be listed in the IP address box.
Example: (This is not really your IP address, but a screenshot from one of my machines)
On Windows NT/2K/XP/2003, go to the Start menu, then to Run. Type in cmd to open up a command prompt, then type in ipconfig to display the IP configuration for any and all devices in your computer. You may have to scroll back up to look for your ethernet adaptor, looking for the same things mentioned above.
Example: (This is not really your IP address, but a screenshot from one of my machines)
Your private IP address will most likely be in the form of 192.168.0.x, but may be in the form 192.168.0-16.x, 172.16.x.x or 10.x.x.x.
Now that you have your public and private IP addresses, you're ready to configure your router. 90% of the time, your router's configuration page can be accessed by one of the following addresses:
http://192.168.0.1
http://192.168.0.1:81
http://192.168.0.1:88
https://192.168.0.1:80
http://192.168.1.1
http://192.168.1.1:81
http://192.168.1.1:88
https://192.168.1.1:80
http://192.168.2.1
http://192.168.2.1:81
http://192.168.2.1:88
https://192.168.2.1:80
http://172.16.0.1
http://172.16.0.1:81
http://172.16.0.1:88
https://172.16.0.1:80
http://10.0.0.1
http://10.0.0.1:81
http://10.0.0.1:88
https://10.0.0.1:80
If none of those work, consult your router's manual for the correct address. 99% of the time your router is also the DHCP server and default internet gateway, so try that address if the above mentioned ones don't work.
You'll usually have to log into the router with username and/or password. Once you're logged into the router's web interface, look for a page along the lines of port (range) forwarding, server ports or Network Address Port Translation (NAPT). Some routers put it in an "Advanced," "Configuration," or "Networking" section, or something similar.
Once you've found it, you'll probably be presented with blanks for the Protocol (TCP or UDP), Port (sometimes denoted Source and Destination Ports or simply by _ TO _ blanks), and the Destination IP address.
Under the Protocol heading, you want to be able to use both TCP and UDP for ZSNES. If it will only let you specify one or the other, just select one and duplicate all of the information for the other protocol as a separate entry. FYI, TCP tends to give more stable connections but sacrifices some speed and adds some latency while UDP provides slightly improved speed and latency but may sacrifice some stability and some ISPs block UDP traffic.
Under the Port heading, we need port 7845 (7846 for Z-Net's voice chat feature). In instances where you have source and destination ports, a range of ports or the "_ TO _", fill in 7845 for both, or if your using Z-Net's voice chat feature, 7845 in the first blank, and 7846 in the second.
In the Destination IP address heading, you need to fill in the IP address of your computer. Some routers only require the last number of your IP address.
NOTE: IF YOU ARE USING DHCP, YOUR IP ADDRESS MAY CHANGE FROM TIME TO TIME AND YOU MAY NEED TO UPDATE THIS ADDRESS WITH YOUR NEW ADDRESS. I am not covering how to disable DHCP and assign static IP addresses in this guide.
You may be prompted for a source IP address as well. Follow your router's instructions to allow all IP addresses, as your opponent most likely has a dynamic IP address and will change over time.
Now your configuration should look something like the following generic description:
SOURCE IP: ALL
SOURCE PORT: 7845
DESTINATION PORT: 7845
PROTOCOL: TCP
DESTINATION IP: 192.168.1.25
SOURCE IP: ALL
SOURCE PORT: 7845
DESTINATION PORT: 7845
PROTOCOL: UDP
DESTINATION IP: 192.168.1.25
Optional zbattle.net mandatory configuration:
SOURCE IP: ALL
SOURCE PORT: 4000
DESTINATION PORT: 4000
PROTOCOL: TCP
DESTINATION IP: 192.168.1.25
Once you have doublechecked your entries, save the configuration and log out of your router. You're done!
Now you just need to communicate your IP address to your opponent and start your server. Or if using Z-Net, find a person to play with, right click on his name, select
"Z-Net Netplay with *****", select server, a game, then click "Start Game".
If you have a software firewall, you'll need to set up access rules for the above mentioned ports, plus one more. This will be necessary for both host and client, not just the client. If you have a router and a software firewall, you need to follow these directions and the directions for port forwarding.
You'll need to allow for all netplay:
Incoming and outgoing traffic on TCP and UDP port 7845
And if you want to use Z-Net's voice chat feature, you'll need:
Incoming and outgoing traffic on TCP/IP port 7846
Outgoing traffic on TCP/IP port 7846.
Because I personally don't like software firewalls, you're on your own here. They're fairly easy to set up. With ZoneAlarm, you only need to click allow when the little warning box pops up.
NOTE: THE WINDOWS XP BUILT-IN FIREWALL IS CRAP. DISABLE IT AND INSTALL SOMETHING BETTER LIKE ZONEALARM.
Credit for this guide goes to AntoineWG.