Jump to content
IL-2 Series Forum

Guide: How to host a Coop-Server - From Arctu


Recommended Posts

Posted

Original post: https://forum.il2sturmovik.com/topic/63285-guide-how-to-host-a-coop-server/

From the user Arctu

Hi everyone!

 

Since I just spent a significant amount of time trying to get self-hosted coop games with my friends working, I want to share my findings with you. There is a lot of good information scattered in this forum which helped me, but nothing like an overall guide. I did find a solution that works for me and probably most other people.

 

First of all, when you host a game, other players will need to connect to the following ports of your machine:
- Port 28000 and 28100 TCP
- Port 28000 UDP

- Unless you changed the default configuration. no other port is required to be forwarded, despite what you may read in some threads. Trust me on that.


Pitfall 1: The dreaded Windows firewall

In order that your friends can connect to your computer, you first need to tell the Windows firewall to not block the ports I just listed. I just disabled my Windows firewall completely to make sure it isn't interfering at all. A better approach would be to only allow the mentioned ports but since I play on Linux and just started Windows for testing if it works here too, I didn't want to spend much effort fiddling with Windows settings. If your computer is directly exposed to the internet and not behind a router or your room-mate on the same LAN likes to catch viruses, never disable the firewall completely!

 

Pitfall 2: Your computer is behind a router
When your friends are not in the same LAN as you, they need to be able to reach your computer from the internet. Usually attempts of doing so are blocked by your router. Your router is the only device directly connected to the internet and just forwards network packets to you via LAN. If your friends try to connect to your public IP-address (your internet address), they will try to connect to the router but not your computer. To change that, you have to tell your router to forward attempts to connect to the ports required by IL-2 to your computer instead. This is called port-forwarding and there are probably plenty guides available how to do this with your specific router. You need to tell the router to forward Port 28000 TCP, 28100 TCP and 28000 UDP to your computer.

For some lucky people this may already be enough, but there are more pitfalls and I wasn't so lucky ...

 

Pitfall 3: Your router uses a DS-Lite gateway
A few decades ago someone thought being able to address 4 Billion computers in a network should be more than enough until nobody uses the IP protocol any more - turned out he or she was pretty wrong. Nowadays the world is running out of IPv4 addresses so not every person can get his own address. In my country, most ISP have transitioned to giving out only IPv6 addresses, which allows a lot more devices to have its unique address. In order to still be able to connect to older systems in the internet which only respond to IPv4, they introduced a technique called DS-Lite gateways (probably has other names too). You can imagine this as another router before your own router. It takes the IPv6 traffic from your home network and routes it into the internet as IPv4 traffic. However, you are not the only one using this gateway, a lot of other customers from your ISP are using it too - so usually you are not allowed to do any port forwarding like with your local router. When your friends try to connect to you via the internet (to the IPv4 address they think you have), they instead will connect with that DS-Lite gateway, which will just block the incoming connection. This is a huge problem and most of you will probably not be able to solve it without spending monthly subscription fees, sorry.

 

There are two solution I found for it using a VPN (Virtual Private Network). In short, your computer connects to a server somewhere in the internet and opens a tunnel into a virtual LAN.

 

The first solution is, if your friends connect to the same VPN and the virtual network supports client-to-client transition. It appears to your computer as if your friends were connected to the same LAN as you and may just be in the next room (except the increased ping times). You can then just host a normal LAN game. You won't even need to do the router port forwarding thing. Just pick a VPN provider supports client-to-client traffic (don't confuse this with peer-to-peer, this usually is advertisement for supporting bittorrent or something similar)!

 

The second solution requires that the VPN server provides access to the internet (which they usually do) and also allows port-forwarding (probably more rare) to your local computer. Since I own a Linux server with IPv4 address in the internet which I use for hosting another game, I was able to set up my own OpenVPN server on it and just configure port-forwarding for the 3 ports mentioned in the beginning of this post. After that, hosting the game works. You may need to look up VPN providers and pick one that allows port-forwarding to clients. At least with this solution, you only need one player with a VPN access, not all of you.

 

I'm not sure if there is another way to solve the DS-Lite situation. Theoretically, connections to a game via IPv6 and forwarding ports from your router via IPv6 (actually more letting it pass than forward in case of IPv6) should work fine, but neither me nor the friend I was trying to play with had any success. This may be due to outdated network code in IL-2, or just that the game does not communicate the IPv6 address to the game lobby service when there is also an IPv4 address. I did not manage to get it working despite some knowledge in networking stuff.

 

Pitfall 4: Ingame settings
Even when networking is setup correctly, your friends may still not be able to join you because you have not done the required settings in game.

 

- In the game under Settings -> Multiplayer, there is the "Use IP" field. You have to set this to your LAN IP address when just using your router to forward stuff (usually 192.168.x.x) or your assigned VPN IP address when hosting via a VPN. I'm not really sure what this does to the game but it seems to be required. When not setting it, players would start loading the map when connecting but get thrown back to the lobby without any error being displayed. I honestly would have expected that this setting must be set to your external IP address, but when you do that the game server won't even start at all.

 

- When creating a server in the multiplayer löbby, you also have to set some important options. You probably need to increase the Ping limit to a larger number. Since I play with my friends I want them to stay connected even when they are temporarily lagging, so I set this to 1000, which seems to be the maximum allowed value. Then there is also the "Available from Internet" setting which you should set unless you are hosting in your LAN or a client-to-client VPN.

 

- I read somewhere that changing the traffic limit in the startup.cfg file has some influence on the hosting but I've been unable to confirm this. The default setting of 1000 worked fine for me, so did increasing it to 10000. Unless all of the above didn't work for you, just leave it alone for now. It certainly won't help dealing with any port-forwarding issues.

 

- I also read that certain missions may cause the connecting clients to the lobby again. I'm using missions generated via PWCG 10.0.1 (big thanks to Pat Wilson, this is what makes IL-2 fun for me!) and never have problems with them.

 

 

Well, that's my advice for you guys, I hope it may help you deal with your hosting issues or at least understand a bit better what may be keeping you from playing with your friends.

Arctu

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...