That does seem a bit unique an unusual to be receiving a "permission" error from stream_socket_client(), as opposed to a more network connectivity-related error. It does seem like a condition you're expecting to resolve on the CentOS side rather than the SMTP server side, since it doesn't appear that connectivity has been allowed to even involve the Windows 2016 server end of things yet.
talks about a permission that allows the HTTPD process (which is there the PHP execution is happening, or at least on behalf of the HTTPD process) to make outgoing connections or not.
So one question that raises: Can anything
in your phpBB server make an outbound connection? Maybe SMTP is just the first way in which it was noticed, but perhaps all outbound connections will fail. One test which comes to mind (simply because we've been discussing it elsewhere) is attempting a "Re-Check version" in the phpBB ACP, either for the phpBB version itself or for the version of one of the extensions.
If the outbound communication is being blocked you will get an "unable to retrieve version information"-type error, rather than a successful determination of "up to date" or determination that "a later version is available."