Home
%3CLINGO-SUB%20id%3D%22lingo-sub-369180%22%20slang%3D%22en-US%22%3ELesson%20Learned%20%2367%3A%20Azure%20SQL%20Database%20-%20SSH%2C%20VNET%20and%20Firewall%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-369180%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3EFirst%20published%20on%20MSDN%20on%20Jan%2023%2C%202019%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20Hello%2C%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Today%20I%20worked%20in%20a%20service%20request%26nbsp%3Bwhen%20our%20customer%20tries%20to%20connect%20using%20%3CSTRONG%3E%20SSH%20to%20the%201433%20port%20from%20a%20Linux%20environment%20%3C%2FSTRONG%3E%20using%20a%20JumpBox%20in%20Azure%20to%20perform%20the%20connection.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20In%20this%20situation%2C%20we%20need%20to%20know%20that%20in%20Azure%2C%26nbsp%3Bdepending%20on%20where%20is%20the%20connection%20coming%2C%20the%20Gateway%20that%20Azure%20SQL%20Database%20has%20to%20validate%20the%20connection%2C%20has%20different%20behaviour%2C%20based%20on%20the%20IP%20source.%20%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3E%3CSTRONG%3EIf%20the%20source%20IP%20is%26nbsp%3Blocated%26nbsp%3Boutside%20Azure%3A%20%3C%2FSTRONG%3E%20All%20the%20connection%20is%20stablished%20against%20the%20Gateway%26nbsp%3Busing%20the%20port%201433.%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3E%3CSTRONG%3E%20If%20the%20source%20IP%20is%20located%26nbsp%3Binside%26nbsp%3BAzure%3A%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3EThe%20first%26nbsp%3Bconnection%20will%20be%20to%20the%20Gateway%26nbsp%3Busing%20the%20port%201433.%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EThis%20gateway%26nbsp%3Bwill%20validate%20the%20connection%20and%20provide%20to%20the%20client%20another%20%3CSTRONG%3E%20Database%20Server%20IP%20and%20another%20port%20(11000-14000)%20%3C%2FSTRONG%3E%20to%20connect.%20This%20process%20is%26nbsp%3Bcalled%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsql-database%2Fsql-database-develop-direct-route-ports-adonet-v12%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20redirection%20%3C%2FA%3E%20.%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%20In%20this%20scenario%2C%20%3CSTRONG%3E%20using%20SSH%20and%20changing%20the%20external%20IP%20to%20private%20IP%2FVNET%20range%20our%20customer%20%3C%2FSTRONG%3E%20was%20not%20able%20to%20connect%20because%20our%20Gateway%20understand%20that%20the%20connection%20is%20stablished%20inside%20Azure%20and%20perform%20the%20redirection.%20%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3EThe%20gateway%26nbsp%3Breceives%20%3CSTRONG%3E%20the%20connection%20using%20the%20port%201433%20%3C%2FSTRONG%3E%20.%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EThe%20gateway%26nbsp%3Breplies%20%3CSTRONG%3E%20with%20the%26nbsp%3Bre-direction%20policy.%20%3C%2FSTRONG%3E%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EAs%20the%20%3CSTRONG%3E%20connection%20has%20been%20stablished%20using%20only%201433%20%3C%2FSTRONG%3E%20when%20the%20client%20application%26nbsp%3Btries%20to%20connect%20to%20the%20Database%20Server%20IP%20and%20port%20is%20not%20possible%20and%20is%20not%20able%20to%20connect.%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3E%3CSTRONG%3ETo%20change%20the%20behaviour%20from%20redirect%20or%20default%20to%20proxy%20(use%20only%20the%20port%201433)%20%3C%2FSTRONG%3E%20please%2C%20follow%20the%20steps%20mentioned%20in%20this%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsql-database%2Fsql-database-connectivity-architecture%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20URL.%20%3C%2FA%3E%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%20In%20our%20%3CA%20href%3D%22https%3A%2F%2Fwww.youtube.com%2Fchannel%2FUC3YXOIGGWPs5xqjzUTMFUCg%2Fvideos%3Fshelf_id%3D0%26amp%3Bview%3D0%26amp%3Bsort%3Ddd%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20YouTube%20channel%20%3C%2FA%3E%20you%20could%20find%20more%20information%20about%20it.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Enjoy!%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-369180%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20MSDN%20on%20Jan%2023%2C%202019%20Hello%2CToday%20I%20worked%20in%20a%20service%20request%26nbsp%3Bwhen%20our%20customer%20tries%20to%20connect%20using%20SSH%20to%20the%201433%20port%20from%20a%20Linux%20environment%20using%20a%20JumpBox%20in%20Azure%20to%20perform%20the%20connection.%3C%2FLINGO-TEASER%3E
First published on MSDN on Jan 23, 2019
Hello,

Today I worked in a service request when our customer tries to connect using SSH to the 1433 port from a Linux environment using a JumpBox in Azure to perform the connection.

In this situation, we need to know that in Azure, depending on where is the connection coming, the Gateway that Azure SQL Database has to validate the connection, has different behaviour, based on the IP source.

  • If the source IP is located outside Azure: All the connection is stablished against the Gateway using the port 1433.

  • If the source IP is located inside Azure:

    • The first connection will be to the Gateway using the port 1433.

    • This gateway will validate the connection and provide to the client another Database Server IP and another port (11000-14000) to connect. This process is called redirection .




In this scenario, using SSH and changing the external IP to private IP/VNET range our customer was not able to connect because our Gateway understand that the connection is stablished inside Azure and perform the redirection.

  • The gateway receives the connection using the port 1433 .

  • The gateway replies with the re-direction policy.

  • As the connection has been stablished using only 1433 when the client application tries to connect to the Database Server IP and port is not possible and is not able to connect.

  • To change the behaviour from redirect or default to proxy (use only the port 1433) please, follow the steps mentioned in this URL.


In our YouTube channel you could find more information about it.

Enjoy!