March 9th, 2023, 16:21
(This post was last modified: March 10th, 2023, 02:45 by Ramkhamhaeng.)
Posts: 979
Threads: 5
Joined: Aug 2014
Because you noted Hamatchi:
I've found here an old post for a Civ5 network problem. (It's written in German but the quoted solution text is in English.)
They note that a Hamatchi's configuration change is even active if you disable this program. They suggest to check the local setting of the MTU-value.
Posts: 47
Threads: 5
Joined: Aug 2022
Checked that too, MTU is 1500 so it's ok. I think you might be correct about the mobile network connection, but it's not that relevant since I only wanted to use it for testing purposes. On the other hand, my disconnection problem with zulan server might be connected to my router's firewall. I tried disabling it entirely and I can connect my 3 pc on zulan's server and the game's been running for more than half an hour without disconnections. Now I only need to find what in the firewall is causing troubles. Thanks again for your help!
Posts: 8,617
Threads: 92
Joined: Oct 2017
Have you tried running Civ as Administrator?
"Superdeath seems to have acquired a rep for aggression somehow. In this game that's going to help us because he's going to go to the negotiating table with twitchy eyes and slightly too wide a grin and terrify the neighbors into favorable border agreements, one-sided tech deals and staggered NAPs."
-Old Harry. PB48.
Posts: 979
Threads: 5
Joined: Aug 2014
(March 9th, 2023, 18:39)45°38'N-13°47'E Wrote: Now I only need to find what in the firewall is causing troubles.
If it's the router firewall… Did you added Civ4 to the NAT-Rules of your router?
You has to link traffic on port 2056 (or the value in your Civ4-Ini, if changed) for UDP-Traffic
from the router to your PC and needed another port, 2056+N, for every further player.
With such explicit rule your router shouldn't cut the connection, I assume.
If you using multiple PCs of one LAN, you probably do not need NAT-rules in your router, but if at least one player isn't part of the LAN it's getting complicated. (May be it works without NAT-rules if the external player is the host.)
For every PC you need to open N ports to allowing connections to N players.
Posts: 47
Threads: 5
Joined: Aug 2022
(March 9th, 2023, 19:18)superdeath Wrote: Have you tried running Civ as Administrator?
yes, always
Posts: 47
Threads: 5
Joined: Aug 2022
(March 11th, 2023, 18:09)Ramkhamhaeng Wrote: (March 9th, 2023, 18:39)45°38'N-13°47'E Wrote: Now I only need to find what in the firewall is causing troubles.
If it's the router firewall… Did you added Civ4 to the NAT-Rules of your router?
You has to link traffic on port 2056 (or the value in your Civ4-Ini, if changed) for UDP-Traffic
from the router to your PC and needed another port, 2056+N, for every further player.
With such explicit rule your router shouldn't cut the connection, I assume.
If you using multiple PCs of one LAN, you probably do not need NAT-rules in your router, but if at least one player isn't part of the LAN it's getting complicated. (May be it works without NAT-rules if the external player is the host.)
For every PC you need to open N ports to allowing connections to N players.
I tried already but it made no difference; I forwarded port 2056 to my static (internal) ip of my pc. When I play on my LAN there's no need for this of course; but as you said if there's one player outside the LAN, in theory everyone should be able to connect to everyone, but for some reason it doesn't work: most of the time some players can't establish a peer connection between them, although they can connect to the server (my pc). I will run some more tests in the next days, thank you for your advices.
Posts: 979
Threads: 5
Joined: Aug 2014
I took your question as an opportunity to extend the DirectIP mode of Civ4 (The non-steam version with the old net code) with IPv6.
I 'just' need to analyze the Civ4 traffic, attach a proper IPv6 address to a network package and
hand-wire several ports with the 'socat' tool.
Maybe this will help you, but it will take some time until it is ready.
March 21st, 2023, 06:23
(This post was last modified: March 22nd, 2023, 11:41 by Ramkhamhaeng.)
Posts: 979
Threads: 5
Joined: Aug 2014
@45°38'N-13°47'E
I'm almost finished with my new version of the BTS_Wrapper, which supports now an IPv6 and published a pre-release of the next version:
https://github.com/civ4-mp/save-over-http
https://github.com/civ4-mp/save-over-htt...elease_v11
Edit: Turns out that I forgot to add a dll and moreover the debug variant needs Microsofts 'MSVCP100D.dll'. If this lib is missing on your system try the release version.
I will update the Pre-release.
Maybe you and your friends want try it out to avoid the connecting issues.
The routing between IPv4 and IPv6 will be done by the well known Linux socat tool. I've compiled it by Cygwin for windows.
Usage (by all players except the host needed):
1. Place the content of the Zip-File in your Civ4:BTS installation folder.
2. Call Civ4 by the wrapper binary
Code: BTS_Wrapper.exe "mod= YourModIfNeeded" -l BTS_Wrapper.log --ip6
3. Check if Logfile was created {Civ4:BTS-Folder}/Logs/BTS_Wrapper.log
4. Create a DirectIP-Game and got your public IPv4 (1.2.3.4) and Civ4's portnumber (2056)
5. Clients connecting to host 1.2.3.4:2056
Drawbacks of this Pre-release:
• Currently, the socat.exe-Processes are not killed after the game exits. You has to kill them manually by task manager
April 14th, 2023, 00:09
(This post was last modified: April 14th, 2023, 00:09 by Charriu.)
Posts: 7,602
Threads: 75
Joined: Jan 2018
Hey Ramk,
PB70 would be ready to make the switch to sequential. I already wrote you a PM about it, but maybe it got lost. Superdeath is done with his turn. So should you need to do the switch at the beginning you can just end his turn via the server.
Thanks
Posts: 47
Threads: 5
Joined: Aug 2022
(March 21st, 2023, 06:23)Ramkhamhaeng Wrote: @45°38'N-13°47'E
I'm almost finished with my new version of the BTS_Wrapper, which supports now an IPv6 and published a pre-release of the next version:
https://github.com/civ4-mp/save-over-http
https://github.com/civ4-mp/save-over-htt...elease_v11
Edit: Turns out that I forgot to add a dll and moreover the debug variant needs Microsofts 'MSVCP100D.dll'. If this lib is missing on your system try the release version.
I will update the Pre-release.
Maybe you and your friends want try it out to avoid the connecting issues.
The routing between IPv4 and IPv6 will be done by the well known Linux socat tool. I've compiled it by Cygwin for windows.
Usage (by all players except the host needed):
1. Place the content of the Zip-File in your Civ4:BTS installation folder.
2. Call Civ4 by the wrapper binary
Code: BTS_Wrapper.exe "mod= YourModIfNeeded" -l BTS_Wrapper.log --ip6
3. Check if Logfile was created {Civ4:BTS-Folder}/Logs/BTS_Wrapper.log
4. Create a DirectIP-Game and got your public IPv4 (1.2.3.4) and Civ4's portnumber (2056)
5. Clients connecting to host 1.2.3.4:2056
Drawbacks of this Pre-release:
• Currently, the socat.exe-Processes are not killed after the game exits. You has to kill them manually by task manager
Hey, sorry for not replying for a long time and thanks for your update; I've been able to make it work without the ip6 parameter as that was probably not the problem, the mobile was connected with an ip4 ip. Anyway it looks like it works now and if I have a chance I'll test your change too. I've been able to start a test game with a pitboss server running on my pc and at the same time running a client on my pc and another client on a laptop connected via my mobile phone network. It works flawlessly from what I can see. Thanks again for your help!
|