记录日常工作关于系统运维,虚拟化云计算,数据库,网络安全等各方面问题。
1、创建地址池 ip--pool
2、创建拨号模板,ppp---profiles
3、创建防火墙伪装,ip--firewall--nat
4、申请证书,这个是重点,别看网上哪些什么用IIS或者centos之类的生成证书,那些用不成,sstp的证书必须是经过全球根信任的证书才行,否则windows连的时候会提示CN证书不受根信任而断开连接!这个是SSTP区别于OVPN的地方。全球唯一免费并且受到根信任的证书的办法机构是www.startssl.com,咱们得找这个网站申请才行。申请教程网上有了网址为:http://www.chinaz.com/free/2010/1111/142581.shtml 大家可以根据这个教程申请一个证书。
申请的时候需要注意的是保存一个key,并且这个key的密码也要记住,因为这个密码很重要,并且这个key也是就出现这一次,不保存好以后证书就不能用了。
另外这个证书只能颁发给某一个域名的二级域名,比如申请的域名是abc.com那么这个证书不是颁发给abc.com的而是他的二级域名,比如:sstp.abc.com。这个二级域名要提前解析好,以后也会有用。
申请完证书就是导入了,导入也不能按照ovpn的证书导入,这个必须要在ros的命令行下面导入的,因为到winbox界面导入不会提示你要输入key的密码,而在命令行就会出现。
导入的教程是ros官方给出的,大家不要奢望ros的什么中文教程会给出这个说明,没有的,中文教程有写将的太笼统了。
官方的sstp证书导入教程(只贴出重要部分,其他的一会大家自己去网页上看):
Now its time to configure certificates for SSTP server. You can use StartSSL to get free browser-approved SSL certificates. You will need 4 files:
•ca.pem (StartSSL Root CA) – you get this one at StartSSL
•sub.class1.server.ca.pem (Class 1 Server SubCA) – you get this one at StartSSL
•your.mikrotik.pem (public certificate)
•your.mikrotik.key (private key)

You have to import these files by copying them to your MikroTik device (either via WinBox drag & drop into “Files” window or via FTP) and then doing something like:
/certificate import file-name=ca.pem
/certificate import file-name=sub.class1.server.ca.pem
/certificate import file-name=your.mikrotik.pem
/certificate import file-name=your.mikrotik.key
Except for your.mikrotik.key, you just hit ENTER when you are asked about the “passphrase”. For your.mikrotik.key, you must enter your private key password, if the key is encrypted. If it is not, you can just hit ENTER as well.

Now you can just do some configuration on this certificates you just imported:
/certificate set cert1 name="StartSSL CA"
/certificate set cert2 name="StartSSL Class 1 Server SubCA"
/certificate set cert3 ca=no
/certificate set cert3 name="your.mikrotik"
Now you can configure the SSTP server interface:
/interface sstp-server server set authentication=mschap1,mschap2 \
certificate=your.mikrotik default-profile=sstp enabled=yes
If you are unable to use port 443 for SSTP, you can use “port=” option in the command above to define the listening port. Don’t forget to open this port on the firewall (on the INPUT chain) if you are blocking ports by default.

这个教程详细地址是:http://nejc.skoberne.net/2011/03 ... bs-2008-nps-radius/ 大家可以翻翻看看,E文不好的可以借助谷歌网页翻译。
导入证书之后如果证书管理界面出现了KR那就说明已经导入成功并且可以正常使用了,如果导入不成功就没有KR。出现了KR就可以下一步了。
5、ppp---sstp  选择启用,证书选择那里选择刚导入的证书名字.
6、创建sstp账户,拨号,ok!
注意,客户端拨号的时候服务器那里必须要填写拥有证书的那个二级域名,输ip地址是不行的!


转载请标明出处【ROS的SSTP,附个简单的教程】。

《www.micoder.cc》 虚拟化云计算,系统运维,安全技术服务.

网站已经关闭评论