原文:

http://www.dr0u.com/mikrotik-setup-sstp-server-for-windows-10-client/

Basic how-to on SSTP for a windows 10 machine and a Mikrotik Router.

A workflow on how SSTP works:

  1. The SSTP client establishes a TCP connection with the SSTP server on dst-port TCP 443.
  2. The SSTP client sends SSL Client-Hello message.
  3. The SSTP server sends its server certificate to the SSTP client.
  4. The SSTP client validates the computer certificate, determines the encryption method (AES I believe is by default and cannot be changed in Windows 10 Home edition), generates an SSL session key and then encrypts it with the public key of the SSTP server’s certificate.
  5. The SSTP client sends the encrypted form of the SSL session key to the SSTP server.
  6. The SSTP server decrypts SSL session key with the private key of its computer certificate. All future communication between the SSTP client and the SSTP server is encrypted.
  7. The SSTP client sends an HTTP over SSL request message to the SSTP server.
  8. The SSTP client negotiates an SSTP tunnel with the SSTP server.
  9. The SSTP client negotiates a PPP connection with the SSTP server. This negotiation includes authenticating the user’s credentials against a PPP secret and configuring settings for IPv4 or IPv6 traffic.
  10. The SSTP client begins sending IPv4 or IPv6 traffic over the PPP link.

That’s the basic of SSTP, from the list we can see that we need:

  • A Server Certificate.
  • A CA, so the client can trust the server certificate based on a trusted CA.

In case you’re using a Mikrotik to Mikrotik SSTP you also need a client for the client Mikrotik but in my case I don’t need the client cert for Windows 10.
Before starting, some disclaimers:

  • The site contains Adds, you may click on them and help me pay for hosting or you may choose your favorite add blocker if they annoy you.
  • I’m not a Mikrotik certified trainer…not even certified at all! I encourage you to look into format training at www.mikrotik.com/training

Step 0: Before you start, I suggest you get a dynamic dns if you don’t have one or a static IP address. When we create the certificate you’ll need that on the CN, if the CN is different from the connection name in Windows 10 it won’t let you connect and it’ll come up with an error saying the Certificate name doesn’t match the connection name.

Step 1: Creating the certificate and CA on the Mikrotik router.

Go to System > Certificates and start with a new Cert:

Fill out the fields, one thing to note is the dynamic dns name I talked about on step 0, the other thing is you want to make the expiration date more than a year on the CA, I simply added a 0 so it is 3650 days, or 10 years.

Change the key usage as you won’t need this cert for more than crl and key signing.

Click apply when you’re done, then click copy so you won’t have to fill out everything again for the server certificate.

Step 2: Server certificate

If you clicked copy you’ll have pretty much everything pre-filled for the server cert, just change a few things.

The CN doesn’t matter on this one for SSTP so you can leave the same as the Name.

One thing we need to change on this is the key usage, just remove all the check boxes.

Click Apply, then OK, then just in case open the certificate one more time and make sure the Key Usage is empty.

Step 3: Signing you self-signed certificate for the CA

Here you basically self-sign your certificate, open up the CA certificate and click Sign on the right.

(I just created a new CA named “test” for the purpose of this post, your’s should be named CA or something like that)

CA CRL Host is where the Certificate Revocation List will be, in this case the Mikrotik so we choose the dynamic dns there or public static IP address if you have one.

Click Sign, wait a few minutes,a nd now you have the CA self-signed and Trusted (be sure Trusted is selected)

At this point you can’t change anything on the CA certificate and you’ll see on the Certificates console that displays a KAT (Private Key, Authority, Trusted)

Step 4: Now that you have the CA, it’s time to sign the Server certificate

In this case you’ll use the new CA to sign the server certificate:

And you’ll the certificate along with KI (Private Key, Issued)

That’s pretty much it for the certificates part.

Step 5: Enable SSTP server and create Secret.

Go to PPP and enable the SSTP server, make sure you leave only mschap2 as Authentication method, select your CA as certificate and un-check the “verify client certificate” option. then hit OK and move on to Secrets.

Create a new Secret for the remote user:

Name: your username for the connection

Local Address: Local LAN address for your Mikrotik

Remote Address: The IP address you want to give to your remote client when they connect vis SSTP.

Here you can use different profiles, create a DHCP pool, this is just the easy way.

Step 6: Make sure you open port 443 on your firewall.

Step 7: Exporting the CA cert and installing it on our Windows 10 client.

On RouterOS go to System > Certificates one more time, double click the CA cert and click “Export”, remember teh password and choose a strong one.

Now go to Files and copy the file CA.crt from your Mikrotik to your Windows 10 laptop/PC.

Right click on CA.crt and choose Install Certificate

Follow the steps and remember the CA need to be trusted by the machine, so the certificate should be installed on the Trusted Root Certificate for the Computer Certificate Store.

 

Now hit Windows + R and run the command certlm.msc, that will open the certificate store for the Local Machine, double check that the CA certificate is installed, the name will be whatever you chose on the Certificate CN and not the Name on Mikrotik, you won’t see “CA” instead you’ll see your-domain.changeip.net or whatever you chose.

Step 8: Create the STTP connection on Windows 10

We’re almost there, you only need to create the connection now, go to the setting on your Windows 10 > Network & Internet > VPN and Add a VPN Connection and follow the steps. Remember Username & Password is whatever you used on your Secret.

Step 10: After connecting you should see the active client on the Mikrotik router

