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.