I'm having troubles with an EC2 server
I need to connect with an external SQL server that has whitelisted an elastic IP attached to the instance. All the security rules and routes are set in the most permissive way. However, the outbounding traffic from my EC2 seems to have another IP.
The output
sqlcmd -S <SQLServerIP> -U <User> -P
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Error code 0x102.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if the instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
How can I fix it?