一、VPN服务
1.禁用防火墙

?
打开服务,找到防火墙的服务器,停止,并且启动类型为禁用。(不关掉防火墙无法打开VPN服务)
?
2、打开路由和远程访问

?
右键打开,然后点击配置并启用路由和远程访问。
3、安装VPN服务

?
自定义配置


点击是,启动服务。
注:若发现启动服务不了,请确认Routing and Remote Access是否开启!
?
4、配置VPN

?打开VPN,然后在IP路由选择下面的常规右键,点击新增路由协议。

?选择NAT/基本防火墙,点确定

?找到刚刚新增的NAT/基本防火墙,右键,点击新增接口

?选择本地连接

?然后选择,公共接口连接到Internet,在此接口上启用NAT,最后确定。

?右键VPN服务器,点击属性。

?看到IP的tab,然后点击静态地址池,参考配置如图,点击确定。
注:这个配置只是分配VPN内部的局域网IP地址,并且图中的设置为20个,可以根据自己爱好自由分配随便写。
VPN配置完成。
5、VPN用户配置
创建一个用户,并且用户组为Guest(如果单单想使用VPN访问那些你想看的资源的话,Guest用户足够了)

?点击拨入的tab,点击远程访问权限为允许访问,并且分配静态IP地址。
其他用户参考以上配置即可。
整个VPN流程就完毕了,在windows配置VPN还是比较简单的。
二,架设SSH服务
? ? ?光有VPN可不行,一般情况下,用SSH比用VPN方便很多,是最优化获取资源的方式,当然,有些时候不支持proxy,那就只能用VPN了,VPN可谓万能获取资源的解决方案。
1、下载F-SecureSSHServer,是一款收费的软件,但网上搜吧,你懂的。尝试过几款SSH工具,还是这款能用并且简单。
安装就不用多说了,一直下一步就行了。
2、配置SSHServer

?参考如图,为了安全起见,限制最大连接数。我这里是限制10,默认是0,即不限制。

?改下ssh的默认端口,为了增加一点点的安全性。

点到identity,点击在private key后面的generate,生成私钥。

?期间会看到如上的提示框,鼠标不停的滑动直到生成完毕。

?生成密钥成功

?如果是为了资源而用的话,记得在Tunneling一栏的Allow TCP tunneling打勾,不然是用不了的噢。

? ? ?如何限制SSH登录的用户?可以参考图上的host restrictions、group restrictions和user restrictions。这里我习惯使用用Group限制登录用户。即标注某组的人可以登录SSH,而user是标注单个系统内部的用户。host来限制的话,一般用的比较少。
-------------------------------------------------
??????嗯,VPN和SSH的配置到这里就已经完成了。简单吧...只是图大了点而已,没几步的。大家千万不要拿VPN和SSH做坏事了。VPN只是提供安全的一种连接方式,而SSH是只是远程维护服务器的一种选择,记住囖。