一、组网需求

如图所示,某公司内部有一台OA服务器,在外移动办公的工作人员需要通过SSL VPN 隧道模式,拨入到公司内网来对内网主机进行访问。


二、网络拓扑

        

三、配置要点

1、基本上网配置

2、SSL VPN用户和用户组配置(本地用户/用户组)

3、sslvpn配置

4、配置SSL VPN


四、配置防火墙

1、基本上网配置

基本上网配置

配置详细过程请参照 "路由模式典型功能--单线上网--静态地址线路上网配置"一节:
接口IP配置如下:

路由配置如下

策略配置如下:

2、SSL VPN用户和用户组配置(本地用户/用户组)

创建本地用户vpnuser1:

创建本地SSL VPN用户组:SSL-VPN-User-Group并将vpnuser1加入到组中:

3、配置SSL VPN

1)配置SSL-VPN门户资源(Portal)

提前定义内网网段和SSL-VPN-Pool(也可以使用默认的):





根据需求,我们选择隧道模式的SSL-VPN,选择默认的Full-Access(既开启了tunnel模式也有web代理模式)即可,当然也可以自己新建门户Portal资源,需要定义具体的资源如下:




2)配置SSL VPN,关联SSL-VPN-User-Group和Full-Access资源(关联用户组和资源)



会提示配置SSL VPN的策略:

3)配置SSL VPN策略,让关联的SSL-VPN-User-Group和Full-Access资源生效(关联用户组和资源)


Full-Access的SSL-VPN配置完毕。

注意Full-Access是三层的VPN,涉及到IP-POOL、隧道分割等路由问题,要特别注意内网到IP-POOL的回程路由问题,以及内网设备针对IP-POOL地址的策略问题。


关于FortiClient的下载:

下载位置1:

国内support中文网站:

http://support.fortinet.com.cn/

FortiClient客户端(WIN/MAC/安卓 6.0版本)下载:

http://support.fortinet.com.cn/index.php?m=content&c=index&a=lists&catid=61
http://support.fortinet.com.cn/index.php?m=content&c=index&a=show&catid=61&id=453
http://support.fortinet.com.cn/index.php?m=content&c=index&a=show&catid=61&id=452


旧版本 1.5M的小SSL VPN客户端,仅仅用于windows系统电脑上,在windows系统上具备更好的兼容性。(兼容XP等旧系统,或者系统问题无法成功安装Forticlient的用户):

http://support.fortinet.com.cn/uploadfile/ssl_vpn_client/sslvpnclient_win_4.4.2333.exe
http://support.fortinet.com.cn/uploadfile/Forticlient/sslvpnclient.msi
http://support.fortinet.com.cn/index.php?m=content&c=index&a=lists&catid=65


下载位置2:

FortiClient官方下载网站:

https://www.forticlient.com/



下载位置3:

全球support技术支持官网,Download --- Firmware_Images --- FortiClient 

https://support.fortinet.com/



将SSL VPN的WEB登陆“下载FortiClient”直接关联到国内的下载链接:

可以将FortiClient的直接下载关联到WEB登陆的SSL VPN中(默认是从www.forticlient.com网站去下载,由于在网站在国外,速度相对较慢):

自定义直接下载位置:

Windows Forticlient安装包链接: https://fortinet-public.s3.cn-north-1.amazonaws.com.cn/FortiClient_Download/FortiClient_6_0_9_windows_and_macos_system/FortiClientSetup_6.0.9.0277_vpnonly_x64.exe

MAC FortiClient安装包链接:https://fortinet-public.s3.cn-north-1.amazonaws.com.cn/FortiClient_Download/FortiClient_6_2_3_and_6_2_4_windows_and_macos_system/FortiClient_v_6_2_4/FortiClientVPNSetup_6.2.4.724_macosx.dmg


实现的效果是:

客户使用Win7系统,使用Firefox浏览器登陆到SSL VPN WEB认证界面 https://200.1.1.1:10443,通过用户名/密码认证之后,可以直接点击下载FortiClient--Windows:

这样客户将通过链接:https://fortinet-public.s3.cn-north-1.amazonaws.com.cn/FortiClient_Download/FortiClient_6_0_9_windows_and_macos_system/FortiClientSetup_6.0.9.0277_vpnonly_x64.exe下载到Forticlient:



然后安装下载到的Forticlient:

 

 

