Limit to number of connections via port forwarding ?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
cpn42
Posts: 4
Joined: 10. Oct 2018, 17:46

Limit to number of connections via port forwarding ?

Post by cpn42 »

Hello. I'm using VirtualBox 5.2.18 on Windows 7 host.
I created a NAT network with a port forwarding to an OpenVPN server on this network. I need to connect many clients to this server in order to perform network tests. Every time I launch my clients they stop connecting after the 128th. If I kill one of them and launch a 129th, it connects like a charm. If I try to connect a 129th with the 128 other still running, my OpenVPN server doesn't see anything, no incoming connection, no error, just nothing.
So I'm asking myself, is there a limit to the port forwarding number of simultaneous clients ? I tried to have a look at the source code but didn't see anything relevant. Do someone has an answer please ?
Thanks a lot for helping.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Limit to number of connections via port forwarding ?

Post by socratis »

Are you sure it's not OpenVPN that imposes the limit?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
cpn42
Posts: 4
Joined: 10. Oct 2018, 17:46

Re: Limit to number of connections via port forwarding ?

Post by cpn42 »

I just tested directly (without NAT) with 200 clients and everything works perfectly. So OpenVPN is not the problem. I continue to investigate.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Limit to number of connections via port forwarding ?

Post by socratis »

We need to see a complete VBox.log, from a complete VM run:
  • Start the VM from cold-boot (not from a paused or saved state) / Observe error / Shutdown the VM (force close it if you have to).
  • With the VM completely shut down (not paused or saved), right-click on the VM in the VirtualBox Manager and select "Show Log".
  • Save only the first "VBox.log", ZIP it and attach it to your response. See the "Upload attachment" tab below the reply form.
Image
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
cpn42
Posts: 4
Joined: 10. Oct 2018, 17:46

Re: Limit to number of connections via port forwarding ?

Post by cpn42 »

Here it is.
Thanks a lot for helping.
Attachments
Vbox.log.zip
VBox.log
(26.52 KiB) Downloaded 10 times
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Limit to number of connections via port forwarding ?

Post by socratis »

cpn42 wrote:I just tested directly (without NAT) with 200 clients and everything works perfectly
When you mean "directly" what exactly do you mean? Which networking mode did you use?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
cpn42
Posts: 4
Joined: 10. Oct 2018, 17:46

Re: Limit to number of connections via port forwarding ?

Post by cpn42 »

I put my clients on the same NAT network than the server and I could connect more than 200 clients simultaneously. So the problem is not from OpenVPN.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Limit to number of connections via port forwarding ?

Post by socratis »

cpn42 wrote:I put my clients on the same NAT network than the server
I'm sorry, but I still will need a clarification on this, as I don't "get it". What does it mean "on the same NAT network"? As opposed to what exactly? Do you have any numbers/ranges?

You know, I focused on the last aspects of the logs last time, and I didn't do a thorough analysis. This time, while trying to refresh my memory, I did. And I (re)discovered the following issues:
00:00:00.859033 [/Devices/e1000/0/LUN#0/] (level 4)
00:00:00.859034   Driver <string>  = "IntNet" (cb=7)
00:00:00.859035 
00:00:00.859035 [/Devices/e1000/0/LUN#0/Config/] (level 5)
00:00:00.859035   IfPolicyPromisc      <string>  = "deny" (cb=5)
00:00:00.859036   IgnoreConnectFailure <integer> = 0x0000000000000000 (0)
00:00:00.859036   Network              <string>  = "HostInterfaceNetworking-Intel(R) Ethernet Connection (2) I219-V" (cb=64)
That's not NAT anything, that's Bridged networking!!! Where is the NAT that you're referring to? It's neither "NAT", nor "NATnetwork"!
00:00:00.859062 [/Devices/hpet/0/Config/] (level 4)
00:00:00.859063   ICH9 <integer> = 0x0000000000000001 (1)
Why, oh why are you using something that is declared as experimental, and for OSX guests only? Please explain that to me, with a sentence that makes sense if you can...
00:00:00.859189 VRamSize <integer> = 0x0000000001000000 (16 777 216, 16 MB)
I would max the VRAM. You can never have enough VRAM... ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
vincen57
Posts: 2
Joined: 15. Jan 2019, 19:54

Re: Limit to number of connections via port forwarding ?

Post by vincen57 »

Hello,

I allow to relaunch this topic because I have exactly the same problem.

If I configure one or more Virtualbox VMs with a connection in "nat network" mode, I cannot exceed 127 incoming connections for all VMs.
The system queues additional connections until the total number of connections is less than 127.

Is this a bug or a license restriction from Oracle?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Limit to number of connections via port forwarding ?

Post by socratis »

vincen57 wrote:I allow to relaunch this topic because I have exactly the same problem.
How about re-reading it and providing some logs and information. A "me too" won't get you far...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
vincen57
Posts: 2
Joined: 15. Jan 2019, 19:54

Re: Limit to number of connections via port forwarding ?

Post by vincen57 »

Hello,

Here are the logs of the concerned VM.

I have performed more in-depth tests and have made the following observation:
- Only the "Nat Network" mode is limited to 127 simultaneous connections
- NAT" and "Bridged Network" modes have no such limits
- The problem is not related to port forwarding

So the solution to my problem is to use the "NAT" mode instead of "Nat Network".

I would also like to point out that this problem appears on all types of network protocols (MySQL, HTTP,...)
Attachments
Win7E7-2019-01-17-16-24-18.zip
(22.33 KiB) Downloaded 5 times
Post Reply