Author Topic: Trouble with multiplayer  (Read 351 times)

Offline BadgerBadger

  • Hero Member
  • *****
  • Posts: 725
  • BadgerBadgerBadgerBadger
Trouble with multiplayer
« on: December 28, 2016, 12:12:44 AM »
I was trying to play AI War classic with a friend over the internet, and I can't get it to work. Every time we try to connect we get the "Connection failed. Server connection was lost or could not be established! Disconnected and not Discovering" error. I will enumerate the steps I did for debugging this. I am running game version 8.024.

First, I can definitely play over my internal network (I have connected a variety of laptops to my desktop without issue, and the desktop can connect to my laptops), so it seems unlikely to be a firewall. My desktop is linux and my laptops are OSX, if that makes a difference.

I followed all the steps to enable port forwarding via UDP port 32320 (the default) on my router. I also talked over these steps with another AI War player who had the same brand of router, so it seems unlikely to be my router. (I have it set to the following: Service Type: TCP/UDP External Starting Port: 32320 External Ending Port: 32320, and the "Use same port range for internal port" box checked. I also have the correct internal IP address set).
I looked up my public IP address, then provided that to a friend.
My friend failed to connect.
We then repeated these steps with an OSX laptop hosting, to no avail.

My friend then repeated these steps (opened the local firewall, enabled port forwarding), and I tried to connect to him, but we had the same problem.

We then tried setting up Hamachi, and both got IP addresses on a Hamachi network, but we continued to see the same problem.

We also tried closing AI War and reopening it, to no avail.

I then posted on discord and found someone willing to help me, so we repeated the above steps with both of us trying to host (though this person and I did not try Hamachi) and experienced the same error. We also tried setting AI War to not use the default 32320 port, but that also didn't help.

I'm at a loss. Anyone have any ideas?

Offline BadgerBadger

  • Hero Member
  • *****
  • Posts: 725
  • BadgerBadgerBadgerBadger
Re: Trouble with multiplayer
« Reply #1 on: December 28, 2016, 11:16:56 PM »
After a great deal of effort, I seem to have tracked the problems down (with some help from experts, especially ptarth). On my end, the problem was that I had a double NAT setup; a cable modem from my ISP and my router. To work around this, you have to set up port forwarding for port 32320 from the cable modem (the outer NAT) to the WAN address of my router, and then port forwarding for my router to my computer.

In more depth:
My cable modem was at 192.168.0.1, and had assigned 192.168.0.2 to my router (I found this by going to my router's admin page and finding out the IP address that it was using for WAN). So I set my cable modem to forward port 32320 to 168.192.0.2, and then my router to forward 32320 to the IP address of my computer. I believe this was the largest problem, but while I can now connect to the game via my external IP, my friend is still having trouble with it.

The problem on my friend's end was he put in the IP address of his router as "the place to forward port 32320" instead of the IP address of his computer. Whoops.