puji
puji

Reputation: 1

When I don't use VPN , my vscode tunnel can't work successfully

I am trying to use the VS Code tunnel in my WSL environment. When I use a VPN, I can successfully access the tunnel and see the following link:

Open this link in your browser https://vscode.dev/tunnel/pj

However, when I close the VPN, I encounter the following error:

[2024-09-06 19:03:23] error failed to lookup tunnel: connection error: error sending request for url (https://asse.rel.tunnels.api.visualstudio.com/tunnels/spiffy-mountain-zb8487p?includePorts=true&tokenScopes=host&api-version=2023-09-27-preview): error trying to connect: tcp connect error: Operation timed out (os error 110)

Then I tried to access the URL:

url (https://asse.rel.tunnels.api.visualstudio.com/tunnels/spiffy-mountain-zb8487p?includePorts=true&tokenScopes=host&api-version=2023-09-27-preview)

The response is the following JSON:

{
    "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2",
    "title": "Request not permitted.",
    "status": 401,
    "detail": "Unauthorized tunnel access: Anonymous has scopes []; expected one or more of [manage, manage:ports, host, inspect, connect]. Authentication scheme: aad",
    "traceId": "00-ce7132fec7b1aeec1e4d8c21762295ae-19dc881ee1314d1e-00"
}

Does this mean I need to modify firewall settings, grant certain permissions, or adjust the settings for a specific port?

I tried to access the VS Code tunnel both with and without a VPN. When using the VPN, I was able to successfully connect and receive the correct tunnel URL. However, after disconnecting the VPN, I encountered a 401 Unauthorized error when attempting to access the tunnel URL. This error indicates a problem with tunnel access permissions. I expected to maintain access to the tunnel without the VPN, but instead, I received an error related to unauthorized access.

Upvotes: 0

Views: 325

Answers (0)

Related Questions