When I attempt to access my Key Vault using a Private Link (or maybe not, not sure), the service returns 403 (Forbidden
) with this message:
This TCP connection does not allow access to {host}.
What is causing this?
When I attempt to access my Key Vault using a Private Link (or maybe not, not sure), the service returns 403 (Forbidden
) with this message:
This TCP connection does not allow access to {host}.
What is causing this?
This can be caused by the following reasons:
Your DNS record to the Key Vault is pointing to the wrong IP address
This is the most common reason. The following steps help diagnosing:
nslookup <key-vault-name>.vault.azure.net
or the appropriate command for resolving the IP address (host <key-vault-name>.vault.azure.net
for most Linuxes).nslookup
orhost
command in step 2. If that does not match, you have to fix. For detailed instructions, see validate-the-dns-resolution topic of Azure documentation.Your client, or some proxy you are using, is sending the wrong value at
host
header in the request to Key VaultWhen you access Key Vault, the HTTP
host
header must always match the Key Vault hostname. This is the default behavior for vast majority of clients, but certain clients allow customization. Also if you use a proxy, the proxy may change this value.https://contoso.vault.azure.net/
, then the value ofhost
header must becontoso.vault.azure.net
.host
header sent to Key Vault service matches the one you captured in step 2.Your private endpoint is not in "approved" state, or it is approved but is not successfully provisioned
This is uncommon, but may happen when you migrate from Service Endpoints to Private Endpoints, and the migration is not complete. The following steps help diagnosing: