Marque a caixa de seleção ao lado do túnel de VPN que você quer remover.
Na parte superior da página, clique em Excluir.
Quando você usa o console do Google Cloud para excluir um túnel VPN,
o Google Cloud também exclui todas as sessões do protocolo de gateway de borda (BGP, na sigla em inglês)
associadas ao túnel VPN.
Para confirmar a exclusão, clique novamente em Excluir.
Opcional: para confirmar se as sessões do BGP associadas ao túnel
VPN foram excluídas, acesse a página de detalhes do Cloud Router.
Para mais informações, consulte
Ver detalhes do Cloud Router.
gcloud
Nos comandos a seguir, substitua:
PROJECT_ID: ID do projeto
TUNNEL_NAME: o nome do túnel.
REGION: a região onde o túnel reside.
Para excluir o túnel, siga estas etapas:
Identifique o nome e a região do túnel de VPN que você quer excluir
e use essas informações na próxima etapa. Para listar todos os túneis de VPN
no projeto, execute o seguinte comando:
gcloud compute vpn-tunnels list
--project=PROJECT_ID
Para excluir o túnel de VPN, execute o seguinte comando:
Quando você usa a Google Cloud CLI para excluir um túnel VPN,
o comando não exclui automaticamente as sessões do BGP que estão
configuradas para o túnel VPN.
Opcional: para excluir as sessões do BGP associadas ao túnel VPN,
use o comando
gcloud compute routers remove-bgp-peer. Para instruções, consulte
Remover uma sessão do BGP.
Para verificar se as sessões do BGP foram excluídas, acesse a
página de detalhes do Cloud Router no console do Google Cloud ou execute o
comando gcloud compute routers describe em um
Cloud Router.
Para instruções, consulte
Ver detalhes do Cloud Router.
Quando você usa a API Cloud VPN para excluir um túnel VPN,
o comando da API não exclui nenhuma sessão do BGP associada ao
túnel VPN.
Opcional: para excluir as sessões do BGP associadas
ao túnel VPN, use o método
routers.patch
para atualizar o campo bgpPeers[].
Para instruções, consulte
Remover uma sessão do BGP.
Para verificar se suas sessões do BGP foram excluídas, acesse a
página de detalhes do Cloud Router no console do Google Cloud ou execute o
comando gcloud compute routers describe em um
Cloud Router.
Para instruções, consulte
Ver detalhes do Cloud Router.
Próximas etapas recomendadas
Depois de excluir um túnel da VPN, consulte as seguintes recomendações:
Revise as regras de firewall e exclua as regras que não são mais necessárias.
Se o túnel usava roteamento baseado em políticas da VPN clássica ou era uma VPN baseada em rotas, revise as rotas na rede do Google Cloud. Exclua as rotas estáticas que você não precisa mais.
Se você usou o console do Google Cloud para excluir o túnel de um
gateway da VPN clássica, as rotas estáticas
criadas automaticamente já devem ter sido removidas. Se você usou a
Google Cloud CLI para remover o túnel ou criou rotas estáticas personalizadas
para ele, exclua esses túneis manualmente.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2024-12-05 UTC."],[],[],null,["# Delete a VPN tunnel\n\nThe following procedure applies to tunnels connected to either\nClassic VPN or HA VPN gateways.\n\nTo delete an existing Cloud VPN tunnel, complete the following steps.\n\n#### Permissions required for this task\n\nTo perform this task, you must have been granted the following permissions\n*or* the following IAM roles.\n\n**Permissions**\n\n- `compute.vpnGateways.get`\n- `compute.vpnGateways.list`\n- `compute.externalVpnGateways.get`\n- `compute.externalVpnGateways.list`\n- `compute.vpnGateways.create`\n- `compute.vpnGateways.delete`\n- `compute.vpnGateways.get`\n- `compute.vpnGateways.list`\n- `compute.vpnGateways.use`\n- `compute.vpnGateways.setLabels`\n- `compute.externalVpnGateways.create`\n- `compute.externalVpnGateways.delete`\n- `compute.externalVpnGateways.get`\n- `compute.externalVpnGateways.list`\n- `compute.externalVpnGateways.use`\n- `compute.externalVpnGateways.setLabels`\n\n**Roles**\n\n- `roles/compute.networkAdmin` \n\n### Console\n\nTo delete the tunnel, follow these steps:\n\n1. In the Google Cloud console, go to the **VPN** page.\n\n [Go to VPN](https://console.cloud.google.com/vpn/list?tab=tunnels)\n2. Select the checkbox next to the VPN tunnel that you want to remove.\n\n3. At the top of the page, click **Delete**.\n\n When you use the Google Cloud console to delete a VPN tunnel,\n Google Cloud also deletes any Border Gateway Protocol (BGP) sessions\n associated with the VPN tunnel.\n4. To confirm deletion, click **Delete** again.\n\n5. Optional: To confirm that the BGP sessions associated with the VPN\n tunnel are deleted, go to the Cloud Router details page.\n For more information, see\n [View Cloud Router details](/network-connectivity/docs/router/how-to/viewing-router-details).\n\n### gcloud\n\nIn the following commands, replace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of your project\n- \u003cvar translate=\"no\"\u003eTUNNEL_NAME\u003c/var\u003e: the name of your tunnel\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region where your tunnel resides\n\nTo delete the tunnel, follow these steps:\n\n1. Identify the name and region of the VPN tunnel that you want to delete,\n and then use that information in the next step. To list all VPN tunnels\n in your project, run the following command:\n\n ```\n gcloud compute vpn-tunnels list\n --project=PROJECT_ID\n ```\n2. To delete the VPN tunnel, run the following command:\n\n ```\n gcloud compute vpn-tunnels delete TUNNEL_NAME \\\n --region=REGION \\\n --project=PROJECT_ID\n ```\n\n When you use Google Cloud CLI to delete a VPN tunnel,\n the command does not automatically delete the BGP sessions that are\n configured for the VPN tunnel.\n3. Optional: To delete the BGP sessions associated with the VPN tunnel,\n use the `gcloud compute routers remove-bgp-peer`\n command. For instructions, see\n [Remove a BGP session](/network-connectivity/docs/router/how-to/disabling-removing-bgp#remove_a_bgp_session).\n\n To verify that the BGP sessions are deleted, go to the\n Cloud Router details page in the Google Cloud console, or run the\n `gcloud compute routers describe` command for a\n Cloud Router.\n For instructions, see\n [View Cloud Router details](/network-connectivity/docs/router/how-to/viewing-router-details).\n\n### API\n\nTo delete the tunnel, follow these steps:\n\n1. Make a DELETE request by using the\n [`vpnTunnels.delete`](/compute/docs/reference/rest/v1/vpnTunnels/delete)\n method:\n\n ```\n DELETE https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/vpnTunnels/TUNNEL_NAME\n ```\n\n When you use the Cloud VPN API to delete a VPN tunnel,\n the API command does not delete any BGP sessions that are associated with the\n VPN tunnel.\n2. Optional: To delete the BGP sessions associated with\n the VPN tunnel, use the\n [`routers.patch`](/compute/docs/reference/rest/v1/routers/patch)\n method to update the `bgpPeers[]` field.\n For instructions, see\n [Remove a BGP session](/network-connectivity/docs/router/how-to/disabling-removing-bgp#remove_a_bgp_session).\n\n To verify that your BGP sessions are deleted, go to the\n Cloud Router details page in the Google Cloud console, or run the\n `gcloud compute routers describe` command for a\n Cloud Router.\n For instructions, see\n [View Cloud Router details](/network-connectivity/docs/router/how-to/viewing-router-details).\n\n### Recommended follow-up\n\nAfter deleting a VPN tunnel, consider the following:\n\n- Review your firewall rules and [delete the\n rules](/vpc/docs/using-firewalls#deleting_firewall_rules) that you no longer\n need.\n\n- If the tunnel used Classic VPN policy-based routing or was\n a route-based VPN, review the routes in your Google Cloud\n network. [Delete any static routes](/vpc/docs/using-routes#deletingaroute)\n that you no longer need.\n\n- If you used the Google Cloud console to delete the tunnel for a\n Classic VPN gateway, static routes that\n were automatically created should already be removed. If you used the\n Google Cloud CLI to remove the tunnel, or if you created custom static routes\n for it, delete those tunnels manually.\n\n- If no more tunnels exist for the associated VPN gateway, you can [delete the\n VPN gateway](/network-connectivity/docs/vpn/how-to/deleting-a-gateway).\n\nWhat's next\n-----------\n\n- To view Cloud Logging and Monitoring information, see [View logs and metrics](/network-connectivity/docs/vpn/how-to/viewing-logs-metrics).\n- To use high-availability and high-throughput scenarios or multiple subnet scenarios, see [Advanced configurations](/network-connectivity/docs/vpn/concepts/advanced).\n- To help you solve common issues that you might encounter when using Cloud VPN, see [Troubleshooting](/network-connectivity/docs/vpn/support/troubleshooting)."]]