Disclaimer: I am publishing with full knowledge that the school owns the network and has every right to restrict traffic to your liking.
My rpi3 is running an openVPN server configured using PiVPN and is using TCP port 443. All configurations are predetermined in addition to the port and protocol. Using exactly the same ovpn files, 2 Android devices (100% success) successfully connected to the server in my school's network (which blocks the VPN), only one iPhone was tested and my laptop in Ubuntu failed (0% of success) with the notorious failed TCP handshake. The configuration file can not be guilty, since it works in one client but not in the others. In Android and iOS the same application is being used: OpenVPN Connect and in Ubuntu I was using the current version of repository 19.04 (the version that is being used at the time of this publication using
apt-get install openvpn, I can not verify now). I tried to compile a previous version of OpenVPN (I think 2.3.9?) However, it was not generated due to an SSL error and I think I could not install the dependencies because some ubuntu repositories are also blocked in the school network.
My friend and I noticed that all the free VPN applications in the Play Store did not connect (even when moving to the less used apps), however, there were several VPNs in iOS that worked. So I decided to do this for my friend, and I tried it at home using data on an iPhone (it worked). So at school I let my friend try it and it worked, and we tested the Tor network and blocked websites like OneDrive (I think this was accidentally blocked by a general rule). Another friend tried it on his Android phone and it worked too. I thought everything was perfect, so one day I brought my laptop and used Ubuntu to test it, it would not connect (I do not have records or access to that computer or school now). I have searched for the error widely, and I have tried everything in vain. Another friend decided to test my VPN because I said there would be a speed benefit compared to free VPNs, and they tried it on their iPhone and it did not work. I did not have access to their records, but I can only assume that they could not do a TCP protocol either. My network is correctly configured with TCP port 443 forwarded to my pi, static IP, ddns, everything. I know it works because it works on Android all the time and on iOS when data is used. I tried using my Ubuntu laptop at home to connect to the pi while on the same network by changing the client's ovpn file to use the private IP, and it worked. This shows that the iOS application, the Ubuntu installation 19.04 and the Android applications are all able to connect when they are in unrestricted networks, but only the iOS application and the installation of Ubuntu do not work when they are in a restricted network.
Question: Why would there be a discrepancy between the clients used? Does anyone know the differences between how these applications behave?