Azure-VPN指向站点|分步教程



下载工件-https://goo.gl/sMyFrb
短片-https://youtu.be/2IH3SrqXUEk
长视频-https://youtu.be/-GEEv_7xrEo

如何创建指向Azure虚拟网络的站点VPN
分步教程

1)创建一个虚拟网络
        0)命名-VNET-01
 1)地址空间-10.10.0.0/16
 2)子网-10.10.10.0/24
2)在虚拟网络中创建一个GatewaySubnet
 1)网关子网-10.10.1.0/24
3)创建一个虚拟网络网关
 1)关联到虚拟网络VNET-01
 2)这需要Azure花费45分钟才能完成
4)在虚拟网络VNET-01中创建VM
5)创建根VPN证书
 1)必要时下载Windows SDK-https://developer.microsoft.com/zh-cn/windows/downloads/windows-10-sdk
        2)转到目录-C: Program Files(x86) Windows Kits 10 bin x86
        3)运行命令-makecert -sky exchange -r -n“ CN = AzureVpnRootCert” -pe -a sha1 -len 2048 -ss我的“ AzureVpnRootCert.cer”
 4)运行CertMgr转换为BASE64-certmgr.msc
        5)在“个人证书”中查找证书,然后无需密码即可导出到BASE64
        6)在文本编辑器中打开Base64 Cert,放入一行并粘贴到Azure根证书设置中
6)创建客户证书
        1)命令-makecert.exe -n“ CN = AzureVpnClientCert” -pe -sky exchange -m 96 -ss My -in“ AzureVpnRootCert” -is my -a sha1
 2)运行CertMgr转换为PFX文件-certmgr.msc
        3)在“个人证书”中查找证书并使用密码导出到BASE64
        4)此pfx文件必须已安装并通过VPN软件分发给用户
7)设置网关指向站点设置
        1)地址空间-172.20.20.0/24
        2)设置根证书
              a)名称-AzureVPN
              B)证书 – MIIDCDCCAfSgAwIBAgIQaJWEScsSKplBONYqfhQDZjAJBgUrDgMCHQUAMBsxGTAXBgNVBAMTEEF6dXJlVnBuUm9vdENlcnQwHhcNMTYxMjE5MDg0MjM5WhcNMzkxMjMxMjM1OTU5WjAbMRkwFwYDVQQDExBBenVyZVZwblJvb3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1J2 + mypZtKY / XHrPl3NE2a0I + YacSgoji4smnrciF5M621hrJMLXLTwTLP0Y / zVgxqXnbB / xEfJrccYqZgBwzrvKHH609RARiIpJYpdyomBFCvsviZRJK + FRZn9es3BUnhlGYlEG1lidZbeUHVEf2MSc8QSZOm6OWvE / DYYjQ3gyUHl2wndsU8AppaHqRFiLuKA108IlDrPGMpaS / U + zFsfn9vTWE0m2aJgp6JBhB8OEiggx93Nn8KaYtb1Y5Pp5kTFAzGHC35Yt0W639xJn56 / cEjrItqfbQ2jgOAPYk9mr0VF3v54Tq8qZAmTOrD / SxLzCJTI9yFz05Pg / lwNWaQIDAQABo1AwTjBMBgNVHQEERTBDgBAYnN + hUpyAO1rkJ0aH9zTmoR0wGzEZMBcGA1UEAxMQQXp1cmVWcG5Sb290Q2VydIIQaJWEScsSKplBONYqfhQDZjAJBgUrDgMCHQUAA4IBAQA4KHuby1KLyEtGVOxIgxk + eJDf76wbtCrbYEVyiULV + NcHgy + zb7PXHXFT6Rn24aqF3tmzqvrw3GSqUWaXOb3B5a4OSTa + kG0flXl1bLwJLUyizA5wmL2aDM5JlliTiuYviYDYCoO43f3 + kINvQ0iVclHwPPZWk9gkZ0XYBBzDu5lJtNazG8RBvR9Kxs84rWBt8rGOa / 0 / + qLewIIN60pzaFGJ83BSqzR9XTt AxE9fiGhrPgn11yZsnT2RUeP / N5R3t4iTMnZQ2yriTI1sjS5hSnhjkPhiyC3SFp cRUtB6CXWB8mx2L2JqXZeZbUzGR + uK0GppTFsqm8Q7IDpFyaJJ
