原文:

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

Mikrotik: Setup SSTP Server for Windows 10 Client的更多相关文章

  1. How to setup Assigned Access in Windows 10 (Kiosk Mode) 设置分配的访问权限(Kiosk模式)

    Let’s say you’re building some sort of ingenious mechanical contraption to be displayed in public th ...

  2. Windows server 2016 / Windows 10关于域管理员帐号权限不足的问题

    今天在测试windows server 2016的域创建时,当安装结束之后,发现使用Administrator用户进行操作时,被提示了权限不足这个问题.于是我在百度上查找了一番之后,找到了解决方法. ...

  3. Installing OpenSSH from the Settings UI on Windows Server 2019 or Windows 10 1809

    Installing OpenSSH from the Settings UI on Windows Server 2019 or Windows 10 1809 OpenSSH client and ...

  4. Windows 10 安装 Sql Server 2014 反复提示需要安装 .NET Framework 3.5 SP1 的解决方案

    一.首先安装.NET Framework 3.5: 离线安装方式: 1.装载相对应的系统安装盘,我是Windows 10 x64 企业版,所以装载Windows 10 x64 企业版安装镜像ISO,盘 ...

  5. Setup Apache + PHP + MySql on Windows 10

    The below steps recorded my experiences to setup the Apache + PHP + MySql on my Windows 10. 1. Downl ...

  6. Windows L2TP Client Setup

    原文链接:http://www.softether.org/4-docs/2-howto/9.L2TPIPsec_Setup_Guide_for_SoftEther_VPN_Server/4.Wind ...

  7. ArcGIS 10.3 for Server 在windows下的安装教程

    原文:ArcGIS 10.3 for Server 在windows下的安装教程 以下是10.2的教程,10.3同样适用. 许可文件: ArcGIS For Server10.3许可文件 - 下载频道 ...

  8. Windows 10 安装FileZilla Server

    在windows 10本机安装了FileZilla Server 本机用FilleZilla Client连接localhost或者192.168.0.197  port 21  都可以连通,但是在同 ...

  9. SQL Server 2008在Windows 10上不支持

    https://support.microsoft.com/en-us/kb/2681562 For SQL Server 2008 R2 SQL Server 2008 R2 is not supp ...

随机推荐

  1. Git的使用--如何安装和使用 github,让小白不在那么白 (一)(超详解)

    简介 刚开始写了关于如何将本地代码上传到github上,但是有些小伙伴们不清楚如何安装Git,这一篇就给小伙伴们普及一下Git的安装和使用.适合刚开始用git的小白,大神或者大佬请绕道. 实际项目开发 ...

  2. virtual DOM的作用:将DOM的维护工作由系统维护转交给virtual DOM维护

    virtual DOM的作用:将DOM的维护工作由系统维护转交给virtual DOM维护 两个方面:对应用端 & 对DOM端(渲染准备的计算) 1.将DOM状态的维护工作由系统维护转交给vi ...

  3. Notes:Unit Testing

    UnitTesting shanzm 右键-->在新标签页中打开图片,即可查看原图,图片超乎你想像的大!

  4. Java诊断利器Arthas优雅排查生产环境

    前言 Arthas 是Alibaba开源的Java诊断工具.在线排查问题,无需重启:动态跟踪Java代码:实时监控JVM状态.对分秒必争的线上异常,Arthas可帮助我们快速诊断相关问题. 下载安装 ...

  5. python--线程和进程的初识

    一.进程与线程之间的关系 1.线程是属于进程的,线程运行在进程空间内,同一进程所产生的线程共享同一内存空间,当进程退出时该进程所产生的线程都会被强制退出并清除. 2.线程可与属于同一进程的其它线程共享 ...

  6. springmvc之静态资源访问不到 -记一次惨痛的经历

    springmvc之静态资源访问不到 -记一次惨痛的经历 问题描述:项目正常启动,可以访问页面,但是无法找到静态资源文件,如css,js等文件资源. 控制台: $ 未定义 页面: GET http:/ ...

  7. centos7启动redis命令

    redis安装 yum install redis 安装完成后redis.conf配置文件默认在 /etc/redis.conf 启动命令: redis-server /etc/redis.conf

  8. vue+element 表格按需合并

    这个功能难度感觉一般般吧,记录一下,以后碰到了直接来复制,懒得再写了 效果如下: 前6列是合并,后面的有几行,动态显示几行 重点是在数据处理上面做文章,合并列大家都会,数据处理呢?这样来处理, 我们拿 ...

  9. android studio学习---模板

    Android Studio还为开发人员提供多种模板选项,从而大大提升开发速度.这些模板能自动创建Activity以及必要的XML文件.大家还可以利用这些模板创建出较为基础的Android应用程序,并 ...

  10. windows环境下基于nginx搭建rtmp服务器

    基于nginx搭建rtmp服务器需要引入rtmp模块,引入之后需重新编译nginx linux环境几个命令行就能实现编译,笔者未尝试,网上有很多教程. windows环境还需要安装一系列的编译环境,例 ...