Skip to content

Instantly share code, notes, and snippets.

@ojpojao
Last active January 29, 2023 20:06
Show Gist options
  • Save ojpojao/d3a287cb97fbb61cd768abf79a67e0e6 to your computer and use it in GitHub Desktop.
Save ojpojao/d3a287cb97fbb61cd768abf79a67e0e6 to your computer and use it in GitHub Desktop.
Criação de conxão VPN pelo PowerShell

Acesso VPN às redes Mefistófeles 🐧

Configuração da VPN sistemas Windows

  • abra um terminal do Powershell como administrador:

  • cole os comandos abaixos na tela do Powershell e tecle ENTER

$connName = "VPN SUPORTE"
$srvAddr = "198.51.100.1"
$tunType = "L2TP"
$rota1= "203.0.113.0/24"
$rota2 = "192.0.2.0/24"

Add-VpnConnection -Name $connName -ServerAddress $srvAddr -TunnelType $tunType -EncryptionLevel "Optional" -AuthenticationMethod MSChapv2 -RememberCredential -SplitTunneling –PassThru
Add-VpnConnectionRoute -ConnectionName $connName -DestinationPrefix $rota1 -PassThru
Add-VpnConnectionRoute -ConnectionName $connName -DestinationPrefix $rota2 -PassThru

  • vá até o ícone de conexão de redes e uma conexão estará disponível com o nome VPN SUPORTE, clique e será solicitado sua usuário e senha para a conexão. Uma vez conectado, não será mais necessário entrar com a senha em uma nova conexão.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment