1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Multiplayer using openvpn 0 disconnects

Discussion in 'Civ5 - Multiplayer' started by Butcher, Dec 13, 2012.

  1. Butcher

    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
     
  2. Ermak-

    Ermak- Prince

    Joined:
    Aug 7, 2006
    Messages:
    313
    Location:
    MINNEAPOLIS, MN
    I am not a programmer as most players and cant follow this. Why didn't the clowns at Firaxis code this into the game?
     
  3. anandus

    anandus Errorist

    Joined:
    Oct 27, 2005
    Messages:
    3,856
    Location:
    Amsterdam, Netherlands
    Why should they've coded a VPN into the game, that makes no sense at all?
     
  4. Butcher

    Butcher Chieftain

    Joined:
    Jun 7, 2005
    Messages:
    26
    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.
     
  5. antiqque

    antiqque Chieftain

    Joined:
    Jan 6, 2013
    Messages:
    1
    thank you very much, this works great. i can finally play civ5 with my friends.
     
  6. kuddin

    kuddin Chieftain

    Joined:
    Jan 8, 2013
    Messages:
    5
    This... this.... this actually works!!!!
     
  7. kuddin

    kuddin Chieftain

    Joined:
    Jan 8, 2013
    Messages:
    5
    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!
     
  8. GreatMontezuma

    GreatMontezuma Chieftain

    Joined:
    Oct 6, 2012
    Messages:
    19
    Location:
    California, Usa
    Can someone help me i am stuck making this
     
  9. Butcher

    Butcher Chieftain

    Joined:
    Jun 7, 2005
    Messages:
    26
    i'll try but please be more specific. What have you done so far and what problems do you experience?
     
  10. kuddin

    kuddin Chieftain

    Joined:
    Jan 8, 2013
    Messages:
    5
    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.
     
  11. Butcher

    Butcher Chieftain

    Joined:
    Jun 7, 2005
    Messages:
    26
    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.
     
  12. Niamak

    Niamak Chieftain

    Joined:
    Jan 15, 2013
    Messages:
    4
    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....
     
  13. Butcher

    Butcher Chieftain

    Joined:
    Jun 7, 2005
    Messages:
    26
    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?
     
  14. Niamak

    Niamak Chieftain

    Joined:
    Jan 15, 2013
    Messages:
    4
    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).
     
  15. Butcher

    Butcher Chieftain

    Joined:
    Jun 7, 2005
    Messages:
    26
    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?
     
  16. Niamak

    Niamak Chieftain

    Joined:
    Jan 15, 2013
    Messages:
    4
    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.
     
  17. Butcher

    Butcher Chieftain

    Joined:
    Jun 7, 2005
    Messages:
    26
    ..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..
     
  18. kuddin

    kuddin Chieftain

    Joined:
    Jan 8, 2013
    Messages:
    5
    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.
     
  19. Niamak

    Niamak Chieftain

    Joined:
    Jan 15, 2013
    Messages:
    4
    Anyway, thank you for the little guide. It was fun at least for me to learn a bit about OpenVPN.
     
  20. Butcher

    Butcher Chieftain

    Joined:
    Jun 7, 2005
    Messages:
    26
    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.
     

Share This Page