I’ve installed SQL Server 2016 Express on a Azure Virtual Machine (VM). I opened the ports (port 1433) to connect to the server via Sql Server Management Studio (SSMS) but access was denied. I also opened the port inside the Azure portal on the server but still no success.
Then I came over a solution to the connection problem. You need to set the port number on IPAll among IP Addresses inside TCP/IP in Sql Server Configuration Manager. See screenshot below.

How to navigate to the TCP Port setting:
- Open Sql Server Configuration Manager.
- Click on “Protocols” for “{INSTANCE NAME}” under Sql Server Network Configuration.
- Double click on TCP/IP.
- Click on tab “IP Addresses”.
- Scroll to the bottom and write the port number (1433 is default).
Good luck!