...
Code Block | ||||
---|---|---|---|---|
| ||||
Add-VpnConnection -Name "Smart VPN pptp" -ServerAddress "smcgr.org" -TunnelType "Pptp" -EncryptionLevel "Required" -AuthenticationMethod MSChapv2 -SplitTunneling -RememberCredential -PassThru Add-VpnConnectionRoute -ConnectionName "Smart VPN pptp" -DestinationPrefix "192.168.254.1/32" -PassThru Add-VpnConnectionRoute -ConnectionName "Smart VPN pptp" -DestinationPrefix "10.220.10.0/23" -PassThru Add-VpnConnectionTriggerDnsConfiguration -Name "Smart VPN pptp" -DnsSuffix "loc" -DnsIPAddress 192.168.254.1 |
Основной VPN (alter):
Code Block | ||||
---|---|---|---|---|
| ||||
Add-VpnConnection -Name "Smart VPN" -ServerAddress "smcgr.org" -TunnelType "L2tp" -EncryptionLevel "Required" -AuthenticationMethod MSChapv2 -SplitTunneling -L2tpPsk "drom`$123" -Force -RememberCredential -PassThru -UseWinlogonCredential
Add-VpnConnectionRoute -ConnectionName "Smart VPN" -DestinationPrefix "192.168.254.1/32" -PassThru
Add-VpnConnectionRoute -ConnectionName "Smart VPN" -DestinationPrefix "10.220.10.0/23" -PassThru
Add-VpnConnectionRoute -ConnectionName "Smart VPN" -DestinationPrefix "192.168.0.250/32" -PassThru
Add-VpnConnectionTriggerDnsConfiguration -Name "Smart VPN" -DnsSuffix "smart.net" -DnsIPAddress 192.168.0.250
Add-VpnConnectionTriggerDnsConfiguration -Name "Smart VPN" -DnsSuffix "loc" -DnsIPAddress 192.168.254.1 -PassThru |