MS SQL Server does not allow remote connection by default. To enable MS SQL remote connection, you need to open port 1433 in the firewall. After the port is open, you need to enable TCP/IP protocol in MS SQL Server.
Start SQL Server Management Studio, take the property of the server
Enable SQL Server and Windows Authentication mode
Under Connections, allow Allow Remote Connections
Start SQL Configuration Manager.
SQL Configuration Manager > SQL Server Network Configuration > Protocols for MSSQL SERVER
Now you need to restart MS SQL server, after that, you should be able to connect to MS SQL server remotely.