接下来用户可以直接配置FortiClient并进行VPN的拨号:


或者通过SSL VPN的WEB登陆界面调用FortiClient:



或者登陆到WEB的SSL VPN里面再调用FortiClient:





三、检查配置结果

PC配置FortiClient的SSL VPN并完成SSL VPN拨号:





 



访问内网资源:









总结:

1.用户组 关联 Full-Access资源  这样的方式,可实现更加复杂的需求。比如:不同的用户组可以关联不同的Full-Access(Portal)资源,然后再策略调用让其生效即可。"什么样的用户访问(关联)什么样的资源" ---- 这是配置SSL VPN的基本思路。


2.为了兼容性可调整的项(兼容xp和win7),但会牺牲掉一些安全性:

config vpn ssl settings
    set tlsv1-0 enable
    set algorithm medium
    set check-referer enable
end


3.隧道模式是三层的隧道,基于IP层面,因此可以支持TCP/UDP/ICMP等等IP层的应用,不受应用的限制,因此更加具备通用性,推荐大家使用FortiClient方式的SSL VPN。

config vpn ssl settings
    set tlsv1-0 enable (默认disable)
    set tlsv1-1 enable
    set tlsv1-2 enable
    set dtls-tunnel enable (默认开启)

end


4.FortiGate的SSL VPN是完全免费的,不需要收取任何的License费用,也没有任何的SSL VPN功能和登陆用户数限制,FortiClient的VPN功能也是完全免费的,没有任何license/用户数限制。


5.如果不开启隧道分割,则所有的流量都会走到SSL VPN里面去,客户端的上网数据也会走到SSL VPN里面去:

具体可以看一下效果:

FGT配置调整:

1.关闭隧道分割:


2.再添加一条ssl vpn隧道去往WAN1的策略(上互联网):



配置调整完毕,效果是:客户使用FortiClient拨号还是会获取SSL VPN POOL (10.212.134.200-10.212.134.254)中的地址,但是不会有隧道分割的路由下发到电脑本地,而是会下发一条缺省路由,下一跳指向VPN隧道,这样所有的流量都会走向SSL VPN到公司的FortiGate,然后再通过FortiGate的路由及策略进行数据处理和转发。




所有的流量都将通过SSL VPN隧道到达总部防火墙上进行处理。


 


FortiGate2_ShangHai # dia sni pac any "host 114.114.114.114 and icmp" 4
interfaces=[any]
filters=[host 114.114.114.114 and icmp]
2.507950 ssl.root in 10.212.134.200 -> 114.114.114.114: icmp: echo request
2.508103 wan1 out 200.1.1.1 -> 114.114.114.114: icmp: echo request       // 策略中开启了SNAT,10.212.134.200被SNAT为了200.1.1.1,而去访问的互联网。
2.528953 wan1 in 114.114.114.114 -> 200.1.1.1: icmp: echo reply
2.529030 ssl.root out 114.114.114.114 -> 10.212.134.200: icmp: echo reply

FortiGate2_ShangHai # dia sni pac any "host 192.168.1.200 and icmp" 4
interfaces=[any]
filters=[host 192.168.1.200 and icmp]
7.178909 ssl.root in 10.212.134.200 -> 192.168.1.200: icmp: echo request
7.179359 internal out 192.168.1.99 -> 192.168.1.200: icmp: echo request  // 策略中开启了SNAT,10.212.134.200被SNAT为了192.168.1.99,而去访问的内网资源。(并非7层代理,是三层NAT转发的方式处理的,此处策略中把SNAT关闭也是通的。)
7.179676 internal in 192.168.1.200 -> 192.168.1.99: icmp: echo reply
7.179770 ssl.root out 192.168.1.200 -> 10.212.134.200: icmp: echo reply

SSL VPN协商不成功排错:
SSL VPN协商失败?
FortiGate2_ShangHai # diagnose debug application sslvpn -1
FortiGate2_ShangHai # diagnose debug enable


img_10193.jpg img_10929.jpg img_12060.jpg img_121.jpg img_13208.jpg img_18759.jpg img_19917.jpg img_22844.jpg img_22902.jpg img_26720.jpg img_29979.jpg img_30654.jpg img_30816.jpg img_5416.jpg img_5985.jpg img_6824.jpg img_7912.jpg img_8582.jpg img_922.jpg