If you’re unsure about the connection I suggest you run Wireshark on your laptop/remote PC and check that all the packets are using the SSTP connection, one filter I use on Wireshark !arp and !nbns and ip.addr == 10.10.10.10 and !ssl.record.version (change the IP to use yours).

If you spot any mistakes please let me know @ contactme__at__dr0u.com

转载于:https://www.cnblogs.com/itfat/p/10966386.html

Mikrotik: Setup SSTP Server for Windows 10 Client相关推荐

  1. Server 2016/Windows 10使用域管理员账户操作提示权限不足的问题

    在加入域的Windows Server 2016或者Windows 10上,使用域管理员账户登录系统,进行某些操作(特别是在调整系统桌面设置/控制面板下面),系统会提"Windows无法访问 ...

  2. Step by Step Setup Git Server on Windows with CopSSH + msysGit and Integrate Git with Visual Studio

    Introduction First of all, let me clarify that Git doesn't need to specify the side for client and s ...

  3. signature=095ed28e83b68620637b3a67436b0f8f,SMB 3.1.1 Encryption in Windows 10

    SMB 3.1.1 Encryption in Windows 10 09/09/2015 13 分钟可看完 本文内容 SMB 3 encryption offers data packet conf ...

  4. carplay是否可以用安卓系统_是否可以仅用键盘来操作Windows 10系统和Windows 10应用?...

    一.问题的由来 1. 当时的情景: Windows 10系统上面的鼠标驱动存在问题,鼠标无法使用.我需要打开计算机管理中的设备管理器更新或者重新安装鼠标驱动. 2. 提出问题: 如何使用键盘来做这些操 ...

  5. 设置Windows 10时如何创建本地帐户

    Windows 10 tries its hardest to make you use a Microsoft account. The option was already hidden, but ...

  6. Windows Server VS Windows,两者有啥区别?

    我们都知道什么是Windows,绝大部分人使用的都是windows的系统,但是你知道嘛,除了我们常用windows系统,微软还有其他的系统. 虽然微软提供了两种看似相似的产品,Microsoft 10 ...

  7. windows10 安装linux,windows 10安装linux(ubuntu)子系统

    windows10安装ubuntu子系统系统 之前一直在虚拟机中使用linux系统,但是不是很方便,后来发现windows下也有了linux系统.感觉还不错 1. 打开windows应用市场micro ...

  8. 如何在Windows 10 上安装SQL Server 2000数据库?

    Win10本身是一个兼容性较好的操作系统,目前有很多人在咨询如何在Windows 10 上安装 SQL Server 2000数据库,都没有成功过.主要是卡在了安装过程中的mdac2.6 安装上,一直 ...

  9. win10无法打开匿名级安全令牌_Printer Spoofer:在Windows 10及Server 2019上滥用Impersonation权限...

    0x00 前言 过去几年中诞生了不少工具,如RottenPotato.RottenPotatoNG或者Juicy Potato等,这些工具能够利用Windows系统中的模拟(Impersonation ...

最新文章

  1. ACM Computer Factory
  2. Oracle PL/SQL之令人不解的提示(nls_date_format)
  3. 质数c语言欧拉筛选,Python|欧拉筛法求质数
  4. LoadRunner11设置场景百分比模式完成多台客户端负载测试
  5. View Controller Programming Guide for iOS---(七)---Resizing the View Controller’s Views
  6. linux下 卸载qt_Windows 下 Qt creator安装和使用
  7. 影视.20190507
  8. WebRTC源码架构浅析
  9. Edraw Max(亿图图示)新手福音:教你思维导图的简单画法!
  10. 小米平板完整bios_小米平板bios设置u盘启动操作步骤
  11. 玩游戏计算机什么比较重要,台式机和笔记本玩游戏-玩游戏电脑三大件哪一个最重要? – 手机爱问...
  12. html的vr图怎么制作,什么叫vr全景展示?vr图片怎么做的?
  13. Nginx 配置中nginx和alias的区别分析
  14. B站台湾大学郭彦甫|MATLAB 学习笔记|06 高阶绘图 Advanced Plot
  15. nodemcu控制开关电灯_安装电灯开关护罩,以防止人们关闭智能灯泡
  16. JavaScript:利用JavaScript实现的功能、算法和奇淫技巧(持续更新)
  17. linux 锁屏 代码,Android锁屏与解屏相关代码分析
  18. 【运动学】基于matlab GUI三体运动模拟【含Matlab源码 871期】
  19. mysql against_Mysql 全文搜索 Match Against用法
  20. python中导入模块是用哪个关键字_python中导入模块的关键字是什么_后端开发

热门文章

  1. HTML学生个人网站作业设计:动漫网站设计——我的英雄学院漫画(5页) HTML+CSS+JavaScript 简单DIV布局个人介绍网页模板代码 DW学生个人网站制作成品下载
  2. Python学习2:绘制美国队长之盾(基础)
  3. netdata mysql_netdata-linux实时监测工具
  4. python中时间格式的转换(time模块)
  5. 华北科技学院计算机专业录取分数线,2020华北科技学院录取分数线_历年各专业分数线(2017-2019)_各省投档线_一品高考网...
  6. c语言随机数rand函数一探究竟
  7. 关于 appium 如何关闭 app (已解决)
  8. SpringBoot用实体接收Get请求参数
  9. 做空欢聚,浑水的一场空欢喜?
  10. Python趴网站图片demo