Multiplayer using openvpn 0 disconnects

Butcher

Chieftain
Joined
Jun 7, 2005
Messages
26
Hello fellow addicts. I successfully completed multiple Civ5 multiplayer (2 and 3 players) games (about 1500+ turns in total) with 0 disconnects (we only had 2 loading screens in total). Credits for using openvpn goes not to me but to a number of people suggesting through forums that this method works/might work.

A few words about the process used.
1. Download openvpn from here
2. Generate the needed certificates. Follow instructions found here
3. Create a server configuration file as follows (insert [port]):
Code:
server 10.8.0.0 255.255.255.0
port [port]
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\server.crt"
key "C:\\Program Files\\OpenVPN\\config\\server.key"
dh "C:\\Program Files\\OpenVPN\\config\\dh1024.pem"
dev tap
proto tcp
keepalive 10 120
client-to-client
4. Port forward the [port] to your server.
5. Create configuration files for the clients as follows (insert [port], [ip] and [playername]):
Code:
client
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\[playername].crt"
key "C:\\Program Files\\OpenVPN\\config\\[playername].key"
remote [ip] [port]
dev tap
proto tcp
6. Change the metric for the connection created by openvpn to something small..like “5” (otherwise you will not be able to see the game created due to the broadcast not going where it should)

You might want to create a dynamic dns for the [ip] part. (or have a static one)

Although the process seems difficult to follow, it's not. Now ..excuse me..but I need some sleep..sorry for any mistakes made
 
I am not a programmer as most players and cant follow this. Why didn't the clowns at Firaxis code this into the game?
 
Although the latest patches improved multiplayer's stability, some of us have "sh*ty" internet connections, so some problems still remain. What they should have done is make the connections much more error tolerant, and thus multiplayer much more stable from day one.
 
thank you very much, this works great. i can finally play civ5 with my friends.
 
Oh was so excited that I forgot to say thank you! First time I've been able to play with my friends for over 100 turns without a single disconnect. This is awesome!
 
i'll try but please be more specific. What have you done so far and what problems do you experience?
 
If you say what problem you have we might be able to help you. I had 2 different errors and I had to uninstall and reinstall 2 times before they stopped appearing.
 
If you say what problem you have we might be able to help you. I had 2 different errors and I had to uninstall and reinstall 2 times before they stopped appearing.

No re-installation is required. You just have to make the correct configurations. If he gives us info I am sure we can help him.
 
Tried with 3 players. We were able to launch the game but had a disconnect after the first turn. Second try, we had a disconnect on turn 5.

Unit movement were laggy sometimes. I checked pings were fine.

So I don't know maybe we did something wrong....
 
Tried with 3 players. We were able to launch the game but had a disconnect after the first turn. Second try, we had a disconnect on turn 5.

Unit movement were laggy sometimes. I checked pings were fine.

So I don't know maybe we did something wrong....

Everyone connected successfully to your openvpn server? Can you ping each other using openvpn's ips ?

And a silly question.. you tried playing using the lan option right?
 
Yes, everyone connected to my openvpn server and we were able to join and launch a LAN game. I checked pings using openvpn's ips (15-78ms).
 
that is strange..never had a disconnect myself..something must be wrong

-> are all firewalls down?
-> while in lobby can everyone see everyone's messages?

edit: also..are you using the machine running openvpn server as the game's host?
 
All firewalls were down.
We were able to chat in lobby and ingame.

I am using the machine running openvpn server as the game's host.
 
..looks like I am out of ideas..for now at least..
if the connection is ok then..it has to be the game itself.

-> it's a longshot but..Check versions..probably even reinstall the game.. ..? disable dlcs?

sorry for not being able to help you more..
 
I had problems starting a LAN game so I started a internet game. Apparently openvpn increased the stability for internet play too?! Eell over 300 turns now and not a single disconnect. The only problem I've seen this far is when one of my friends use his 3g usb dongle then we get disconnects, otherwise there is no problem at all. You could try that. Create a internet game and see if that is more stable.
 
Anyway, thank you for the little guide. It was fun at least for me to learn a bit about OpenVPN.
 
Niamak, here are some last things you might want to check..

→ the same peer disconnects every time? It could be a specific peer that causes the issues.
→ do you have a peer in the same local network with the server? If yes, are you sure the metrics for that peer are low enough to use openvpn inside Civ?

..in case you gave up..sorry for not solving this problem for you. Hope you solve it soon, have fun.
 
Back
Top Bottom