Jump to content

Recommended Posts

Posted (edited)

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

Edited by Arctu
  • Like 2
  • Thanks 4
  • Upvote 5
[KG]Destaex
Posted (edited)

This is interesting stuff thanks. Trying to get a server up now.

Edited by [KG]Destaex
  • 1 month later...
Posted

Please explain how I could always connect to others servers and their maps/files would be downloaded to my computer but when I try to host there is no connection possible with me?

  • 6 months later...
Posted

Hello,

 

Thanks for the useful info. However, I would like to host across a lan, is this possible with TC?

  • 9 months later...
Posted
On 3/11/2021 at 4:58 PM, simgod said:

Hello,

 

Thanks for the useful info. However, I would like to host across a lan, is this possible with TC?

Please read the guide, LAN is included and way simpler than over internet. Point 1 and 4 are basically all you need to setup for LAN only.

Posted
On 12/28/2021 at 8:37 PM, vangel said:

Please read the guide, LAN is included and way simpler than over internet. Point 1 and 4 are basically all you need to setup for LAN only.

Many thanks ?

  • 2 months later...
  • 11 months later...
BornToBattle
Posted

So essentially you have to be network savvy and know your IT before you can play multiplayer? 

  • Sad 1
  • Upvote 1
  • 3 weeks later...
Posted
On 3/4/2023 at 3:17 PM, BornToBattle said:

So essentially you have to be network savvy and know your IT before you can play multiplayer? 

Pretty much. ??‍♂️

 

This guide helped me. I wasn’t network savvy either, but I figured this out and now I host matches with a buddy every week. 

  • Upvote 1
NSASPYVAN666
Posted

There has to be a better way to do this than spending hours between your settings and friends trying to figure out port settings. I have a friend who is new to the game, and we've been trying to do some missions for him so he can get a feel for the game and how things handle. I have tried for a few hours to get anything going but have had no luck. I've been playing this game since 2016, and I love it, but this needs a complete overhaul.

  • Like 3
  • Upvote 1
Posted
22 hours ago, NSASPYVAN666 said:

There has to be a better way to do this than spending hours between your settings and friends trying to figure out port settings. I have a friend who is new to the game, and we've been trying to do some missions for him so he can get a feel for the game and how things handle. I have tried for a few hours to get anything going but have had no luck. I've been playing this game since 2016, and I love it, but this needs a complete overhaul.

 

Hi there, I am new to the game (actually I have owned it for a couple of years but never made any progress but am getting going again), and I just went through getting a multiplayer game going for my family.  Yes, the settings are a pain and had me scratching my head at first, but I did get it working after about an hour of running between computers, so it can be done.  Most of that hour was literally going up and down stairs between computers, so I will count it as my daily workout!


The important things for you if you're hosting the server are likely Pitfalls 1 and 2 above.  For me, it was specifically Pitfall 2 - I had to set up port forwarding for my machine that was acting as the multiplayer server HOST.  This is needed so other computers can communicate with the multiplayer host server (your computer in this case) behind the router.  I already had allowed the executable through the Windows firewall on each machine, so Pitfall 1 didn't apply to me.  But it may apply to your friend.  You probably should check  if Windows Defender Firewall\Allowed apps has IL-2 listed as being allowed.  


Pitfalls 3 and 4 did not come into play for me.


Lots of games with a client-server sort of setup use a similar concept of opening ports, so it's not unique to this game.  It is unlikely they'll overhaul it because any other options would probably hardware on their end (think servers in the Cloud like XBox Live) which would cost money.  

All that said, you can do it!  

NSASPYVAN666
Posted

I've been trying for a few days now to get this working. My friend lives in the UK. I live in Florida. We're trying to play Coop since he is new to the game and wants to learn how flight sim works. I've been following the Mission Editor and Multiplayer Server Manual, which has been good enough so far to get me to this point.

 

I have a NETGEAR Nighthawk Router. I've setup port forwarding TCP: 28000, UDP 28000 

I have my firewall set up to have 28000 for both protocols open and allowed. 

I have a second account with Dedicated Server downloaded.

I have set up a few missions, and the software seems to read .sds and .mission files with no issues.

Dedicated Server software allows me to start a server using my IP address, passwords, and settings; it logs in with my second account, and everything looks good.

I check Multiplayer settings in the main menu TCP: 28000, UDP 28000, Mission Downloader port 28100.

I start the game in steam, use my regular account login, and can join my dedicated server.

The friend cannot see the server in his browser when he starts the game.

 

What else am I missing?

  • 4 weeks later...
Posted

It's totally idiotic that this game needs this. No other game does anymore. 

  • Upvote 1
JG4_Deciman
Posted
On 3/29/2023 at 2:53 AM, NSASPYVAN666 said:

 

 

I have a NETGEAR Nighthawk Router. I've setup port forwarding TCP: 28000, UDP 28000 

I have my firewall set up to have 28000 for both protocols open and allowed. 

 

I check Multiplayer settings in the main menu TCP: 28000, UDP 28000, Mission Downloader port 28100.

 

What else am I missing?

Forwarded Downloader Port 28100, too?

 

Deci

  • 3 weeks later...
weaponstrooper
Posted

doesn't work with latest update, I've forwarded my ports check them with a checker, i setup the match just fine, my friends can see the lobby, they join and than after 5 minutes they get kicked with error code 10019

  • Upvote 1
  • 1 year later...
1./SG2_Apo
Posted (edited)

Thanks you @Arctu This works for me.  I didn’t need to turn off Windows Defender; exceptions for IL-2 are already written there.  Thank you very much again.  I made a video, maybe it will help someone.

https://youtu.be/fuL9QCHcrLY

Edited by 1./SG2_Apo
  • 2 months later...
Posted

Brief "how to" for getting server-side mods to work.

 

 

  • 2 weeks later...
Posted

@LukeFF Just wanted to bring this thread to your attention in the hope you might consider pinning it? 

 

It does seem to be bang on topic for the sub forum and be useful into the future for people who are setting up DServer for the first time and so a good candidate for being pinned and so avoid multiple threads on the same topic and reduce chances of necro posts. I actually thought it was pinned at one stage, possibly it got unpinned by accident.

 

Thanks

  • LukeFF pinned this topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...