8)下载VPN软件
9)安装客户端证书
        1)右键单击“客户端证书”,然后单击“安装”
        2)安装VPN软件
10)通过网络连接连接VPN。

47 comments
  1. Hi! it was an amazing tutorial, all the things work as you did. I was able to do the tutorial and now y have a VPN with some VM, Thank you very much. I have a question, i want to navigate the internet thru the VPN, how can i made that, by now in the client machine my vpn say: without internet access. Thanks again.

  2. Thanks. Awesome tutorial. For those who are not able to find makecert.exe, please check at following location on windows 10 – C:Program Files (x86)Windows Kits10bin10.0.18362.0×86 . Your version in path after bin might be different.

  3. Hi, I´m using your certs and everything is working fine but sometimes the target server has to be rebooted so I have to connect manually to the vpn and the ip address is not the same. Is there a way to keep the vpn client ip address after reboot and reconnect to the vpn automatically?

  4. I am getting following error when i am executing, command:

    – makecert -sky exchange -r -n "CN=AzureVpnRootCert" -pe -a sha1 -len 2048 -ss My "AzureVpnRootCert.cer".Error-makecert' is not recognized as an internal or external command,
    operable program or batch file…"

    Any ideas why this may be happening? I tried setting the %PATH%. Working in windows 10 FYI.

  5. how can i get other pc's to join this set up VPN?

    i sent them the "AzureVpnClientCert.pfx" file and the remote desktop download,

    they install the certificate first and then they install the remote desktop, but then they
    get this error:

    "The connection was prevented because of a policy configured on your RAS/VPN server. Specifically, the authentication method used by the server to verify your username and password may not match the authentication method configured in your connection profile. Please contact the Administrator of the RAS server and notify them of this error.
    (Error 812) For customized troubleshooting information for this connection, click Help."

    or

    On the one win10 pc im getting an Error 798

  6. So i followed all this and it worked perfectly, but i am doing something wrong, i cannot get any other computer to connect to the VM other than the one i used for this tutorial, i get the following error:

    The connection was prevented because of a policy configured on your RAS/VPN server. Specifically, the authentication method used by the server to verify your username and password may not match the authentication method configured in your connection profile. Please contact the Administrator of the RAS server and notify them of this error. (Error 812) For customized troubleshooting information for this connection, click Help.

    On the one win10 pc im getting an Error 798

    Please assist, im clearly missing something or doing it in the wrong order on the other pc's

  7. I got this Error : C:TempAz1>makecert -sky exchange -r -n "CN=AzureVPNRootCert" -pe -a sha1 -len 2048 -ss MY "AzureVPNRootCert.cer"
    This version of C:Program Files (x86)Windows Kits10bin10.0.17134.0arm64makecert.exe is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.

  8. Dude @CodeCowboyOrg I have an Error 812 The connection was prevented due to a policy configured on the RAS / VPN server.
    What could be the problem?

  9. Hi, I have followed the instructions, which i really liked your video but now i am unable to ping any of the virtual machines on my network. Please can someone help ?????

  10. Hi ! I am new to azure. I was able to follow your tutorial till the point of cert. I am using windows 10 OS and downloaded windows sdk 10. Installed it. But in the bin folder I am not able to see all the files you show. I am stuck at this point. Pls can you advise? I wasn't able to download the certs you have posted in the description box to continue with the lab too. Pls help

  11. Hi. Is it possible to open a session on a computer using credentials from a AD DS which is behind a VPN, using this VPN client from Azure ?

Comments are closed.