06-SSL VPN配置
本章节下载: 06-SSL VPN配置 (1.63 MB)
SSL VPN以SSL(Secure Sockets Layer,安全套接字层)为基础提供远程的安全连接服务。用户可通过互联网,使用内嵌SSL协议的浏览器与远端的Web服务器建立安全的连接,访问内部资源。企业或机构可通过SSL VPN来为移动用户或者外部客户提供访问内部资源的服务并保证安全性。
SSL VPN服务通过SSL VPN网关来提供。SSL VPN网关位于远端接入用户和企业内部网络之间,负责在二者之间转发报文。管理员需要在SSL VPN网关上创建与企业网内服务器对应的资源。
SSL VPN网关与远端接入用户建立SSL连接,并对接入用户进行身份认证。远端接入用户的访问请求只有通过SSL VPN网关的安全检查和认证后,才会被SSL VPN网关转发到企业网络内部,从而实现对企业内部资源的保护。
如图1-1所示,SSL VPN的工作机制为:
(1) 远程接入用户与SSL VPN网关建立HTTPS连接,通过SSL提供的基于证书的身份验证功能,SSL VPN网关和远程接入用户可以验证彼此的身份。
(2) 远程接入用户输入用户名、密码等身份信息,SSL VPN网关对用户的身份进行认证,并对用户可以访问的资源进行授权。
(3) 用户获取到可以访问的资源,通过SSL连接将访问请求发送给SSL VPN网关。
(4) SSL VPN网关接收到资源访问请求后转发给企业网部的服务器。
(5) SSL VPN网关接收到服务器的应答后,通过SSL连接将其转发给用户。
图1-1 SSL VPN示意图
SSL VPN的典型组网方式主要有两种:网关模式和单臂模式。
在网关模式中,SSL VPN网关直接作为网关设备连接用户和内网服务器,所有流量将通过SSL VPN网关进行转发。网关模式可以提供对内网的完全保护,但是由于SSL VPN网关处在内网与外网通信的关键路径上,其性能对内外网之间的数据传输有很大的影响。
图1-2 网关模式
在单臂模式中,SSL VPN网关不作为网关设备。用户访问内网服务器时,流量将先由网关设备转发到SSL VPN网关,经SSL VPN网关处理后再转发到网关设备,由网关设备转发到内网服务器。在单臂模式中,SSL VPN网关不处在网络通信的关键路径上,其性能不会影响内外网的通信。但是这种组网使得SSL VPN网关不能全面地保护企业内部的网络资源。
图1-3 单臂模式
Web接入方式是指用户使用浏览器,通过HTTPS协议访问SSL VPN网关提供的Web资源。用户登录后,Web页面上会显示用户可访问的资源列表,用户可以选择需要访问的资源直接访问。Web接入方式中,所有数据的显示和操作都是通过Web页面进行的。
Web接入方式下,管理员需要在SSL VPN网关上创建URL列表,URL表项为企业网内部服务器的IP地址(或域名)。
Web方式接入过程如下:
(1) 用户使用浏览器,通过HTTPS协议登录SSL VPN网关。
(2) SSL VPN网关对用户进行认证,并对允许用户访问的URL资源进行授权,授权的URL资源以URL链接的形式展示在网关的Web页面上。
(3) 用户在SSL VPN网关的Web页面上访问经过授权的URL资源。
(4) SSL VPN网关解析接收到的Web请求,并使用HTTP或HTTPS协议向Web服务器发送Web请求。
(5) SSL VPN网关接收到Web服务器的应答报文后,通过SSL连接将其转发给用户浏览器。
图1-4 Web接入方式示意图
目前,通过Web接入方式可以访问的资源只有Web服务器。
TCP接入方式是指用户对企业内部服务器开放端口的安全访问。通过TCP接入方式,用户可以访问任意基于TCP的服务,包括远程访问服务(如Telnet)、桌面共享服务、电子邮件服务、Notes服务以及其他使用固定端口的TCP服务。
用户利用TCP接入方式访问内网服务器时,需要在SSL VPN客户端(用户使用的终端设备)上安装专用的TCP接入客户端软件,由该软件实现使用SSL连接传送应用层数据。
TCP接入方式下,管理员需要在SSL VPN网关上创建端口转发规则,将企业网内部服务器的IP地址(或域名)和端口号映射为SSL VPN客户端的本地IP地址(或主机名)和本地端口号。
TCP方式接入过程如下:
(1) 用户使用浏览器,通过HTTPS协议登录SSL VPN网关。
(2) SSL VPN网关对用户进行认证,并对允许用户访问的TCP接入服务(即端口转发规则)进行授权。
(3) 用户在SSL VPN网关的Web页面上下载TCP接入客户端软件
(4) 用户在SSL VPN客户端上启动TCP接入客户端软件,可以看到授权访问的TCP接入服务。TCP接入客户端软件在SSL VPN客户端上打开授权的端口转发规则中指定的本地端口号。
(5) 用户访问本地IP地址(或主机名)和本地端口号时,TCP接入客户端软件将访问请求通过SSL连接发送给SSL VPN网关。
(6) SSL VPN网关解析接收到的请求,并根据本地配置的端口转发规则,将该请求转发给对应的内部服务器。
(7) SSL VPN网关接收到服务器的应答报文后,通过SSL连接将其转发给SSL VPN客户端。
如图1-5所示,在SSL VPN网关上配置端口转发规则后,当用户在SSL VPN客户端上Telnet访问本地地址127.0.0.1、本地端口号2000时,TCP接入客户端软件将访问请求发送给SSL VPN网关。SSL VPN网关将请求转换为对Telnet服务器10.1.1.2、端口23的访问,并转发给Telnet服务器。Telnet服务器的应答报文同样通过SSL VPN网关转发给SSL VPN客户端。
图1-5 TCP接入方式示意图
如图1-6所示,移动客户端均通过TCP接入方式访问内网资源。对于移动客户端,不需要在SSL VPN网关上配置端口转发规则,只需要在客户端上安装移动客户端专用的客户端软件,并在SSL VPN网关上为客户端指定EMO(Endpoint Mobile Office,终端移动办公)服务器。移动客户端通过EMO服务器来获取可以访问的内网资源。
IP接入方式用来实现远程主机与企业内部服务器网络层之间的安全通信,进而实现所有基于IP的远程主机与服务器的互通,如在远程主机上ping内网服务器。
用户通过IP接入方式访问内网服务器前,需要安装专用的IP接入客户端软件,该客户端软件会在SSL VPN客户端上安装一个虚拟网卡。
IP接入方式下,管理员在SSL VPN网关上创建SSL VPN AC接口,并配置下发给SSL VPN客户端的路由表项。
如图1-7所示,IP方式接入过程如下:
(1) 用户在客户端上安装IP接入客户端软件后,启动该软件并登录。
(2) SSL VPN网关对其进行认证和授权。认证、授权通过后,SSL VPN网关为客户端的虚拟网卡分配IP地址,并将授权用户访问的IP接入资源(即路由表项)发送给客户端。
(3) 客户端为虚拟网卡设置IP地址,并添加路由表项,路由的出接口为虚拟网卡。
(4) 用户在客户端上访问企业内网服务器时,访问请求报文匹配添加的路由表项,该报文将进行SSL封装,并通过虚拟网卡发送给SSL VPN网关的SSL VPN AC接口。
(5) SSL VPN网关对SSL报文进行解封装,并将IP报文转发给内网服务器。
(6) 内网服务器将应答报文发送给SSL VPN网关。
(7) SSL VPN网关对报文进行SSL封装后,通过SSL VPN AC接口将其发送给客户端。
图1-7 IP接入方式的工作过程
SSL VPN用户认证是SSL VPN网关对SSL VPN用户身份的认证,用户身份认证通过后,才能访问对应的内网服务器资源。用户认证包括:用户名密码认证、证书认证、验证码验证、短信认证、自定义认证、SMP认证和企业微信扫码认证。这几种认证方式可以只开启其中的一个,也可以同时开启多个。若同时开启多种认证方式,则多种认证方式同时生效,用户需要同时通过多个验证才能访问企业内网资源。自定义认证和短信认证同时开启时,只有自定义认证生效。用户名密码认证功能和证书认证功能都开启的情况下,可以通过authentication use命令来控制SSL VPN用户认证的认证模式。有关用户的详细介绍,请参见“安全配置指导”中的“AAA”。企业微信扫码认证方式仅支持单独使用。
用户名密码认证指通过认证SSL VPN用户的用户名和密码从而认证用户身份。该认证的过程如下:
(1) SSL VPN用户在登录界面输入用户名和密码,用户设备会将用户名和密码发送给SSL VPN网关;
(2) SSL VPN网关将用户名和密码提交给AAA模块进行认证、授权和计费,或者交给自定义认证服务器进行认证和授权。
证书认证指通过认证SSL VPN用户证书从而认证用户身份。该认证的过程如下:
(1) SSL VPN用户选择自己的SSL VPN用户证书,用户设备会将该证书发送给SSL VPN网关;
(2) SSL VPN网关用CA证书检查SSL VPN用户证书是否可信:如果可信,则继续进行下一步;如果不可信,则不能建立SSL连接。如果开启了CRL检查功能,SSL VPN网关还会检查可信的SSL VPN用户证书是否被吊销:如果没有被吊销,则进行下一步;如果已经被吊销,则不能建立SSL连接。有关CRL检查功能的详细介绍,请参见“安全配置指导”中的“PKI”。
(3) SSL VPN网关从SSL VPN用户证书中的指定字段(默认为CN字段)提取用户名,并将该用户名提交给AAA模块进行授权和计费,或者交给自定义认证服务器进行授权。
SSL VPN用户证书中的指定字段必须和该SSL VPN用户的用户名一致。
图1-8 证书认证过程
用户名密码和证书组合认证是指SSL VPN网关对SSL VPN用户的证书以及用户名密码进行双重认证。该认证的过程如下:
(1) SSL VPN用户选择自己的SSL VPN用户证书,用户设备会将该证书发送给SSL VPN网关;
(2) SSL VPN网关用CA证书检查SSL VPN用户证书是否可信:如果可信,则继续进行下一步;如果不可信,则不能建立SSL连接。如果开启了CRL检查功能,SSL VPN网关还会检查可信的SSL VPN用户证书是否被吊销:如果没有被吊销,则进行下一步;如果已经被吊销,则不能建立SSL连接。
(3) SSL VPN网关从SSL VPN用户证书中提取用户名与输入的用户名进行比较:
¡ 若一致,则网关将用户名和密码提交给AAA模块进行认证、授权和计费,或者交给自定义认证服务器进行认证和授权;
¡ 若不一致,则认证不通过。
开启短信认证功能后,设备将使用短信验证码对用户进行身份验证,验证通过后允许用户登录SSL VPN网关。设备支持两种短信认证方式:
· iMC短信认证
设备使用iMC认证服务器对SSL VPN用户进行短信认证,需要在iMC短信认证视图下配置短信认证使用的iMC服务器的IP地址和端口号。
· 短信网关认证
设备使用短信网关对SSL VPN用户进行短信认证,需要在短信网关认证视图下配置引用的短信网关、短信验证码重新发送的时间间隔和短信验证码的有效时间等参数。
对于短信网关认证方式,由于一个用户名只能绑定一个接收短信的手机号码,当多个用户使用同一个用户名登录SSL VPN网关时,需按照用户登录SSL VPN网关的顺序依次查找该手机号码接收到的短信验证码,并将短信验证码提交给SSL VPN网关进行验证。
短信认证的两种方式不能同时使用。
自定义认证是指用户根据实际需求,在本地搭建自定义的认证服务器,并配置自定义认证参数,实现对SSL VPN登录用户的认证和授权。自定义认证暂不支持计费功能。
SSL VPN网关可以通过SMP对接第三方认证平台,实现对SSL VPN用户的身份认证。SMP认证和短信认证同时使用时,仅支持短信网关认证,不支持iMC短信认证。
企业微信扫码认证是指企业用户通过企业微信客户端扫描SSL VPN网关登录页面或者iNode客户端登录页面中提供的二维码进行身份验证。该认证的过程如下:
(1) 企业用户在登录界面选择企业微信扫码认证方式,界面将弹出企业微信二维码。
(2) 企业用户使用手机企业微信客户端扫描二维码。
(3) 企业微信将对用户身份进行认证,完成认证后将认证结果返回给SSL VPN网关,由网关授权用户可以访问的资源。
SSL VPN采用基于用户的权限管理方法,可以根据用户的身份,限制用户可以访问的资源。
如图1-9所示,SSL VPN对资源的管理方式为:同一台SSL VPN网关上可以创建多个SSL VPN访问实例(SSL VPN context)。每个SSL VPN访问实例包含多个策略组。策略组中定义了Web资源、TCP接入服务资源、IP接入服务资源等。
图1-9 SSL VPN资源管理方式
用户登录SSL VPN网关时,SSL VPN网关通过以下方法判断用户所属的SSL VPN访问实例:
· 为不同的SSL VPN访问实例指定不同的域名。远端用户登录SSL VPN网关时,指定自己所在的域,SSL VPN网关根据用户指定的域判断该用户所属的SSL VPN访问实例。
· 为不同的SSL VPN访问实例指定不同的虚拟主机名称。远端用户访问SSL VPN网关时,输入虚拟主机名称,SSL VPN网关根据虚拟主机名称判断该用户所属的SSL VPN访问实例。
SSL VPN网关判断出用户所属的SSL VPN访问实例后,根据SSL VPN访问实例所在的ISP域对用户进行认证和授权,授权结果为策略组名称。如果某个用户被授权访问某个策略组,则该用户可以访问该策略组下的资源。如果没有为用户进行授权,则用户可访问的资源由缺省策略组决定。
SSL VPN网关对用户的认证和授权通过AAA或者自定义认证服务器来完成。目前,SSL VPN支持的AAA协议包括RADIUS(Remote Authentication Dial-In User Service,远程认证拨号用户服务)协议和LDAP(Lightweight Directory Access Protocol,轻量级目录访问协议)协议。在实际应用中,RADIUS协议较为常用。
如图1-10所示,在SSL VPN网关设备上,管理员可以将不同的SSL VPN访问实例关联不同的VPN实例,以便隔离不同访问实例内的服务器资源,避免非法用户访问特定资源的同时,还可以实现服务器资源的地址重叠。
管理员还可以指定SSL VPN网关所属的VPN实例。只有属于同一个VPN的用户可以访问SSL VPN网关,从而避免内部服务器资源泄漏到公网和其他VPN中。
VPN实例的详细介绍,请参见“VPN实例配置指导”中的“VPN实例”。
图1-10 SSL VPN支持VPN多实例示意图
设备缺省支持15个用户同时登录。
购买并安装License后可以增加同时在线的用户数。关于License的详细介绍请参见“基础配置指导”中的“License管理”。
在IRF组网环境中,各成员设备的License可以叠加,IRF设备支持的同时在线用户数为缺省用户数和各成员设备License授权用户数的总和。若成员设备发生故障,此成员设备上的License将在IRF设备上继续生效,有效期为60天。
非缺省vSystem不支持本特性的部分功能,具体包括:
· 配置SSL VPN用户接入认证
¡ 配置短信网关认证功能
¡ 配置企业微信扫码认证
· 配置SSL VPN支持VPN多实例
· 控制SSL VPN用户接入
¡ 配置SSL VPN防暴力破解功能
¡ 配置SSL VPN单点登录功能
¡ 配置企业微信客户端访问内网资源功能
¡ 配置禁用的SSL VPN接入客户端软件类型
非缺省vSystem对具体命令的支持情况,请见本特性的命令参考。有关vSystem的详细介绍请参见“虚拟化技术配置指导”中的“vSystem”。
用户先采用Web接入方式登录SSL VPN网关,又在Web页面上下载并运行IP接入客户端。此时用户通过两种接入方式访问SSL VPN网关,SSL VPN网关上会为该用户生成一个SSL VPN会话。之后如果用户从浏览器退出或者从IP接入客户端退出,则会因为SSL VPN会话断开而将无法继续访问对应的Web接入服务资源和IP接入服务资源。
配置SSL VPN访问控制策略时,过滤规则引用的ACL规则中不能存在VPN实例,否则该规则不能生效。
在“浏览器-SSL VPN网关—服务器”组网下,如果服务器回应的报文中带有重定向URL,由于SSL VPN网关不会修改请求和响应报文,所以无法处理重定向URL中的地址。
SSL VPN功能仅支持在RBM+VRRP方式的主备模式下进行高可靠性部署,不支持在双机热备的其他模式下进行可靠性部署。有关RBM功能的详细介绍,请参见“可靠性配置指导”中的“双机热备(RBM)”。
SSL VPN相关配置均在SSL VPN网关设备上进行。SSL VPN配置任务如下:
(1) SSL VPN配置.docx - _Topic_41596_20231104000067_title
(2) SSL VPN配置.docx - _Topic_41592_20231104000262_title
(3) 配置SSL VPN用户接入认证
a. SSL VPN配置.docx - _Topic_41576_20231104000439_title
b. SSL VPN配置.docx - _Topic_41534_20231104002763_title
自定义认证必须配置自定义认证服务器。
(4) 配置SSL VPN资源访问控制
请根据实际组网需求选择配置各类型的接入服务,配置次序无关联。
a. D:\ICC\1718073600026710016\241\ZH\12279\SSL VPN配置.docx - _Topic_41593_20231104003573_title
b. SSL VPN配置.docx - _Topic_41600_20231104003773_title
c. SSL VPN配置.docx - _Topic_41598_20231104004899_title
d. SSL VPN配置.docx - _Topic_41581_20231104005669_title
e. SSL VPN配置.docx - _Topic_41633_20231104002169_title
f. (可选)D:\ICC\1718073600026710016\241\ZH\12279\SSL VPN配置.docx - _Topic_41570_20231104002986_title
g. (可选)SSL VPN配置.docx - _Topic_41549_20231104003185_title
h. (可选)SSL VPN配置.docx - _Topic_41550_20231104003401_title
i. (可选)SSL VPN配置.docx - _Topic_41551_20231104003624_title
j. (可选)SSL VPN配置.docx - _Topic_41561_20231104003807_title
(5) (可选)配置SSL VPN支持VPN多实例
¡ D:\ICC\1718073600026710016\241\ZH\12279\SSL VPN配置.docx - _Topic_41636_20231104004194_title
¡ D:\ICC\1718073600026710016\241\ZH\12279\SSL VPN配置.docx - _Topic_41637_20231104004391_title
(6) (可选)控制SSL VPN用户接入
¡ SSL VPN配置.docx - _Topic_41548_20231104004597_title
¡ SSL VPN配置.docx - _Topic_41562_20231104004788_title
¡ SSL VPN配置.docx - _Topic_41532_20231104005029_title
¡ SSL VPN配置.docx - _Topic_41524_20231104005204_title
¡ D:\ICC\1718073600026710016\241\ZH\12279\SSL VPN配置.docx - _Topic_41578_20231104000102_title
¡ SSL VPN配置.docx - _Topic_41542_20231104001342_title
¡ SSL VPN配置.docx - _Topic_41559_20231104001544_title
(7) (可选)SSL VPN配置.docx - _Topic_41527_20231104001753_title
¡ SSL VPN配置.docx - _Topic_41626_20231104002113_title
¡ SSL VPN配置.docx - _Topic_41531_20231104002301_title
(8) (可选)SSL VPN配置.docx - _Topic_41625_20231104003112_title
进行SSL VPN配置前,需要在SSL VPN网关上完成以下操作:
· 配置PKI,为SSL VPN网关获取数字证书,配置方法请参见“安全配置指导”中的“PKI”。
· 配置SSL服务器端策略,配置方法请参见“安全配置指导”中的“SSL”。
SSL VPN网关使用缺省地址时,端口号不能与设备的HTTPS管理地址的端口号相同。
如果引用的SSL服务器策略有变化,需要重新开启SSL VPN网关才能生效。
SSL VPN网关的IP地址和端口号与HTTPS管理地址和端口号不能完全相同,如果完全相同,则用户访问此地址和端口时,只能访问SSL VPN网关页面,而不能访问设备的管理页面。
SSL VPN网关的IPv4地址和IPv6地址不能同时生效,若同时配置了IPv4地址和IPv6地址,则最后一次配置的IP地址生效。
远程接入用户使用浏览器与SSL VPN网关建立HTTPS连接的过程中,SSL VPN网关支持向对端提供两种类型的本地证书,设备签发的自签名证书和CA为SSL VPN网关签发的本地证书,以便远程接入用户对SSL VPN网关进行基于数字证书的身份验证。远程接入用户可根据安全性要求和配置复杂度在如下两种方案中进行选择:
· 采用设备签发的自签名证书,此方式配置简单,但安全性较低。在该方式下,无需配置SSL VPN网关引用的SSL服务器端策略,使用的SSL参数均为缺省值。但由于自签名证书不是由可信的CA签发而不受远程接入用户的浏览器信任,当远程接入用户使用HTTPS方式访问SSL VPN网关时,远程接入用户的浏览器上将会弹出安全风险提示,若远程接入用户能够接受使用自签名证书带来的安全风险,可选择忽略此提示,继续浏览网页。
· 采用CA为SSL VPN网关签发的本地证书,此方式配置相对复杂但安全性较强。在该方式下,SSL VPN网络管理员需要获取CA证书并向CA申请本地证书,同时配置SSL服务器端策略,并将其与SSL VPN网关进行关联,来增强SSL VPN服务的安全性。
有关数字证书和SSL服务器端策略的详细介绍,请分别参见“安全配置指导”中的“PKI”和“SSL”。
为了提高报文传输的安全性,设备SSL服务端策略缺省情况下仅支持TLS1.1及以上的SSL协议版本,因此要求iNode客户端也支持TLS1.1及以上的SSL协议版本,否则缺省情况下,无法成功登录iNode客户端。SSL VPN管理员可以将iNode客户端升级到最新版本,从而解决此问题。
(1) 进入系统视图。
system-view
(2) 创建SSL VPN网关,并进入SSL VPN网关视图。
sslvpn gateway gateway-name
(3) 配置SSL VPN网关的IPv4地址和端口号。
ip address ip-address [ port port-number ]
缺省情况下,SSL VPN网关的IP地址为0.0.0.0,端口号为443。
执行本配置时,如果没有指定端口号,则缺省端口号为443。
(4) 配置SSL VPN网关的IPv6地址和端口号。
ipv6 address ipv6-address [ port port-number ]
缺省情况下,未配置SSL VPN网关的IPv6地址和端口号。
执行本配置时,如果没有指定端口号,则缺省端口号为443。
(5) 指定SSL VPN网关引用SSL服务器端策略。
ssl server-policy policy-name
缺省情况下,SSL VPN网关引用自签名证书的SSL服务器端策略。
(6) 开启当前的SSL VPN网关。
service enable
缺省情况下,当前的SSL VPN网关处于关闭状态。
SSL VPN访问实例用来管理用户会话、用户可以访问的资源等。
· 不同的SSL VPN访问实例引用相同的SSL VPN网关时,必须为不同的SSL VPN访问实例指定不同的域名或虚拟主机名。
· 如果SSL VPN访问实例引用SSL VPN网关时没有指定域名和虚拟主机名称,那么其他的SSL VPN访问实例就不能再引用该SSL VPN网关。
· 如果为SSL VPN访问实例指定了虚拟主机名称,则需要在网络中部署DNS服务器,以便客户端将虚拟主机名称解析为SSL VPN网关的IP地址。
· 一个SSL VPN访问实例最多可以引用10个SSL VPN网关
· SSL VPN访问实例中设置SSL VPN网关和虚拟主机时,当虚拟主机名包含下划线时(一般要求域名不能包含下划线,如果SSL VPN用于Web接入,虚拟主机名将作为了域名的一部分),此时IE浏览器无法保存Cookie,发送请求报文时不会携带Cookie,导致SSL VPN登录失败。
(1) 进入系统视图。
system-view
(2) 创建SSL VPN访问实例,并进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 配置SSL VPN访问实例引用SSL VPN网关。
gateway gateway-name [ domain domain-name | virtual-host virtual-host-name ]
缺省情况下,SSL VPN访问实例没有引用SSL VPN网关。
(4) 配置SSL VPN访问实例使用指定的ISP域进行AAA认证。
aaa domain domain-name
缺省情况下,SSL VPN访问实例使用缺省的ISP域进行认证。
SSL VPN用户的用户名中不能携带所属ISP域信息。执行本配置后,SSL VPN用户将采用指定ISP域内的认证、授权、计费方案对SSL VPN用户进行认证、授权和计费。
(5) 开启当前的SSL VPN访问实例。
service enable
缺省情况下,SSL VPN访问实例处于关闭状态。
(6) (可选)配置SSL VPN访问实例的最大会话数。
max-users max-number
缺省情况下,SSL VPN访问实例的最大会话数为1048575。
(7) (可选)配置SSL VPN会话保持空闲状态的最长时间。
timeout idle minutes
缺省情况下,SSL VPN会话保持空闲状态的最长时间为30分钟。
(8) (可选)配置SSL VPN会话保持空闲状态的流量阈值。
idle-cut traffic-threshold kilobytes
缺省情况下,未配置SSL VPN会话保持空闲状态的流量阈值。
(9) 配置SSL VPN访问实例引用SSL客户端策略。
ssl client-policy policy-name
缺省情况下,SSL客户端策略支持的加密套件为dhe_rsa_aes_128_cbc_sha、dhe_rsa_aes_256_cbc_sha、rsa_3des_ede_cbc_sha、rsa_aes_128_cbc_sha、rsa_aes_256_cbc_sha。
执行本配置后,SSL VPN网关使用指定的SSL客户端策略与HTTPS类型的Web服务器建立连接。
(10) (可选)开启全局URL伪装功能。
url-masking enable
缺省情况下,URL伪装功能处于关闭状态。
开启本功能后,该访问实例下所配置的Web接入业务中的Web资源URL将被转换成一定规则的编码字符串对SSL VPN用户呈现。
对于SSL VPN证书认证功能,仅在Web接入和IP接入方式下,支持SSL服务器端强制要求对SSL客户端进行基于数字证书的身份验证;在TCP接入和移动客户端接入方式下,不支持SSL服务器端强制要求对SSL客户端进行基于数字证书的身份验证。
SSL VPN用户认证配置任务如下:
(1) 配置基础认证功能
请至少选择如下一种或多种认证方式:
¡ 配置证书认证功能
(2) (可选)配置组合认证功能
(3) (可选)配置认证参数
¡ 配置用户认证模式
(4) (可选)配置企业微信扫码认证
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 开启用户名密码认证功能。
password-authentication enable
缺省情况下,用户名密码认证功能处于开启状态。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 开启证书认证功能。
certificate-authentication enable
缺省情况下,证书认证功能处于关闭状态。
(4) 配置SSL VPN用户证书中的指定字段取值作为SSL VPN用户名。
certificate username-attribute { cn | email-prefix | oid extern-id }
缺省情况下,使用SSL VPN用户证书中主题部分内的CN字段取值作为SSL VPN用户名。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 开启验证码验证功能。
verify-code enable
缺省情况下,验证码验证功能处于关闭状态。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 配置iMC短信认证,并开启iMC短信认证功能。
sms-auth type imc
缺省情况下,iMC短信认证功能处于关闭状态。
(4) 创建iMC短信认证视图,并进入iMC短信认证视图。
sms-auth imc
(5) 配置iMC短信认证使用的iMC服务器。
server-address { ip-address | ipv6 ipv6-address } port port-number [ vpn-instance vpn-instance-name ]
缺省情况下,未配置iMC短信认证使用的iMC服务器。
短信网关的具体配置,请参见“安全配置指导”中的“SMS”。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 进入SSL VPN用户视图。
user username
(4) 配置用于接收短信的手机号码。
mobile-num number
缺省情况下,未配置用于接收短信的手机号码。
(5) 退回SSL VPN访问实例视图 。
quit
(6) 配置短信网关认证,并开启短信网关认证功能。
sms-auth type sms-gw
缺省情况下,短信网关认证功能处于关闭状态。
(7) 创建短信网关认证视图,并进入短信网关认证视图。
sms-auth sms-gw
缺省情况下,不存在短信网关认证视图。
(8) 配置短信网关认证引用短信网关。
gateway sms-gateway-name
缺省情况下,未引用对接第三方短信平台的短信网关。
(9) 开启用户手机号码绑定功能。
mobile-num-binding enable
缺省情况下,用户手机号码绑定功能处于关闭状态。
(10) 配置短信验证码重新发送的时间间隔。
verification-code send-interval seconds
缺省情况下,短信验证码重新发送的时间间隔为60秒。
(11) 配置短信验证码的有效时间。
verification-code validity minutes
缺省情况下,短信验证码的有效时间为1分钟。
(12) 配置国家代码。
country-code country-code
缺省情况下,国家代码为86。
(13) 配置发送短信的内容模板。
sms-content string
缺省情况下,短信内容模板为:“您好,$$USER$$,本次登录的短信验证码为:$$VERIFYCODE$$,短信验证码的有效时间为$$VALIDTIME$$分钟。”。
用户名密码认证功能和证书认证功能都开启的情况下,可以通过authentication use命令来控制SSL VPN用户认证的认证模式。
· 若认证模式选用any-one,则用户只需要通过其中一种认证即可登录SSL VPN访问实例。
· 若认证模式选用all,则用户必须通过这两种认证(即用户名密码和证书的组合认证)方可登录SSL VPN访问实例。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 配置SSL VPN用户登录访问实例的认证模式。
authentication use { all | any-one }
缺省情况下,SSL VPN用户登录访问实例的认证模式为all。
用户可以在SSL VPN网关的资源页面,单击个人设置按钮,进入个人设置页面自助修改密码。目前仅支持通过iMC服务器认证的远程用户自助修改密码。
当用户自助修改密码功能关闭时,SSL VPN资源页面的个人设置按钮将处于隐藏状态,用户无法修改密码。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 开启访问实例下所有用户修改SSL VPN登录密码功能。
password-changing enable
缺省情况下,用户修改SSL VPN登录密码功能处于开启状态。
(4) 进入SSL VPN用户视图。
user username
(5) (可选)开启用户修改SSL VPN登录密码功能。
password-changing enable
缺省情况下,用户修改SSL VPN登录密码功能处于开启状态。
(6) 退回SSL VPN访问实例视图。
quit
(7) 配置iMC认证用户自助修改密码使用的iMC服务器。
self-service imc address { ip-address | ipv6 ipv6-address } port port-number [ vpn-instance vpn-instance-name ]
缺省情况下,未配置iMC认证用户自助修改密码使用的iMC服务器。
仅当iMC认证用户需要修改SSL VPN网关登录密码时,需要配置本命令指定改密使用的iMC服务器。
在开始配置企业微信扫码认证功能之前,SSL VPN网关管理员需要在企业微信管理平台配置SSL VPN网关的可信域名和企业微信授权登录。
在企业微信管理平台配置可信域名的步骤如下:
(1) 在浏览器中输入地址https://work.weixin.qq.com,使用企业微信客户端扫码登录企业微信管理平台,单击<应用管理>按钮,选择应用,进入应用页面。
(2) 在应用页面的“网页授权及JS-SDK”处,单击<申请域名校验>按钮,在可信域名输入框中输入SSL VPN网关的域名和端口gateway.example.com:port。
(3) 单击<申请校验域名>按钮,按照页面提示下载文件,并在SSL VPN网关Web网管页面的全局配置页面上传域名校验文件。
(4) 勾选“已上传域名归属校验文件”,单击<确定>按钮,完成域名校验。
在企业微信管理平台配置企业微信授权登录的步骤如下:
(5) 在浏览器中输入地址https://work.weixin.qq.com,使用企业微信客户端扫码登录企业微信管理平台,单击<应用管理>按钮,选择应用页签,单击指定的应用图标,进入该应用页面。
(6) 在应用页面的“企业微信授权登录”处,单击<设置>按钮,在Web网页区域的授权回调域输入框中输入SSL VPN网关的域名和端口gateway.example.com:port。
(7) 单击<保存>按钮,完成配置。
仅支持在Web接入方式以及IP接入方式(通过iNode客户端)下进行企业微信扫码登录。
对于IP接入方式,设备缺省证书不支持企业微信扫码认证功能,请安装可信的SSL证书。
通过企业微信扫码认证的用户仅支持授权SSL VPN缺省策略组。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 开启企业微信认证功能。
wechat-work-authentication enable
缺省情况下,企业微信认证功能处于关闭状态。
(4) 配置企业微信API服务器的URL地址。
wechat-work-authentication url url
缺省情况下,未配置企业微信API服务器的URL地址。
(5) 配置企业微信认证使用的企业ID。
wechat-work-authentication corp-id corp-id
缺省情况下,未配置企业微信认证使用的企业ID。
企业ID可在企业微信管理平台的“我的企业”>“企业信息”中查看。
(6) 配置企业微信认证中企业应用数据的访问密钥。
wechat-work-authentication app-secret app-secret
缺省情况下,未配置企业微信认证中企业应用数据的访问密钥。
(7) 配置企业微信扫码认证功能使用的应用ID。
wechat-work-authentication agent-id agent-id
缺省情况下,未配置企业微信扫码认证功能使用的应用ID。
企业应用ID可在企业微信管理平台的“应用管理”>“应用详情”>“Agentid”中查看。
SSL VPN用户认证服务器类型包括:
· AAA认证服务器:设备使用AAA服务器对SSL VPN用户进行认证、授权和计费。有关AAA的配置,请参见“安全配置指导”中的“AAA”。
· 自定义认证服务器:用户根据实际需求,在本地搭建自定义的认证服务器,并配置自定义认证参数,实现对SSL VPN登录用户的认证和授权。自定义认证暂不支持计费功能。自定义认证参数的具体配置请参见“配置自定义认证服务器参数”。非缺省vSystem不支持自定义认证服务器。
· SMP认证服务器:SSL VPN网关可以通过SMP对接第三方认证平台,实现对SSL VPN用户的身份认证。SMP认证参数的具体配置请参见“配置SMP认证服务器参数”。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 配置认证服务器类型。
authentication server-type { aaa | custom | smp }
缺省情况下,SSL VPN认证服务器类型为AAA认证服务器。
SSL VPN用户认证、授权采用自定义认证服务器时,需要配置以下参数:
· 自定义认证服务器的URL地址:SSL VPN网关采用HTTP协议将认证请求报文发送到指定的URL地址。
· 自定义认证超时时间:SSL VPN网关向自定义认证服务器发送HTTP请求报文后,如果在超时时间内没有收到服务器的应答报文,则SSL VPN网关向SSL VPN客户端返回认证失败信息。
· 自定义认证的请求报文信息:SSL VPN网关根据该信息构造HTTP认证请求报文。认证请求报文信息包括HTTP请求方式、HTTP请求报文首部字段和认证信息请求模板。
· 自定义认证的应答报文信息:SSL VPN网关根据该信息解析接收到的认证应答报文。应答报文信息包括HTTP应答报文格式、HTTP应答报文中标识认证成功的应答值、HTTP应答报文的应答字段名和自定义应答模板。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 配置自定义认证服务器的URL地址。
custom-authentication url url
缺省情况下,未配置自定义认证服务器的URL地址。
(4) 配置自定义认证的超时时间。
custom-authentication timeout seconds
缺省情况下,自定义认证的超时时间为15秒。
(5) 配置自定义认证的请求报文信息。
a. 配置自定义认证的HTTP请求方式。
custom-authentication request-method { get | post }
缺省情况下,自定义认证的HTTP请求方式为GET。
b. 配置自定义认证的HTTP请求报文首部字段。
custom-authentication request-header-field field-name value value
缺省情况下,自定义认证的HTTP请求报文首部字段内包含如下内容:Content-type:application/x-www-form-urlencoded
User-Agent:nodejs 4.1
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q
c. 配置自定义认证的认证信息请求模板。
custom-authentication request-template template
缺省情况下,未配置自定义认证的认证信息请求模板。
(6) 配置自定义认证的应答报文信息。
a. 配置自定义认证的HTTP应答报文格式。
custom-authentication response-format { custom | json | xml }
缺省情况下,自定义认证的HTTP应答报文格式为JSON。
b. 配置自定义认证的HTTP应答报文中标识认证成功的应答值。
custom-authentication response-success-value success-value
缺省情况下,未配置HTTP应答报文中标识认证成功的应答值。
c. 配置自定义认证的HTTP应答报文的应答字段名。
custom-authentication response-field { group group | message message | result result }
缺省情况下,未配置HTTP应答报文的应答字段名。
当选择HTTP应答报文格式为JSON或XML时,需要配置HTTP应答报文的应答字段名。
d. 配置自定义认证的自定义应答模板。
custom-authentication response-custom-template { group | message | result } template
缺省情况下,未配置自定义认证的自定义应答模板。
只有HTTP应答报文格式选择了custom格式,才需要配置自定义认证的自定义应答模板。
SMP(Security Management Platform,安全业务管理平台),是一个可以对各安全产品进行统一管理的智能管理平台。SSL VPN网关可以通过SMP对接第三方认证平台,实现对SSL VPN用户的身份认证。通过SMP对接第三方认证平台,相对于SSL VPN网关直接对接第三方认证平台,可以简化SSL VPN网关的配置,且方便后续业务的扩展。
SSL VPN用户认证采用SMP认证服务器时,需要先创建SMP认证视图,并在该视图中配置以下参数:
· SMP对接的第三方认证平台类型:SSL VPN网关通过SMP对SSL VPN用户进行身份认证时,SSL VPN网关将通知SMP需要对接的第三方认证平台类型。SMP与该认证平台对接成功后,由该平台对SSL VPN用户进行身份认证,并将认证结果返回给SMP,SMP再将认证结果返回给SSL VPN网关。
· SMP的主机名或IP地址:SSL VPN网关将与本配置指定的SMP进行信息交互,从而对SSL VPN用户进行身份认证。此SMP的主机名由SMP提供,需要联系SMP管理员获取。
· SSL VPN网关与SMP建立连接时使用的密钥:SSL VPN网关与SMP建立连接时,SSL VPN网关需要向SMP提供本功能配置的密钥,SMP会使用该密钥验证SSL VPN网关的身份,验证通过后,才能建立连接。此密钥由SMP提供。
· SMP关联的VPN实例:配置本参数后,SMP包含的资源将属于关联的VPN实例,否则,SMP包含的资源将属于公网。
删除SMP认证视图的同时,该视图下的所有内容都将被删除,请慎重操作。
SMP认证和短信认证同时使用时,仅支持短信网关认证,不支持iMC短信认证。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 创建SMP认证视图,并进入SMP认证视图。
smp authentication
(4) 配置SMP对接的第三方认证平台类型。
smp-platform type paraview
缺省情况下,未配置SMP对接的第三方认证平台类型。
(5) 配置SMP的主机名或IP地址。
server-host host-name
缺省情况下,未配SMP的主机名或IP地址。
(6) 配置SSL VPN网关与SMP建立连接时使用的密钥。
secret-key { cipher | simple } string
缺省情况下,未配置SSL VPN网关与SMP建立连接时使用的密钥。
(7) 配置SMP关联的VPN实例。
vpn-instance vpn-instance-name
缺省情况下,SMP属于公网。
URI形式的ACL用于对SSL VPN的各种接入方式进行更精细的控制。对URL进行匹配,符合要求的URL请求可以访问对应的资源。在SSL VPN访问实例视图下可以创建多个URI ACL,并且每个URI ACL下又可以配置多条URI ACL规则。若一个URI ACL中配置了多条URI ACL规则,则按照规则编号由小到大进行匹配。
URI ACL规则支持根据报文的协议类型、地址、域名、端口号和URL进行过滤,目前设备支持过滤的协议类型包括:HTTP、HTTPS、TCP、UDP、ICMP、IP。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 创建URI ACL,并进入URI ACL视图。
uri-acl uri-acl-name
(4) 创建URI ACL规则。
rule [ rule-id ] { deny | permit } uri uri-pattern-string
为了使用户能够通过Web接入方式访问企业内网资源,SSL VPN网关上需要创建Web接入服务资源。
Web接入方式可能会出现页面兼容性问题,建议使用IP接入方式。
Web接入服务配置任务如下:
(1) 配置URL列表
(3) (可选)配置改写策略
URL列表用于定义Web接入方式可访问的资源。每个URL表项对应一个企业网内的Web资源。当用户通过网关访问Web资源时,网关会对URL进行映射,以保证用户的正常访问。目前支持的映射方式有三种:常规改写、域名映射、端口映射。
以SSL VPN网关名gw(域名为https://www.gateway.example.com:4430,对应的IP地址为1.1.1.1),内网资源服务器URL=https://www.server.example.com:4430为例:
· 当不配置URL映射方式时(默认为常规改写),客户端访问内网资源服务器的URL显示为:https://www.gateway.example.com:4430/_proxy2/https/4430/www.server.example.com。
· 当配置域名映射,映射的域名为www.domain.example.com时,www.domain.example.com与内网资源https://www.server.example.com:4430为一一映射关系。客户端访问内网资源服务器的URL显示为:https://www.domain.example.com:4430。
· 当配置端口映射,又分为配置虚拟主机名和不配置虚拟主机名两种情况。
¡ 不配置虚拟主机名,引用SSL VPN网关gw2时,客户端访问内网资源服务器的URL显示为:https://2.2.2.2:4430(网关gw2的IP地址为2.2.2.2,端口号是4430)。
¡ 配置虚拟主机名,虚拟主机名为vhosta,vhosta与内网资源https://www.server.example.com:4430为一一映射关系。引用SSL VPN网关gw时,客户端访问内网资源服务器的URL显示为:https://vhosta:4430。
· 目前仅支持对HTML、XML、CSS和JavaScript类型的文件进行改写。
· 若在使用常规改写的过程中,出现URL映射遗漏和映射错误等问题,请使用域名映射或端口映射。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 创建URL表项,并进入URL表项视图。
url-item name
(4) 配置资源的URL。
url url
缺省情况下,未配置资源的URL。
如果URL中未指定协议类型,则默认为HTTP。
(5) (可选)开启URL伪装功能。
url-masking enable
缺省情况下,URL伪装功能处于关闭状态。
开启本功能后,该URL表项下所配置的Web资源URL将被转换成一定规则的编码字符串对SSL VPN用户呈现。
(6) (可选)引用过滤URL资源的URI ACL。
resources uri-acl uri-acl-name
缺省情况下,未引用过滤URL资源的URI ACL。
(7) (可选)配置URL资源的映射方式。
url-mapping { domain-mapping domain-name | port-mapping gateway gateway-name [ virtual-host virtual-host-name ] } [ rewrite-enable ]
缺省情况下,URL资源的映射方式为常规改写。
(8) 退回SSL VPN访问实例视图。
quit
(9) 创建URL列表,并进入URL列表视图。
url-list name
(10) (可选)配置URL列表标题。
heading string
缺省情况下,URL列表的标题为“Web”。
(11) 配置URL列表引用的URL表项。
resources url-item name
缺省情况下,URL列表未引用URL表项。
在SSL VPN策略组视图下引用URL列表。SSL VPN用户被授权某个策略组后,该策略组引用的URL列表指定的Web资源将同时授权给SSL VPN用户,SSL VPN用户可以访问这些Web资源。
SSL VPN网关可以通过高级ACL和URI ACL规则对SSL VPN用户的Web接入进行过滤,防止非法用户接入内部网络。配置SSL VPN访问控制策略后,设备对SSL VPN用户的Web接入按照如下原则过滤:
(1) 优先匹配被授权URL列表下的资源,成功匹配后用户可以访问授权资源。
(2) 若资源列表匹配失败时,则进行URI ACL的规则检查,成功匹配URI ACL中permit规则后用户的访问请求才允许通过。
(3) 若URI ACL匹配失败时,再进行高级ACL的检查,成功匹配规则后用户的访问请求才允许通过。
(4) 若高级ACL检查失败,则授权失败,用户不允许访问资源。
高级ACL支持根据接入请求报文的目的IP地址和目的端口号进行过滤;URI ACL支持根据接入请求报文的协议类型、地址、域名、端口号和URL进行过滤。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 创建SSL VPN策略组,并进入SSL VPN策略组视图。
policy-group group-name
(4) 配置策略组引用URL列表。
resources url-list url-list-name
缺省情况下,策略组没有引用任何URL列表。
(5) (可选)配置对Web接入进行过滤。
¡ 通过高级ACL方式进行过滤。
filter web-access [ ipv6 ] acl advanced-acl-number
¡ 通过URI ACL方式进行过滤。
filter web-access uri-acl uri-acl-name
缺省情况下,SSL VPN网关仅允许SSL VPN客户端访问被授权URL列表下的资源。
如果引用的ACL不存在,则SSL VPN网关拒绝所有SSL VPN客户端访问Web资源。
通过Web接入方式访问服务器资源时,管理员可以配置改写策略对网页文件进行匹配,进而改写匹配的网页文件。通过改写网页文件,管理员可以对发现的网页问题进行修复,方便维护和管理。
配置改写策略后,SSL VPN网关通过old-content命令配置的string对网页文件内容进行匹配,匹配成功之后,采用new-content命令配置的改写之后的文件内容对其进行替换。只有配置的url与网关正在处理的网页文件的URL相同时,才会根据文件策略中的配置对该网页文件内容进行改写。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 创建文件策略,并进入文件策略视图。
file-policy policy-name
(4) 配置文件策略应用的URL地址。
url url
(5) 配置改写的文件类型。
content-type { css | html | javascript | other }
缺省情况下,未配置文件改写类型,设备根据解析HTTP响应报文获得的文件类型对网页文件进行改写。
(6) 创建改写规则,并进入改写规则视图。
rewrite-rule rule-name
(7) 配置需要改写的文件内容。
old-content string
缺省情况下,未配置需要改写的文件内容。
(8) 配置改写之后的文件内容。
new-content string
缺省情况下,未配置改写之后的文件内容。
为了使用户能够通过TCP接入方式访问企业内网资源,SSL VPN网关上需要创建TCP接入服务资源。
TCP接入服务配置任务如下:
(1) 配置端口转发列表
端口转发表项用于定义端口转发实例和对应资源:
· 端口转发实例将企业网内的基于TCP的服务(如Telnet、SSH、POP3)映射为客户端上的本地地址和本地端口,以便客户端通过本地地址和本地端口访问企业网内的服务器。
· 配置对应的资源后,用户可以在Web页面上点击指定的转发表项访问服务器资源。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 创建端口转发表项,进入端口转发表项视图。
port-forward-item item-name
(4) 添加一个端口转发实例。
local-port local-port-number local-name local-name remote-server remote-server remote-port remote-port-number [ description text ]
(5) (可选)配置端口转发表项对应的资源。
execution script
(6) 退回SSL VPN访问实例视图。
quit
(7) 创建端口转发列表,并进入端口转发列表视图。
port-forward port-forward-name
(8) 配置端口转发列表引用端口转发表项。
resources port-forward-item item-name
缺省情况下,端口转发列表未引用任何端口转发表项
在SSL VPN策略组视图下引用端口转发列表。SSL VPN用户被授权某个策略组后,该策略组引用的端口转发列表指定的TCP接入服务将同时授权给SSL VPN用户,SSL VPN用户可以访问这些TCP接入服务。
SSL VPN网关可以通过高级ACL和URI ACL规则对SSL VPN用户的TCP接入进行过滤,防止非法用户接入内部网络。
配置SSL VPN访问控制策略后,设备对于PC版TCP客户端的过滤原则为:仅当成功匹配端口转发资源列表后用户可以访问授权资源,否则禁止所有客户端访问TCP接入资源;对于手机版TCP客户端的过滤原则为:
(1) 优先匹配端口转发资源列表,成功匹配后用户可以访问授权资源。
(2) 若端口转发资源列表匹配失败时,则进行URI ACL的规则检查,成功匹配URI ACL中permit规则后用户的访问请求才允许通过。
(3) 若URI ACL匹配失败时,再进行高级ACL的检查,成功匹配permit规则后用户的访问请求才允许通过。
(4) 若高级ACL检查失败,则授权失败,用户不允许访问资源。
高级ACL支持根据接入请求报文的目的IP地址和目的端口号进行过滤;URI ACL支持根据接入请求报文的协议类型、地址、域名、端口号和URL进行过滤。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 创建SSL VPN策略组,并进入SSL VPN策略组视图。
policy-group group-name
(4) 配置策略组引用端口转发列表。
resources port-forward port-forward-name
缺省情况下,策略组没有引用任何端口转发列表。
(5) (可选)配置对TCP接入进行过滤。
¡ 通过高级ACL方式进行过滤。
filter tcp-access [ ipv6 ] acl advanced-acl-number
¡ 通过URI ACL方式进行过滤。
filter tcp-access uri-acl uri-acl-name
缺省情况下,SSL VPN网关仅允许SSL VPN客户端访问端口转发列表下的资源。
如果引用的ACL不存在,则SSL VPN网关拒绝所有SSL VPN客户端访问TCP接入服务。
为了使内部服务器的应答报文正确返回给SSL VPN客户端,在内部服务器上需要配置到达SSL VPN客户端虚拟网卡所在网段的静态路由。
当设备上安装了多个安全业务板时,IP接入方式需要与NAT配合使用,确保同一条流量的正反向报文被引流到同一个安全业务板。
IP接入服务配置任务如下:
(2) 配置分配给IP接入用户的地址池
(5) (可选)配置SSL VPN用户绑定IP地址
(6) (可选)配置IP接入方式与NAT配合使用
(1) 进入系统视图。
system-view
(2) 创建SSL VPN AC接口,并进入SSL VPN AC接口视图。
interface sslvpn-ac interface-number
(3) 配置接口的IPv4地址。
ip address ip-address { mask | mask-length }
缺省情况下,没有指定接口的IPv4地址。
(4) 配置接口的IPv6地址。
ipv6 address { ipv6-address prefix-length | ipv6-address/ prefix-length }
缺省情况下,没有指定接口的IPv6地址。
(5) (可选)配置接口的期望带宽。
bandwidth bandwidth-value
缺省情况下,接口的期望带宽为64kbps。
期望带宽供业务模块使用,不会对接口实际带宽造成影响。
(6) (可选)配置当前接口的描述信息。
description text
缺省情况下,接口的描述信息为“接口名 Interface”,例如:SSLVPN-AC1000 Interface。
(7) (可选)配置接口的MTU值。
mtu size
缺省情况下,接口的MTU值为1500。
(8) 开启当前接口。
undo shutdown
缺省情况下,SSL VPN AC接口均处于开启状态。
接口下的某些配置恢复到缺省情况后,会对设备上当前运行的业务产生影响。建议您在执行本配置前,完全了解其对网络产生的影响。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN AC接口视图。
interface sslvpn-ac interface-number
(3) 恢复当前接口的缺省配置。
default
您可以在执行default命令后通过display this命令确认执行效果。对于未能成功恢复缺省的配置,建议您查阅相关功能的命令手册,手工执行恢复该配置缺省情况的命令。如果操作仍然不能成功,您可以通过设备的提示信息定位原因。
SSL VPN网关将从配置的IP地址池中为客户端软件的虚拟网卡分配IP地址。
地址池中配置的网段需要满足以下要求:
· 不能和客户端物理网卡的IP地址在同一个网段。
· 不能包含SSL VPN网关所在设备的接口地址,否则会导致地址冲突。
· 不能和欲访问的内网地址在同一个网段。
(1) 进入系统视图。
system-view
(2) 创建SSL VPN的IPv4地址池。
sslvpn ip address-pool pool-name start-ip-address end-ip-address
(3) 创建SSL VPN的IPv6地址池。
sslvpn ipv6 address-pool ipv6-pool-name start-ipv6-address end-ipv6-address
为SSL VPN访问实例引用地址池,在客户端通过验证后,SSL VPN网关会从该访问实例引用的地址池中选择IP地址分配给客户端。
在SSL VPN访问实例下还可以配置路由列表,为客户端分配路由表项。
通过IP方式成功登录SSL VPN网关后自动推送资源列表功能仅支持在Windows系统安装了iNode环境下使用,安装iNode客户端有如下两种方式:
· 通过浏览器登录SSL VPN网关后,下载并安装设备自带的iNode客户端。
· 安装官网下载的iNode客户端,这种方式下需要在定制iNode客户端时勾选“生成VPN网关iNode安装包”选项,否则会因为推送的Web页面无法检测iNode客户端是否已登录,而导致用户自动下线。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 配置IP接入引用的SSL VPN AC接口。
ip-tunnel interface sslvpn-ac interface-number
缺省情况下,IP接入未引用SSL VPN AC接口。
(4) 配置IPv4路由列表
a. 创建IPv4路由列表,并进入IPv4路由列表视图。
ip-route-list list-name
b. 在IPv4路由列表中添加IPv4路由。
include ip-address { mask | mask-length }
c. (可选)在IPv4路由列表中添加IPv4例外路由。
exclude ip-address { mask | mask-length }
d. 退回SSL VPN访问实例视图。
quit
(5) 配置IPv6路由列表
a. 创建IPv6路由列表,并进入IPv6路由列表视图。
ipv6-route-list ipv6-list-name
b. 在IPv6路由列表中添加IPv6路由。
include ipv6 ipv6-address prefix-length
c. (可选)在IPv6路由列表中添加IPv6例外路由。
exclude ipv6 ipv6-address prefix-length
d. 退回SSL VPN访问实例视图。
quit
(6) 配置IP接入引用IPv4地址池。
ip-tunnel address-pool pool-name mask { mask-length | mask }
缺省情况下,IP接入未引用IPv4地址池。
(7) 配置IP接入引用IPv6地址池。
ip-tunnel ipv6 address-pool ipv6-pool-name prefix prefix-length
缺省情况下,IP接入未引用IPv6地址池。
(8) (可选)配置保活报文的发送时间间隔。
ip-tunnel keepalive seconds
缺省情况下,保活报文的发送时间间隔为30秒。
(9) (可选)配置为客户端指定的内网DNS服务器IPv4地址。
ip-tunnel dns-server { primary | secondary } ip-address
缺省情况下,未配置为客户端指定的DNS服务器IPv4地址。
(10) (可选)配置为客户端指定的内网DNS服务器IPv6地址。
ip-tunnel ipv6 dns-server { primary | secondary } ipv6-address
缺省情况下,未配置为客户端指定的DNS服务器IPv6地址。
(11) (可选)配置为客户端指定的内网WINS服务器地址。
ip-tunnel wins-server { primary | secondary } ip-address
缺省情况下,未配置为客户端指定的WINS服务器地址。
(12) (可选)开启通过Web方式成功登录SSL VPN网关后自动启动IP客户端功能。
web-access ip-client auto-activate
缺省情况下,通过Web方式成功登录SSL VPN网关后自动启动IP客户端功能处于关闭状态。
(13) (可选)开启通过IP方式成功登录SSL VPN网关后自动推送资源列表功能。
ip-tunnel web-resource auto-push
缺省情况下,通过IP方式成功登录SSL VPN网关后自动推送资源列表功能处于关闭状态。
(14) (可选)开启IP接入方式的限速功能,并配置限速速率。
ip-tunnel rate-limit { downstream | upstream } { kbps | pps } value
缺省情况下,IP接入方式的限速功能处于关闭状态。
在SSL VPN策略组视图下需要配置下发给客户端的路由表项。AAA服务器或者自定义认证服务器将某个策略组授权给SSL VPN用户后,SSL VPN网关会将该策略组下配置的路由表项下发给客户端。下发的路由表项具有三种配置方法:
· 直接配置路由表项:用于将一条路由下发给客户端。
· 配置路由列表:用于将路由列表中的多条路由同时下发给客户端。
· 强制将客户端的流量转发给SSL VPN网关(指定force-all参数):SSL VPN网关在客户端上添加优先级最高的缺省路由,路由的出接口为虚拟网卡,从而使得所有没有匹配到路由表项的流量都通过虚拟网卡发送给SSL VPN网关。SSL VPN网关还会实时监控SSL VPN客户端,不允许SSL VPN客户端删除此缺省路由,且不允许SSL VPN客户端添加优先级高于此路由的缺省路由。
SSL VPN网关可以通过高级ACL和URI ACL规则对SSL VPN用户的IP接入进行过滤,防止非法用户接入内部网络。配置SSL VPN访问控制策略后,设备对IP接入按照如下原则过滤:
(1) 进行URI ACL的规则检查,成功匹配URI ACL中permit规则后用户的访问请求才允许通过。
(2) 若URI ACL匹配失败时,再进行高级ACL的检查,成功匹配规则后用户的访问请求才允许通过。
(3) 若高级ACL检查失败,则授权失败,用户不允许访问资源。
若URI ACL和高级ACL均未引用,则SSL VPN网关默认允许所有IP接入方式的访问。
高级ACL支持根据接入请求报文的目的IP地址和目的端口号、源IP地址和源端口号、协议类型、报文优先级、分片信息、TCP报文标识、ICMP报文的消息类型和消息码信息进行过滤;URI ACL支持根据接入请求报文的协议类型、地址、域名、端口号和URL进行过滤。
配置对IP接入进行URI ACL过滤时,URI ACL规则中请不要包含HTTP和HTTPS协议,否则配置后不生效。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 创建SSL VPN策略组,并进入SSL VPN策略组视图。
policy-group group-name
(4) 配置下发给客户端的IPv4路由表项。
ip-tunnel access-route { ip-address { mask-length | mask } | force-all | ip-route-list list-name }
缺省情况下,未指定下发给客户端的IPv4路由表项。
(5) 配置下发给客户端的IPv6路由表项。
ip-tunnel ipv6 access-route { ipv6-address prefix-length | ipv6-route-list ipv6-list-name }
缺省情况下,未指定下发给客户端的IPv6路由表项。
(6) 配置强制将客户端的IPv6流量转发给SSL VPN网关。
ip-tunnel ipv6 access-route force-all
缺省情况下,未配置强制将客户端的IPv6流量转发给SSL VPN网关。
(7) 配置对IP接入进行过滤。
¡ 通过高级ACL方式进行过滤。
filter ip-tunnel [ ipv6 ] acl advanced-acl-number
¡ 通过URI ACL方式进行过滤。
filter ip-tunnel uri-acl uri-acl-name
缺省情况下,SSL VPN网关允许SSL VPN客户端访问IP接入资源。
如果引用的ACL不存在,则SSL VPN网关拒绝所有IP接入方式的访问。
(8) (可选)配置策略组引用的IPv4地址池。
ip-tunnel address-pool pool-name mask { mask-length | mask }
缺省情况下,策略组下未引用IPv4地址池。
若引用的地址池不存在或无可用地址,分配失败,用户无法通过IP接入。若策略组未引用IPv4地址池,则SSL VPN网关将使用SSL VPN访问实例中引用的IPv4地址池为客户端分配IPv4地址。
(9) (可选)配置策略组引用的IPv6地址池。
ip-tunnel ipv6 address-pool ipv6-pool-name prefix prefix-length
缺省情况下,策略组下未引用IPv6地址池。
若引用的地址池不存在或无可用地址,分配失败,用户无法通过IP接入。若策略组未引用IPv6地址池,则SSL VPN网关将使用SSL VPN访问实例中引用的IPv6地址池为客户端分配IPv6地址。
客户端使用IP接入方式访问SSL VPN网关时,网关需要为客户端分配IP地址。通过配置本功能,可以保证同一个用户多次访问该网关时能使用固定范围的IP地址。本功能提供以下两种方式为SSL VPN用户绑定IP地址:
· 指定固定的地址范围:为用户绑定分配的IP地址列表,当网关从地址池中为客户端分配IP地址时,优先分配绑定的IP地址。
· 指定可分配的地址数目:网关也可以为客户端自动分配空闲的IP地址,即网关会从地址池中获取指定个数的空闲IP地址,为用户绑定。
当SSL VPN策略组中引用了地址池时,配置SSL VPN用户绑定的IP地址必须是此地址池中的IP地址。
当SSL VPN策略组中未引用地址池时,配置SSL VPN用户绑定的IP地址必须是此SSL VPN访问实例引用的地址池中的IP地址。
未关联VPN实例或在同一VPN实例中,不同SSL VPN用户不能绑定相同的IP地址。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 创建SSL VPN用户,并进入SSL VPN用户视图。
user username
(4) 配置SSL VPN用户绑定的IPv4地址。
ip-tunnel bind address { ip-address-list | auto-allocate number }
缺省情况下,SSL VPN用户未绑定IPv4地址
(5) 配置SSL VPN用户绑定的IPv6地址。
ip-tunnel ipv6 bind address { ipv6-address-list | auto-allocate number }
缺省情况下,SSL VPN用户未绑定IPv6地址。
当设备上安装了多个安全业务板时,IP接入方式需要与NAT配合使用,即在SSL VPN网关连接内网服务器的接口的出方向配置NAT功能对源地址进行转换。确保同一条流量的正反向报文被引流到同一个安全业务板。
如果不做源地址转换,则可能会出现同一条流量的正反向报文被引流到不同安全业务板的情况,从而影响SSL VPN业务的正常处理。具体原因如下:
当SSL VPN网关接收到用户访问内网资源的正向报文时,将使用报文的源IP地址(用户主机物理网卡的IP地址)进行Hash选板;当SSL VPN网关接收到此条流量的反向报文时,将使用报文的目的IP地址(用户主机虚拟网卡的IP地址)进行Hash选板。这种情况下可能会出现两次Hash选择的安全业务板不同。
通过在SSL VPN网关上配置NAT功能,NAT模块将会对SSL VPN网关与内网服务器之间的报文进行IP地址转换,并生成Openflow引流规则,确保同一条流量的正反向报文被引流到同一个安全业务板。
有关NAT的详细介绍,请参见“三层技术-IP业务配置指导”中的“NAT”。
在SSL VPN网关连接内网服务器的接口的出方向配置NAT功能对源地址进行转换。
NAT地址组中的地址建议与配置NAT功能的内网接口上的IP地址在同一网段。
需要对IP客户端(即虚拟网卡)的IP地址进行NAT源地址转换。
(1) 进入系统视图。
system-view
(2) 创建NAT地址组,并进入NAT地址组视图。
nat address-group group-id [ name group-name ]
(3) 添加地址组成员。
address start-address end-address
可通过多次执行本命令添加多个地址组成员。
当前地址组成员的IP地址段不能与该地址组中或者其它地址组中已有的地址成员组成员重叠。
(4) 退回系统视图。
quit
(5) 进入接口视图。
interface interface-type interface-number
(6) 配置出方向动态地址转换。
nat outbound [ ipv4-acl-number | name ipv4-acl-name ] address-group { group-id | name group-name } [ vpn-instance vpn-instance-name ] no-pat [ reversible ] [ rule rule-name ] [ priority priority ] [ disable ] [ counting ] [ description text ]
缺省情况下,不存在动态地址转换配置。
为移动客户端配置SSL VPN接入服务配置任务如下:
(1) 为移动客户端指定EMO服务器
(2) (可选)为移动客户端指定Message服务器
EMO服务器用来为移动客户端提供服务。执行本命令后,SSL VPN网关会将配置的EMO服务器信息下发给客户端,以便移动客户端通过EMO服务器获取可以访问的服务资源。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 配置为客户端指定的EMO服务器。
emo-server address { host-name | ipv4-address } port port-number
缺省情况下,未配置为客户端指定的EMO服务器。
Message服务器用来为移动客户端提供服务。执行本命令后,SSL VPN网关会将配置的Message服务器信息下发给客户端,以便客户端访问Message服务器。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 配置为客户端指定的Message服务器。
message-server address { host-name | ipv4-address } port port-number
缺省情况下,未配置为客户端指定的Message服务器。
当用户需要快速访问企业内网资源时,可以配置快捷方式,以便在SSL VPN网关的Web页面上增加访问内网资源的快捷方式,用户单击配置的快捷方式名称就能够访问对应的内网资源。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 创建快捷方式,并进入快捷方式视图。
shortcut shortcut-name
(4) (可选)配置快捷方式的描述信息。
description text
缺省情况下,设备上不存在配置描述信息。
(5) 配置快捷方式对应的资源。
execution script
缺省情况下,不存在快捷方式对应的资源。
(6) 退回SSL VPN访问实例视图。
quit
(7) 创建快捷方式列表,并进入快捷方式列表视图。
shortcut-list list-name
(8) 配置快捷方式列表引用快捷方式。
resources shortcut shortcut-name
缺省情况下,快捷方式列表未引用快捷方式。
(9) 退回SSL VPN访问实例视图。
quit
(10) 进入SSL VPN策略组视图。
policy-group group-name
(11) 配置策略组引用快捷方式列表。
resources shortcut-list list-name
缺省情况下,策略组未引用任何快捷方式列表。
缺省情况下用户登录SSL VPN网关后,进入的页面为SSL VPN资源页面。当用户需要实现登录SSL VPN网关后,SSL VPN资源页面重定向到指定页面,可以配置重定向资源,以便SSL VPN用户快速访问常用的内网资源。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 进入SSL VPN策略组视图。
policy-group group-name
(4) 配置用户登录SSL VPN网关后授权给用户的重定向资源。
redirect-resource { shortcut | url-item } resource-name
缺省情况下,用户登录SSL VPN网关后进入SSL VPN资源页面,不进行页面重定向。
缺省情况下,SSL VPN网关只允许用户以HTTPS方式登录访问,不允许用户以HTTP方式登录访问。配置HTTP重定向功能后,SSL VPN网关将监听指定的端口号,并把指定端口号的HTTP流量重定向到HTTPS服务监听的端口,向客户端发送重定向报文,让客户端重新以HTTPS方式登录。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN网关视图。
sslvpn gateway gateway-name
(3) 开启HTTP流量的重定向功能。
http-redirect [ port port-number ]
缺省情况下,未开启HTTP流量的重定向功能,SSL VPN网关不会处理HTTP流量。
远端接入用户访问SSL VPN访问实例时,如果AAA服务器没有为该用户授权策略组,则SSL VPN网关为用户下发缺省SSL VPN策略组,定义该用户可访问的资源。如果没有配置缺省SSL VPN策略组,则SSL VPN网关拒绝用户的接入请求。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 创建策略组,并进入SSL VPN策略组视图。
policy-group group-name
(4) 为策略组指定资源。
¡ 为SSL VPN策略组配置指定Web接入资源。
resources url-list url-list-name
缺省情况下,策略组没有引用任何URL列表。
¡ 为SSL VPN策略组配置指定TCP接入资源。
resources port-forward port-forward-name
缺省情况下,策略组没有引用任何端口转发列表。
¡ 为SSL VPN策略组配置指定IPv4接入资源。
ip-tunnel access-route { ip-address { mask-length | mask } | force-all | ip-route-list list-name }
缺省情况下,未指定下发给客户端的IPv4路由表项。
¡ 为SSL VPN策略组配置指定IPv6接入资源。
ip-tunnel ipv6 access-route { ipv6-address prefix-length | ipv6-route-list ipv6-list-name }
缺省情况下,未指定下发给客户端的IPv6路由表项。
¡ 配置强制将客户端的IPv6流量转发给SSL VPN网关。
ip-tunnel ipv6 access-route force-all
缺省情况下,未配置强制将客户端的IPv6流量转发给SSL VPN网关。
(5) (可选)配置对Web接入进行过滤。
¡ 通过高级ACL方式进行过滤。
filter web-access [ ipv6 ] acl advanced-acl-number
¡ 通过URI ACL方式进行过滤。
filter web-access uri-acl uri-acl-name
缺省情况下,SSL VPN网关仅允许SSL VPN客户端访问被授权URL列表下的资源。
如果引用的ACL不存在,则SSL VPN网关拒绝所有SSL VPN客户端访问Web资源。
(6) (可选)配置对TCP接入进行过滤。
¡ 通过高级ACL方式进行过滤。
filter tcp-access [ ipv6 ] acl advanced-acl-number
¡ 通过URI ACL方式进行过滤。
filter tcp-access uri-acl uri-acl-name
缺省情况下,SSL VPN网关仅允许SSL VPN客户端访问端口转发列表下的资源。
如果引用的ACL不存在,则SSL VPN网关拒绝所有SSL VPN客户端访问TCP接入服务。
(7) (可选)配置对IP接入进行过滤。
¡ 通过高级ACL方式进行过滤。
filter ip-tunnel [ ipv6 ] acl advanced-acl-number
¡ 通过URI ACL方式进行过滤。
filter ip-tunnel uri-acl uri-acl-name
缺省情况下,SSL VPN网关允许SSL VPN客户端访问IP接入资源。
如果引用的ACL不存在,则SSL VPN网关拒绝所有IP接入方式的访问。
(8) 退回SSL VPN访问实例视图。
quit
(9) 指定某个策略组为缺省策略组。
default-policy-group group-name
缺省情况下,没有指定缺省策略组。
SSL VPN支持基于角色对用户进行资源授权与访问控制,相同角色的用户具有相同的访问权限。角色是连接用户和资源的桥梁,可以将权限相同的用户加入某个角色,并在角色中引用资源,以及配置用户对资源的访问方式。
在角色中引用资源及配置用户对资源的访问方式的具体方法如下:
· 通过policy-group命令引用策略组,定义该角色可以访问的资源。
· 通过web-access enable、tcp-access enable、ip-tunnel enable命令分别配置该角色中的用户对资源的访问方式,包括Web接入方式、TCP接入方式和IP接入方式。
SSL VPN用户成功登录SSL VPN网关后,SSL VPN网关通过身份识别模块查询该用户所属的身份识别角色信息,并查询SSL VPN访问实例中是否存在该角色,若存在该角色,则将该角色所拥有的资源授权给用户访问,并限定用户对资源的访问方式。当某个用户属于多个角色时,SSL VPN将对该用户进行合并授权,即该用户所具有的资源访问权限是多个角色内资源的合集。
如果SSL VPN网关通过身份识别模块查询到的用户所属身份识别角色在SSL VPN访问实例中没有配置,或者用户所属的身份识别角色中未配置任何资源,用户将无法通过角色授权方式访问资源。此时,SSL VPN将采用原有流程对用户进行授权,即采用AAA模块为用户授权的SSL VPN策略组对用户进行授权。若AAA模块未返回任何策略组信息,则使用SSL VPN缺省策略组对用户进行授权。若SSL VPN访问实例未配置缺省策略组,则用户将无法访问资源。
有关身份识别角色的详细介绍,请参见“安全配置指导”中的“用户身份识别与管理”。
本功能配置的角色名称需要与身份识别模块配置的身份识别角色名称一一对应。
身份识别模块定义了名称为default的用户角色,即未指定角色的用户将默认属于default角色。SSL VPN访问实例中需要创建一个名称同为default的角色,在该角色中配置的资源将授权给没有指定角色的用户。
同一个用户最多可以通过角色被授权20个不同的策略组。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 创建角色,并进入角色视图。
role role-name
(4) 配置角色引用的策略组。
resources policy-group group-name
缺省情况下,角色未引用任何策略组。
(5) 开启角色的Web接入功能。
web-access enable
缺省情况下,角色的Web接入功能处于关闭状态。
(6) 开启角色的TCP接入功能。
tcp-access enable
缺省情况下,角色的TCP接入功能处于关闭状态。
(7) 开启角色的IP接入功能。
ip-tunnel enable
缺省情况下,角色的IP接入功能处于关闭状态。
通过将不同的SSL VPN访问实例与独立的VPN实例进行关联,可以实现以下功能:
· 资源隔离:不同SSL VPN访问实例内的服务器资源相互隔离,有效防止非法用户跨实例访问特定资源。
· 地址重叠支持:不同VPN实例可复用相同的地址空间,解决IP地址冲突问题。
· 访问限制:IP接入场景下,不同VPN实例间不支持互访,确保网络边界安全,避免未经授权的跨实例通信。
配置此功能前,请先进行如下配置:
· 创建VPN实例。
· SSL VPN网关设备连接企业网内部服务器的接口上绑定该VPN实例。
· 对于IP接入方式,还需要在SSL VPN访问实例引用的SSL VPN AC接口上绑定该VPN实例。
有关VPN实例的详细配置,请参见“VPN实例配置指导”中的“VPN实例”。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 配置SSL VPN访问实例关联的VPN实例。
vpn-instance vpn-instance-name
缺省情况下,SSL VPN访问实例关联公网。
指定SSL VPN网关所属的VPN实例后,只有属于同一个VPN的用户才可以访问SSL VPN网关,从而避免内部服务器资源泄漏到公网和其他VPN中。
配置此功能前,请先进行如下配置:
· 创建VPN实例。
· SSL VPN网关设备连接用户的接口上绑定该VPN实例。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN网关视图。
sslvpn gateway gateway-name
(3) 配置SSL VPN网关所属的VPN实例。
vpn-instance vpn-instance-name
缺省情况下,SSL VPN网关属于公网。
通过配置SSL VPN在线用户控制,可以控制SSL VPN登录用户的上下线和在线数量。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 强制在线用户下线。
force-logout [ all | session session-id | user user-name ]
(4) 配置每个用户名的同时最大在线数。
max-onlines number
缺省情况下,同一用户的同时最大在线数为32。
(5) 开启达到最大在线数再登录时强制下线功能。
force-logout max-onlines enable
缺省情况下,达到最大在线数再登录时强制下线功能处于关闭状态。
(6) 配置每个SSL VPN访问实例下单个SSL VPN会话的最大连接数。
session-connections number
缺省情况下,每个SSL VPN访问实例下单个SSL VPN会话的同时最大连接数为64。
本功能用于限制SSL VPN访问实例下SSL VPN会话的速率,超过此速率之后,此SSL VPN会话相应方向的报文将会被丢弃。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 开启SSL VPN会话的限速功能,并配置限速速率。
rate-limit { downstream | upstream } value
缺省情况下,SSL VPN会话的限速功能处于关闭状态。
SSL VPN防暴力破解功能指,通过限制同一IP地址尝试登录SSL VPN访问实例的次数,降低登录信息被暴力破解的风险。
当同一IP地址连续登录SSL VPN访问实例失败(即两次登录失败的间隔在45秒内)的次数达到SSL VPN网关管理员设置的限制次数时,SSL VPN访问实例将冻结该IP地址,在冻结期间内,禁止该IP地址再次登录此SSL VPN访问实例。当达到冻结时间后,被冻结的IP地址将自动解冻。如果想立即解冻被冻结的IP地址,可以执行prevent-cracking unfreeze-ip命令手工解冻。
SSL VPN防暴力破解功能的处理流程优先于AAA用户登录控制流程。当SSL VPN设置的登录失败次数阈值低于AAA的阈值时,若用户登录失败次数达到SSL VPN的阈值,用户将被SSL VPN锁定,此时AAA的失败计数将停止增加。用户必须通过SSL VPN防暴力破解功能解锁后,AAA的失败计数才能恢复正常。例如,若SSL VPN的失败次数阈值设置为3次,AAA的阈值设置为5次,当用户连续登录失败3次后,SSL VPN会锁定用户,后续登录失败不会增加AAA的失败计数(AAA的失败次数保持为3次)。只有在SSL VPN解锁用户后,AAA的失败计数才会重新开始。建议合理配置SSL VPN和AAA的失败次数阈值,确保两者功能协同生效。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 开启防暴力破解冻结IP地址功能。
prevent-cracking freeze-ip enable
缺省情况下,防暴力破解冻结IP地址功能处于关闭状态。
(4) (可选)设置防暴力破解冻结IP地址功能参数。
prevent-cracking freeze-ip login-failures login-failures freeze-time freeze-time
缺省情况下,允许同一IP地址连续登录访问实例失败的次数为64次,IP地址被冻结的时间为30秒。
(5) 开启防暴力破解验证码验证功能。
prevent-cracking verify-code enable
缺省情况下,防暴力破解验证码验证功能处于关闭状态。
(6) (可选)设置防暴力破解验证码验证功能参数。
prevent-cracking verify-code login-failures login-failures
缺省情况下,允许同一IP地址连续登录SSL VPN访问实例失败的次数为5次。
(7) (可选)手工解冻防暴力破解冻结的IP地址。
prevent-cracking unfreeze-ip { all | { ipv4 | ipv6 } ip-address }
单点登录指,SSL VPN用户只需要登录一次,即可访问所有相互信任的应用系统。SSL VPN网关管理员可以配置单点登录功能,使SSL VPN的Web接入用户可以不必输入登录内网服务器的用户名和密码,自动登录内网服务器。
设备支持两种单点登录方式:
· 自动构建登录请求方式:SSL VPN网关管理员通过抓包工具获取内网服务器的登录请求报文,并根据请求报文设置单点登录信息(HTTP请求方式、登录请求报文的编码方式、登录参数、登录参数取值的加密文件),自动构建登录请求。
自动构建登录请求方式的单点登录目前仅支持用于登录通过用户名密码认证的内网服务器。
· Basic认证方式:Basic认证是一种简单的HTTP认证方式,指客户端通过Web页面访问服务器时,如果服务器需要对客户端进行Basic认证,会弹出Basic认证对话框,要求客户端输入用户名和密码,服务器会根据输入的用户名和密码,判断客户端是否合法。Basic认证方式的单点登录是指,SSL VPN网关作为客户端自动添加用户名和密码(此用户名和密码可以是登录SSL VPN网关的用户名和密码,或者自定义的用户名和密码),模拟Basic认证方式实现单点登录。
Basic认证方式的单点登录仅用于登录支持Basic认证方式登录的内网服务器。
对于自动构建登录请求方式下的单点登录,有如下使用限制:
· 仅支持Web接入方式的单点登录。
· 选择用户组作为登录参数时,只支持远程用户。
· 只支持从SSL VPN资源页面单击URL链接时才会自动登录,不支持在地址栏或URL输入框中打开资源。
· 不支持登录需要图形校验码校验的页面。
· 不支持登录需要挑战码验证或调用脚本的页面。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 创建URL表项,并进入URL表项视图。
url-item name
(4) 配置资源的URL。
url url
缺省情况下,未配置资源的URL。
如果URL中未指定协议类型,则默认为HTTP。
(5) 开启自动构建登录请求方式下的单点登录功能。
sso method auto-build
缺省情况下,Web接入方式下的单点登录功能处于关闭状态。
(6) 配置自动构建登录请求方式下单点登录的HTTP请求方式。
sso auto-build request-method { get | post }
缺省情况下,自动构建登录请求方式下单点登录的HTTP请求方式为GET。
(7) 配置自动构建登录请求方式下单点登录的登录请求报文的编码方式。
sso auto-build code { gb18030 | utf-8 }
缺省情况下,自动构建登录请求方式下单点登录的登录请求报文的编码方式为UTF-8。
(8) 配置自动构建登录请求方式下单点登录的登录参数。
sso auto-build login-parameter { cert-fingerprint | cert-serial | cert-title | custom-password | custom-username | login-name | login-password | mobile-num | user-group } name parameter-name [ encrypt ]
缺省情况下,未配置自动构建登录请求方式下单点登录的登录参数。
(9) 配置自动构建登录请求方式下单点登录的自定义登录参数。
sso auto-build custom-login-parameter name parameter-name value value [ encrypt ]
缺省情况下,未配置自动构建登录请求方式下单点登录的自定义登录参数。
(10) 配置自动构建登录请求方式下单点登录的登录参数加密文件。
sso auto-build encrypt-file filename
缺省情况下,未配置自动构建登录请求方式下单点登录的登录参数加密文件。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 创建URL表项,并进入URL表项视图。
url-item name
(4) 配置资源的URL。
url url
缺省情况下,未配置资源的URL。
如果URL中未指定协议类型,则默认为HTTP。
(5) 开启Basic认证方式下的单点登录功能。
sso method basic
缺省情况下,Web接入方式下的单点登录功能处于关闭状态。
(6) (可选)使能Basic认证方式下单点登录使用自定义用户名和密码。
sso basic custom-username-password enable
缺省情况下,Basic认证方式的单点登录使用登录SSL VPN网关的用户名和密码。
企业微信客户端访问内网资源功能是指,设备从企业微信获取企业用户信息,并使用该信息对用户进行认证和授权,认证和授权成功后,用户将可以通过企业微信客户端直接访问内网资源。此功能对于企业用户而言是透明、无感知的。
如图1-11所示,企业微信客户端访问内网资源功能的工作机制如下:
(1) 企业用户通过单击企业微信客户端工作台中指定的应用,向微信开放平台发起访问企业内网资源的请求。
(2) 微信开放平台将访问流量重定向至SSL VPN网关(重定向链接需要管理员在企业微信管理平台配置),从而实现SSL VPN网关对企业内网资源的安全防护。
(3) 当SSL VPN网关收到重定向而来的报文后,SSL VPN网关向企业微信API(Application Programming Interface,应用程序接口)服务器请求用户的账号(userid)。
(4) 企业微信API服务器返回用户的账号(userid)。
(5) SSL VPN网关携带用户的userid,向企业微信API服务器进一步获取该用户所属的组织信息(此组织信息对应SSL VPN网关配置的策略组名称)。
(6) 企业微信API服务器返回该用户所属的组织信息。
(7) SSL VPN网关根据获取的用户信息,对用户进行认证,并授权其可以访问的资源。
(8) SSL VPN网关组装携带用户信息的登录参数,向内网服务器发起资源访问请求。
(9) 内网服务器将应答报文发送至SSL VPN网关。
(10) SSL VPN网关将内网服务器应答报文,转发至企业微信客户端。
设备缺省证书不支持企业微信客户端访问内网资源功能,请安装可信的SSL证书。若SSL VPN访问实例配置了企业微信客户端访问内网资源功能,则该访问实例仅支持通过直接访问网关方式关联SSL VPN网关。
在开始配置企业微信客户端访问内网资源功能之前,SSL VPN网关管理员需要在企业微信管理平台进行如下配置。
在企业微信管理平台配置重定向链接的步骤如下:
(1) 在浏览器中输入地址https://work.weixin.qq.com,使用企业微信客户端扫码登录企业微信管理平台,单击<应用管理>按钮,选择应用,进入应用页面。
(2) 在应用页面设置工作台应用主页重定向链接,链接的形式为:https://open.weixin.qq.com/connect/oauth2/authorize?appid=CORPID&redirect_uri=https://gateway.example.com:port/_proxywx/https/443/www.resources.example.com/?ctx=contextName&response_type=code&scope=snsapi_base&agentid=AGENTID&connect_redirect=1#wechat_redirect。
¡ CORPID为企业ID,企业ID在企业微信管理平台上的查看路径为:“我的企业”>“企业信息”。
¡ gateway.example.com:port为SSL VPN网关的域名及端口号。
¡ www.resources.example.com为企业内网资源的域名。
¡ contextName为用户使用的SSL VPN访问实例名称。
¡ AGENTID为企业应用的ID,企业应用ID在企业微信管理平台上的查看路径为:“应用管理”>“应用详情”>“Agentid”。
¡ https://gateway.example.com:port/_proxywx/https/443/www.resources.example.com/?ctx=contextName需要替换为URL编码格式。
在企业微信管理平台配置可信域名的步骤如下:
(1) 在浏览器中输入地址https://work.weixin.qq.com,使用企业微信客户端扫码登录企业微信管理平台,单击<应用管理>按钮,选择应用,进入应用页面。
(2) 在应用页面的“网页授权及JS-SDK”处,单击<申请域名校验>按钮,在可信域名输入框中输入SSL VPN网关的域名和端口gateway.example.com:port。
(3) 单击<申请校验域名>按钮,按照页面提示下载文件,并在SSL VPN网关Web网管页面的全局配置页面上传域名校验文件。
(4) 勾选“已上传域名归属校验文件”,单击<确定>按钮,完成域名校验。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 开启企业微信认证功能。
wechat-work-authentication enable
缺省情况下,企业微信认证功能处于关闭状态。
(4) 配置企业微信API服务器的URL地址。
wechat-work-authentication url url
缺省情况下,未配置企业微信API服务器的URL地址。
(5) 配置企业微信认证的超时时间。
wechat-work-authentication timeout seconds
缺省情况下,企业微信认证的超时时间为15秒。
(6) 配置企业微信认证使用的企业ID。
wechat-work-authentication corp-id corp-id
缺省情况下,未配置企业微信认证使用的企业ID。
(7) 配置企业微信认证中企业应用数据的访问密钥。
wechat-work-authentication app-secret app-secret
缺省情况下,未配置企业微信认证中企业应用数据的访问密钥。
(8) 配置SSL VPN网关登录内网服务器使用的企业微信userid字段名。
wechat-work-authentication userid-field userid-field
缺省情况下,未配置SSL VPN网关登录内网服务器使用的企业微信userid字段名。
(9) 配置企业微信授权策略组字段名。
wechat-work-authentication authorize-field authorize-field
缺省情况下,未配置企业微信授权策略组字段名。
(10) 配置微信开放平台的URL地址。
wechat-work-authentication open-platform-url { pre-defined | user-defined user-defined-url }
缺省情况下,未配置微信开放平台的URL地址。
当需要限制用户使用某些类型的接入客户端软件登录SSL VPN网关时,可通过配置本功能禁用该类型接入客户端软件。
浏览器被禁用后,已登录用户和新用户均无法使用浏览器登录SSL VPN网关;当浏览器解除禁用后,用户需要刷新登录页面重新登录。其他类型接入客户端软件被禁用后,仅对新登录用户生效,已登录用户不受影响。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 配置禁用的SSL VPN接入客户端软件类型。
access-deny-client { browser | mobile-inode | pc-inode } *
缺省情况下,不限制SSL VPN用户登录SSL VPN网关使用的接入客户端软件类型。
正常情况下,SSL VPN用户下载的IP接入客户端是存储在设备上的,但是对于一些存储空间较小的设备,无法在设备上部署IP接入客户端。
为了解决此问题,SSL VPN网关管理员可以通过本功能配置IP接入客户端的下载路径为官网或者自定义的URL地址。此时,设备既可以节省存储空间,同时SSL VPN用户也可以正常的下载IP接入客户端。设备支持配置Windows、Mac、Linux系统的IP接入客户端下载路径。
(1) 进入系统视图。
system-view
(2) 配置Windows、Mac、Linux系统的IP接入客户端下载路径。
sslvpn ip-client download-path { { common | kylin | uos } { linux-arm | linux-loongarch | linux-mips | linux-x86 } url url | mac url url | windows { local | official | url url } }
Mac、Linux系统的IP接入客户端下载路径为官网。
若在SSL VPN访问实例视图下设置了自定义页面模板,则SSL VPN访问实例视图下定制的页面信息不再生效。
管理员可以根据需要对SSL VPN页面进行定制。目前,支持的页面定制项包括:登录页面欢迎信息、登录页面是否显示密码输入框、页面标题、logo图标、登录页面和资源页面公告信息、资源页面供用户下载的资源文件、修改密码页面密码复杂度提示信息、改写服务器返回信息。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 配置SSL VPN登录页面的欢迎信息。
login-message { chinese chinese-message | english english-message }
缺省情况下,英文登录页面的欢迎信息为“Welcome to SSL VPN”,中文登录页面的欢迎信息为“欢迎进入SSL VPN”。
(4) 隐藏SSL VPN登录页面的密码输入框。
password-box hide
缺省情况下,SSL VPN登录页面显示密码输入框。
(5) 配置SSL VPN页面的标题信息。
title { chinese chinese-title | english english-title }
缺省情况下,SSL VPN页面的标题为“SSL VPN”。
(6) 配置SSL VPN页面上显示的logo。
logo { file file-name | none }
缺省情况下,SSL VPN页面上显示“H3C”logo图标。
(7) 配置登录页面和资源页面的公告信息。
notify-message { login-page | resource-page } { chinese chinese-message | english english-message }
缺省情况下,未配置公告消息。
(8) 配置资源页面供用户下载的资源文件。
resources-file { chinese chinese-filename | english english-filename }
缺省情况下,未配置供用户下载的资源文件。
(9) 配置修改密码页面的密码复杂度提示信息。
password-complexity-message { chinese chinese-message | english english-message }
缺省情况下,未配置密码复杂度提示信息。
(10) 改写服务器返回信息。
rewrite server-response-message server-response-message { chinese chinese-message | english english-message }
缺省情况下,SSL VPN网关不改写服务器返回信息。
SSL VPN页面模板起到限定SSL VPN网关登录页面和资源页面风格的作用。设备支持在系统视图与SSL VPN访问实例视图下分别设置SSL VPN页面模板,两种模板的作用域不同:
· 对于在系统视图下设置的SSL VPN页面模板,其作用域为所有SSL VPN访问实例。
· 对于在SSL VPN访问实例视图下设置的SSL VPN页面模板,其作用域为该SSL VPN访问实例。
若在系统视图与SSL VPN访问实例视图下同时设置了页面模板,SSL VPN访问实例视图下设置的页面模板生效。
在Web管理页面,上传自定义页面模板至设备的文件系统中。
(1) 进入系统视图。
system-view
(2) 设置SSL VPN全局页面模板。
sslvpn webpage-customize template-name
缺省情况下,SSL VPN全局页面模板为系统缺省模板。
(1) 进入系统视图。
system-view
(2) 进入SSL VPN访问实例视图。
sslvpn context context-name
(3) 设置SSL VPN页面模板。
webpage-customize template-name
缺省情况下,未设置SSL VPN页面模板。
开启SSL VPN日志记录功能后,SSL VPN网关会记录日志信息,并发送到设备的信息中心,通过设置信息中心的参数,决定日志信息的输出规则(即是否允许输出以及输出方向)。(有关信息中心参数的配置请参见“网络管理和监控配置指导”中的“信息中心”。)
(1) 进入系统视图。
system-view
(2) 开启SSL VPN全局日志生成功能。
sslvpn log enable
缺省情况下,SSL VPN全局日志生成功能处于关闭状态。
(3) 进入SSL VPN访问实例视图。
sslvpn context context-name
(4) 开启用户上下线日志生成功能。
log user-login enable
缺省情况下,用户上下线日志生成功能处于关闭状态。
(5) 开启用户资源访问日志生成功能。
log resource-access enable [ brief | filtering ] *
缺失情况下,用户访问资源日志生成功能处于关闭状态。
(6) 开启IP接入连接关闭的日志生成功能。
ip-tunnel log connection-close
缺省情况下,IP接入连接关闭的日志生成功能处于关闭状态。
(7) 开启IP接入丢包的日志生成功能。
ip-tunnel log packet-drop
缺省情况下,IP接入丢包的日志生成功能处于关闭状态。
(8) 开启IP接入客户端虚拟网卡IP地址分配和释放的日志生成功能。
ip-tunnel log address-alloc-release
缺省情况下,IP接入客户端虚拟网卡IP地址分配和释放的日志生成功能处于关闭状态。
在完成上述配置后,在任意视图下执行display命令可以显示SSL VPN的运行情况,通过查看显示信息验证配置的效果。
在用户视图下执行reset命令清除SSL VPN AC接口的统计信息。
非缺省vSystem不支持部分显示和维护命令,具体情况请见本特性的命令参考。
表1-1 SSL VPN显示和维护
|
操作 |
命令 |
|
显示SSL VPN AC接口的相关信息 |
display interface sslvpn-ac [ interface-number ] [ brief [ description | down ] ] |
|
显示SSL VPN访问实例的信息 |
display sslvpn context [ brief | name context-name [ { ip-route-list list-name | ipv6-route-list ipv6-list-name | policy-group group-name | port-forward port-forward-name | shortcut-list list-name | uri-acl uri-acl-name | url-list list | verbose } [ kernel ] [ slot slot-number ] ] ] display sslvpn context [ brief | name context-name [ { ip-route-list list-name | ipv6-route-list ipv6-list-name | policy-group group-name | port-forward port-forward-name | shortcut-list list-name | uri-acl uri-acl-name | url-list list | verbose } [ kernel ] [ chassis chassis-number slot slot-number ] ] ] |
|
显示SSL VPN网关的信息 |
display sslvpn gateway [ brief | name gateway-name ] display sslvpn gateway [ brief | name gateway-name [ verbose [ kernel ] [ slot slot-number ] ] ] display sslvpn gateway [ brief | name gateway-name [ verbose [ kernel ] [ chassis chassis-number slot slot-number ] ] ] |
|
显示指定IPv4地址池配置信息 |
display sslvpn ip address-pool [ pool-name ] [ slot slot-number ] display sslvpn ip address-pool [ pool-name ] [ chassis chassis-number slot slot-number ] |
|
显示指定IPv6地址池配置信息 |
display sslvpn ipv6 address-pool [ pool-name ] [ slot slot-number ] display sslvpn ipv6 address-pool [ pool-name ] [ chassis chassis-number slot slot-number ] |
|
显示指定SNAT地址池配置信息 |
display sslvpn snat-pool [ pool-name ] [ slot slot-number ] display sslvpn snat-pool [ pool-name ] [ chassis chassis-number slot slot-number ] |
|
显示通过IP接入的SSL VPN用户的报文统计信息 |
display sslvpn ip-tunnel statistics [ context context-name ] [ user user-name ] |
|
显示指定策略组的信息 |
display sslvpn policy-group group-name [ context context-name ] |
|
显示TCP端口转发的连接信息 |
display sslvpn port-forward connection [ context context-name ] [ chassis chassis-number slot slot-number ] |
|
显示被防暴力破解功能冻结的IP地址信息 |
display sslvpn prevent-cracking frozen-ip { statistics | table } [ context context-name ] |
|
显示SSL VPN会话信息 |
display sslvpn session [ context context-name ] [ user user-name | verbose ] |
|
显示SSL VPN页面模板信息 |
display sslvpn webpage-customize template |
|
清除SSL VPN AC接口的统计信息 |
reset counters interface [ sslvpn-ac [ interface-number ] ] |
|
清除通过IP接入的SSL VPN用户的报文统计信息 |
reset sslvpn ip-tunnel statistics [ context context-name [ session session-id ] ] |
Device为SSL VPN网关设备,连接公网用户和企业私有网络Network 1、Network 2。用户通过Device能够安全地访问位于Network 1内的Server A和Network 2内的Server B。其中,Server A和Server B均为Web服务器,Sever A使用HTTP协议和80端口号,Sever B使用HTTPS协议和443端口号;Device对用户进行本地认证和本地授权。
图1-12 Web接入组网图
表1-2 组网图示例接口与设备实际接口对应关系
|
组网图示例接口 |
设备实际接口 |
|
Interface1 |
GigabitEthernet1/2/5/1 |
|
Interface2 |
GigabitEthernet1/2/5/2 |
|
Interface3 |
GigabitEthernet1/2/5/3 |
在开始下面的配置之前,假设已完成如下配置:
Device已获取到CA证书ca.cer和服务器证书server.pfx,若SSL VPN网关不引用SSL服务端策略,则使用设备缺省证书。
(1) 配置接口IP地址
# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。
<Device> system-view
[Device] interface gigabitethernet 1/2/5/1
[Device-GigabitEthernet1/2/5/1] ip address 1.1.1.2 255.255.255.0
[Device-GigabitEthernet1/2/5/1] quit
请参考以上步骤配置其他接口的IP地址,具体配置步骤略。
(2) 配置静态路由
本举例仅以静态路由方式配置路由信息。实际组网中,请根据具体情况选择相应的路由配置方式。
# 请根据组网图中规划的信息,配置静态路由,本举例假设到达ServerA的下一跳IP地址为2.2.2.3,到达ServerB的下一跳IP地址为3.3.3.4,到达User的下一跳IP地址为1.1.1.3实际使用中请以具体组网情况为准,具体配置步骤如下。
[Device] ip route-static 20.2.2.2 24 2.2.2.3
[Device] ip route-static 30.3.3.3 24 3.3.3.4
[Device] ip route-static 40.1.1.1 24 1.1.1.3
(3) 配置接口加入安全域。
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[Device] security-zone name untrust
[Device-security-zone-Untrust] import interface gigabitethernet 1/2/5/1
[Device-security-zone-Untrust] quit
[Device] security-zone name trust
[Device-security-zone-Trust] import interface gigabitethernet 1/2/5/2
[Device-security-zone-Trust] import interface gigabitethernet 1/2/5/3
[Device-security-zone-Trust] quit
(4) 配置安全策略放行Untrust与Local安全域之间的流量,用于用户访问SSL VPN网关设备。
# 配置名称为sslvpnlocalout1的安全策略规则,使Device可以向用户发送报文,具体配置步骤如下。
[Device] security-policy ip
[Device-security-policy-ip] rule name sslvpnlocalout1
[Device-security-policy-ip-1-sslvpnlocalout1] source-zone local
[Device-security-policy-ip-1-sslvpnlocalout1] destination-zone untrust
[Device-security-policy-ip-1-sslvpnlocalout1] source-ip-host 1.1.1.2
[Device-security-policy-ip-1-sslvpnlocalout1] destination-ip-host 40.1.1.1
[Device-security-policy-ip-1-sslvpnlocalout1] action pass
[Device-security-policy-ip-1-sslvpnlocalout1] quit
# 配置名称为sslvpnlocalin1的安全策略规则,使用户可以向Device发送报文,具体配置步骤如下。
[Device-security-policy-ip] rule name sslvpnlocalin1
[Device-security-policy-ip-2-sslvpnlocalin1] source-zone untrust
[Device-security-policy-ip-2-sslvpnlocalin1] destination-zone local
[Device-security-policy-ip-2-sslvpnlocalin1] source-ip-host 40.1.1.1
[Device-security-policy-ip-2-sslvpnlocalin1] destination-ip-host 1.1.1.2
[Device-security-policy-ip-2-sslvpnlocalin1] action pass
[Device-security-policy-ip-2-sslvpnlocalin1] quit
# 配置名称为sslvpnlocalout2的安全策略规则,使Device可以向ServerA和Server B发送报文,具体配置步骤如下。
[Device-security-policy-ip] rule name sslvpnlocalout2
[Device-security-policy-ip-3-sslvpnlocalout2] source-zone local
[Device-security-policy-ip-3-sslvpnlocalout2] destination-zone trust
[Device-security-policy-ip-3-sslvpnlocalout2] source-ip-host 2.2.2.2
[Device-security-policy-ip-3-sslvpnlocalout2] source-ip-host 3.3.3.3
[Device-security-policy-ip-3-sslvpnlocalout2] destination-ip-host 20.2.2.2
[Device-security-policy-ip-3-sslvpnlocalout2] destination-ip-host 30.3.3.3
[Device-security-policy-ip-3-sslvpnlocalout2] action pass
[Device-security-policy-ip-3-sslvpnlocalout2] quit
# 配置名称为sslvpnlocalin2的安全策略规则,使ServerA和Server B可以向Device发送报文,具体配置步骤如下。
[Device-security-policy-ip] rule name sslvpnlocalin2
[Device-security-policy-ip-4-sslvpnlocalin2] source-zone trust
[Device-security-policy-ip-4-sslvpnlocalin2] destination-zone local
[Device-security-policy-ip-4-sslvpnlocalin2] source-ip-host 20.2.2.2
[Device-security-policy-ip-4-sslvpnlocalin2] source-ip-host 30.3.3.3
[Device-security-policy-ip-4-sslvpnlocalin2] destination-ip-host 2.2.2.2
[Device-security-policy-ip-4-sslvpnlocalin2] destination-ip-host 3.3.3.3
[Device-security-policy-ip-4-sslvpnlocalin2] action pass
[Device-security-policy-ip-4-sslvpnlocalin2] quit
[Device-security-policy-ip] quit
(5) 配置PKI域,设置证书申请所需的相关参数
[Device] pki domain sslvpn
[Device-pki-domain-sslvpn] public-key rsa general name sslvpn
[Device-pki-domain-sslvpn] undo crl check enable
[Device-pki-domain-sslvpn] quit
[Device] pki import domain sslvpn der ca filename ca.cer
[Device] pki import domain sslvpn p12 local filename server.pfx
(6) 配置SSL服务器端策略,引用PKI域
[Device] ssl server-policy ssl
[Device-ssl-server-policy-ssl] pki-domain sslvpn
[Device-ssl-server-policy-ssl] quit
(7) 配置SSL VPN网关,为用户提供登录SSL VPN网关的入口
# 配置SSL VPN网关gw的IP地址为1.1.1.2,端口号为2000,并引用SSL服务器端策略ssl。
[Device] sslvpn gateway gw
[Device-sslvpn-gateway-gw] ip address 1.1.1.2 port 2000
[Device-sslvpn-gateway-gw] ssl server-policy ssl
[Device-sslvpn-gateway-gw] service enable
[Device-sslvpn-gateway-gw] quit
(8) 配置SSL VPN访问实例,为用户提供SSL VPN Web接入服务
# 配置SSL VPN访问实例ctx1引用SSL VPN网关gw,指定域名为domain1。
[Device] sslvpn context ctx1
[Device-sslvpn-context-ctx1] gateway gw domain domain1
[Device-sslvpn-context-ctx1] url-item urlitem
[Device-sslvpn-context-ctx1-url-item-urlitem] url http://20.2.2.2
[Device-sslvpn-context-ctx1-url-item-urlitem] quit
[Device-sslvpn-context-ctx1] url-list urllist
[Device-sslvpn-context-ctx1-url-list-urllist] heading web
[Device-sslvpn-context-ctx1-url-list-urllist] resources url-item urlitem
[Device-sslvpn-context-ctx1-url-list-urllist] quit
[Device-sslvpn-context-ctx1] policy-group pgroup
[Device-sslvpn-context-ctx1-policy-group-pgroup] resources url-list urllist
[Device-sslvpn-context-ctx1-policy-group-pgroup] quit
[Device-sslvpn-context-ctx1] default-policy-group pgroup
[Device-sslvpn-context-ctx1] service enable
[Device-sslvpn-context-ctx1] quit
# 配置SSL VPN访问实例ctx2引用SSL VPN网关gw,指定域名为domain2。
[Device] sslvpn context ctx2
[Device-sslvpn-context-ctx2] gateway gw domain domain2
[Device-sslvpn-context-ctx2] url-item urlitem
[Device-sslvpn-context-ctx2-url-item-urlitem] url https://30.3.3.3
[Device-sslvpn-context-ctx2-url-item-urlitem] quit
[Device-sslvpn-context-ctx2] url-list urllist
[Device-sslvpn-context-ctx2-url-list-urllist] heading web
[Device-sslvpn-context-ctx2-url-list-urllist] resources url-item urlitem
[Device-sslvpn-context-ctx2-url-list-urllist] quit
[Device-sslvpn-context-ctx2] policy-group pgroup
[Device-sslvpn-context-ctx2-policy-group-pgroup] resources url-list urllist
[Device-sslvpn-context-ctx2-policy-group-pgroup] quit
[Device-sslvpn-context-ctx2] default-policy-group pgroup
[Device-sslvpn-context-ctx2] service enable
[Device-sslvpn-context-ctx2] quit
(9) 配置SSL VPN用户,用于接入SSL VPN网关
# 创建本地SSL VPN用户sslvpn,密码为123456,用户角色为network-operator,授权用户的SSL VPN策略组为pgroup。
[Device] local-user sslvpn class network
[Device-luser-network-sslvpn] password simple 123456
[Device-luser-network-sslvpn] service-type sslvpn
[Device-luser-network-sslvpn] authorization-attribute user-role network-operator
[Device-luser-network-sslvpn] authorization-attribute sslvpn-policy-group pgroup
[Device-luser-network-sslvpn] quit
# 在Device上查看SSL VPN网关状态,可见SSL VPN网关gw处于Up状态。
[Device] display sslvpn gateway
Gateway name: gw
Operation state: Up
IP: 1.1.1.2 Port: 2000
SSL server policy configured: ssl
SSL server policy in use: ssl
Front VPN instance: Not configured
# 在Device上查看SSL VPN访问实例状态,可见SSL VPN访问实例ctx1和ctx2均处于Up状态。
[Device] display sslvpn context
Context name: ctx1
Operation state: Up
AAA domain: Not specified
Certificate authentication: Disabled
Password authentication:Enabled
Authentication use: All
SMS auth type: Not configured
Urlmasking: Disabled
Code verification: Disabled
Default policy group: pgroup
Associated SSL VPN gateway: gw
Domain name: domain1
SSL client policy configured: ssl
SSL client policy in use: ssl
Maximum users allowed: 1048575
VPN instance: Not configured
Idle timeout: 30 min
Authentication server-type: aaa
Password changing: Enabled
Context name: ctx2
Operation state: Up
AAA domain: Not specified
Certificate authentication: Disabled
Password authentication:Enabled
Authentication use: All
SMS auth type: Not configured
Urlmasking: Disabled
Code verification: Disabled
Default policy group: pgroup
Associated SSL VPN gateway: gw
Domain name: domain2
SSL client policy configured: ssl
SSL client policy in use: ssl
Maximum users allowed: 1048575
VPN instance: Not configured
Idle timeout: 30 min
Authentication server-type: aaa
Password changing: Enabled
# 用户在PC浏览器上输入https://1.1.1.2:2000/,进入Domain List页面。
图1-13 Domain List页面
# 用户选择domain1进入登录页面,输入用户sslvpn和密码123456,单击<登录>按钮,可以成功登录。
图1-14 登录页面
# 用户登录成功后,在Device上可以看到用户会话信息。
[Device] display sslvpn session context ctx1
SSL VPN context: ctx1
Users: 1
Username Connections Idle time Created User IP
sslvpn 6 0/00:12:05 0/00:04:14 40.1.1.1
# 网关首页的“书签”栏显示用户可以访问的远端web资源。
图1-15 网关首页
# 点击serverA,可以进入Web服务器Server A的HTTP网站首页面,且在浏览器的地址栏中显示如下格式的URL:https://1.1.1.2:2000/_proxy2/http/80/20.2.2.2/。
# 用户退出登录,重启浏览器,重新输入https://1.1.1.2:2000/,选择domain2进入登录页面,输入用户名sslvpn和密码123456,可以登录成功。
# 用户登录成功后,在Device上可以看到用户会话信息。
[Device] display sslvpn session context ctx2
SSL VPN context: ctx2
Users: 1
Username Connections Idle time Created User IP
sslvpn 6 0/00:02:05 0/00:01:11 40.1.1.1
# 网关首页的“书签”栏显示用户可以访问的远端web资源。
图1-16 网关首页
# 点击serverB,可以进入Web服务器Server B的HTTPS网站页面,且在浏览器的地址栏中显示如下格式的URL:https://1.1.1.2:2000/_proxy2/https/443/30.3.3.3/。
Device为SSL VPN网关设备,连接公网用户和企业私有网络。用户通过Device可以安全地访问私有网络内的Telnet服务器Server。Device采用本地认证和授权方式对用户进行认证和授权。
图1-17 TCP接入配置组网图
表1-3 组网图示例接口与设备实际接口对应关系
|
组网图示例接口 |
设备实际接口 |
|
Interface1 |
GigabitEthernet1/2/5/1 |
|
Interface2 |
GigabitEthernet1/2/5/2 |
在开始下面的配置之前,假设已完成如下配置:
· Device已获取到CA证书ca.cer和服务器证书server.pfx,若SSL VPN网关不引用SSL服务端策略,则使用设备缺省证书。
· SSL VPN用户主机上需要安装Java运行环境。
(1) 配置接口IP地址
# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。
<Device> system-view
[Device] interface gigabitethernet 1/2/5/1
[Device-GigabitEthernet1/2/5/1] ip address 1.1.1.2 255.255.255.0
[Device-GigabitEthernet1/2/5/1] quit
请参考以上步骤配置其他接口的IP地址,具体配置步骤略。
(2) 配置静态路由
本举例仅以静态路由方式配置路由信息。实际组网中,请根据具体情况选择相应的路由配置方式。
# 请根据组网图中规划的信息,配置静态路由,本举例假设到达Server的下一跳IP地址为2.2.2.3,到达User的下一跳IP地址为1.1.1.3实际使用中请以具体组网情况为准,具体配置步骤如下。
[Device] ip route-static 20.2.2.2 24 2.2.2.3
[Device] ip route-static 40.1.1.1 24 1.1.1.3
(3) 配置接口加入安全域。
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[Device] security-zone name untrust
[Device-security-zone-Untrust] import interface gigabitethernet 1/2/5/1
[Device-security-zone-Untrust] quit
[Device] security-zone name trust
[Device-security-zone-Trust] import interface gigabitethernet 1/2/5/2
[Device-security-zone-Trust] quit
(4) 配置安全策略放行Untrust与Local安全域之间的流量,用于用户访问SSL VPN网关设备。
# 配置名称为sslvpnlocalout1的安全策略规则,使Device可以向用户发送SSL VPN报文,具体配置步骤如下。
[Device] security-policy ip
[Device-security-policy-ip] rule name sslvpnlocalout1
[Device-security-policy-ip-1-sslvpnlocalout1] source-zone local
[Device-security-policy-ip-1-sslvpnlocalout1] destination-zone untrust
[Device-security-policy-ip-1-sslvpnlocalout1] source-ip-host 1.1.1.2
[Device-security-policy-ip-1-sslvpnlocalout1] destination-ip-host 40.1.1.1
[Device-security-policy-ip-1-sslvpnlocalout1] action pass
[Device-security-policy-ip-1-sslvpnlocalout1] quit
# 配置名称为sslvpnlocalin1的安全策略规则,使用户可以向Device发送报文,具体配置步骤如下。
[Device-security-policy-ip] rule name sslvpnlocalin1
[Device-security-policy-ip-2-sslvpnlocalin1] source-zone untrust
[Device-security-policy-ip-2-sslvpnlocalin1] destination-zone local
[Device-security-policy-ip-2-sslvpnlocalin1] source-ip-host 40.1.1.1
[Device-security-policy-ip-2-sslvpnlocalin1] destination-ip-host 1.1.1.2
[Device-security-policy-ip-2-sslvpnlocalin1] action pass
[Device-security-policy-ip-2-sslvpnlocalin1] quit
# 配置名称为sslvpnlocalout2的安全策略规则,使Device可以向Server发送报文,具体配置步骤如下。
[Device-security-policy-ip] rule name sslvpnlocalout2
[Device-security-policy-ip-3-sslvpnlocalout2] source-zone local
[Device-security-policy-ip-3-sslvpnlocalout2] destination-zone trust
[Device-security-policy-ip-3-sslvpnlocalout2] source-ip-host 2.2.2.2
[Device-security-policy-ip-3-sslvpnlocalout2] destination-ip-host 20.2.2.2
[Device-security-policy-ip-3-sslvpnlocalout2] action pass
[Device-security-policy-ip-3-sslvpnlocalout2] quit
# 配置名称为sslvpnlocalin2的安全策略规则,使Server可以向Device发送报文,具体配置步骤如下。
[Device-security-policy-ip] rule name sslvpnlocalin2
[Device-security-policy-ip-4-sslvpnlocalin2] source-zone trust
[Device-security-policy-ip-4-sslvpnlocalin2] destination-zone local
[Device-security-policy-ip-4-sslvpnlocalin2] source-ip-host 20.2.2.2
[Device-security-policy-ip-4-sslvpnlocalin2] destination-ip-host 2.2.2.2
[Device-security-policy-ip-4-sslvpnlocalin2] action pass
[Device-security-policy-ip-4-sslvpnlocalin2] quit
[Device-security-policy-ip] quit
(5) 配置PKI域,设置证书申请所需的相关参数
[Device] pki domain sslvpn
[Device-pki-domain-sslvpn] public-key rsa general name sslvpn
[Device-pki-domain-sslvpn] undo crl check enable
[Device-pki-domain-sslvpn] quit
[Device] pki import domain sslvpn der ca filename ca.cer
[Device] pki import domain sslvpn p12 local filename server.pfx
(6) 配置SSL服务器端策略,引用PKI域
[Device] ssl server-policy ssl
[Device-ssl-server-policy-ssl] pki-domain sslvpn
[Device-ssl-server-policy-ssl] quit
(7) 配置SSL VPN网关,为用户提供登录SSL VPN网关的入口
# 配置SSL VPN网关gw的IP地址为1.1.1.2,端口号为2000,并引用SSL服务器端策略ssl。
[Device] sslvpn gateway gw
[Device-sslvpn-gateway-gw] ip address 1.1.1.2 port 2000
[Device-sslvpn-gateway-gw] ssl server-policy ssl
[Device-sslvpn-gateway-gw] service enable
[Device-sslvpn-gateway-gw] quit
(8) 配置SSL VPN访问实例,为用户提供SSL VPN TCP接入服务
# 配置SSL VPN访问实例ctx引用SSL VPN网关gw。
[Device] sslvpn context ctx
[Device-sslvpn-context-ctx] gateway gw
[Device-sslvpn-context-ctx] port-forward-item pfitem1
[Device-sslvpn-context-ctx-port-forward-item-pfitem1] local-port 2323 local-name 127.0.0.1 remote-server 20.2.2.2 remote-port 23 description telnet
[Device-sslvpn-context-ctx-port-forward-item-pfitem1] quit
[Device-sslvpn-context-ctx] port-forward plist
[Device-sslvpn-context-ctx-port-forward-plist] resources port-forward-item pfitem1
[Device-sslvpn-context-ctx-port-forward-plist] quit
[Device-sslvpn-context-ctx] policy-group pgroup
[Device-sslvpn-context-ctx-policy-group-pgroup] resources port-forward plist
[Device-sslvpn-context-ctx-policy-group-pgroup] quit
[Device-sslvpn-context-ctx] service enable
[Device-sslvpn-context-ctx] quit
(9) 配置SSL VPN用户,用于访问SSL VPN网关
# 创建本地SSL VPN用户sslvpn,密码为123456,用户角色为network-operator,授权用户的SSL VPN策略组为pgroup。
[Device] local-user sslvpn class network
[Device-luser-network-sslvpn] password simple 123456
[Device-luser-network-sslvpn] service-type sslvpn
[Device-luser-network-sslvpn] authorization-attribute user-role network-operator
[Device-luser-network-sslvpn] authorization-attribute sslvpn-policy-group pgroup
[Device-luser-network-sslvpn] quit
# 在Device上查看SSL VPN网关状态,可见SSL VPN网关gw处于Up状态。
[Device] display sslvpn gateway
Gateway name: gw
Operation state: Up
IP: 1.1.1.2 Port: 2000
SSL server policy configured: ssl
SSL server policy in use: ssl
Front VPN instance: Not configured
# 在Device上查看SSL VPN访问实例状态,可见SSL VPN访问实例ctx处于Up状态。
[Device] display sslvpn context
Context name: ctx
Operation state: Up
AAA domain: Not specified
Certificate authentication: Disabled
Password authentication:Enabled
Authentication use: All
SMS auth type: Not configured
Urlmasking: Disabled
Code verification: Disabled
Default policy group: Not configured
Associated SSL VPN gateway: gw
SSL client policy configured: ssl
SSL client policy in use: ssl
Maximum users allowed: 1048575
VPN instance: Not configured
Idle timeout: 30 min
Authentication server-type: aaa
Password changing: Enabled
# 用户在PC浏览器上输入https://1.1.1.2:2000/,进入登录页面后,输入用户名sslvpn和密码123456,用户可以成功登录。
图1-18 登录页面
# 用户登录成功后,在网页的应用程序栏中选择“启动TCP客户端应用程序”。
不能通过双击的方式打开对应的TCP应用程序。
# 用户在PC上执行telnet 127.0.0.1 2323,可以远程连接到Server,显示信息略。
# 在Device上可以看到用户会话信息。
[Device] display sslvpn session context ctx
SSL VPN context: ctx
Users: 1
Username Connections Idle time Created User IP
sslvpn 6 0/00:12:05 0/00:04:14 40.1.1.1
# 在Device上可以看到TCP端口转发的连接信息。
[Device] display sslvpn port-forward connection
SSL VPN context : ctx
Client address : 40.1.1.1
Client port : 50788
Server address : 20.2.2.2
Server port : 23
State : Connected
Device为SSL VPN网关设备,连接公网用户和企业私有网络。用户通过Device可以通过IP
接入方式安全地访问私有网络内的Server。Device采用本地认证和授权方式对用户进行认证和授权。
图1-19 IP接入配置组网图
表1-4 组网图示例接口与设备实际接口对应关系
|
组网图示例接口 |
设备实际接口 |
|
Interface1 |
GigabitEthernet1/2/5/1 |
|
Interface2 |
GigabitEthernet1/2/5/2 |
在开始下面的配置之前,假设已完成如下配置:
· Device已获取到CA证书ca.cer和服务器证书server.pfx,若SSL VPN网关不引用SSL 服务端策略,则使用设备缺省证书。
· Server上存在到达网段10.1.1.0/24的路由。
(1) 配置接口IP地址
# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。
<Device> system-view
[Device] interface gigabitethernet 1/2/5/1
[Device-GigabitEthernet1/2/5/1] ip address 1.1.1.2 255.255.255.0
[Device-GigabitEthernet1/2/5/1] quit
请参考以上步骤配置其他接口的IP地址,具体配置步骤略。
(2) 创建SSL VPN AC接口,用于转发IP接入流量
# 创建SSL VPN AC接口1,配置该接口的IP地址为10.1.1.100/24。
[Device] interface sslvpn-ac 1
[Device-SSLVPN-AC1] ip address 10.1.1.100 24
[Device-SSLVPN-AC1] quit
(3) 配置静态路由
本举例仅以静态路由方式配置路由信息。实际组网中,请根据具体情况选择相应的路由配置方式。
# 请根据组网图中规划的信息,配置静态路由,本举例假设到达Server的下一跳IP地址为2.2.2.3,到达User的下一跳IP地址为1.1.1.3实际使用中请以具体组网情况为准,具体配置步骤如下。
[Device] ip route-static 20.2.2.2 24 2.2.2.3
[Device] ip route-static 40.1.1.1 24 1.1.1.3
(4) 配置接口加入安全域
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[Device] security-zone name untrust
[Device-security-zone-Untrust] import interface gigabitethernet 1/2/5/1
[Device-security-zone-Untrust] import interface sslvpn-ac 1
[Device-security-zone-Untrust] quit
[Device] security-zone name trust
[Device-security-zone-Trust] import interface gigabitethernet 1/2/5/2
[Device-security-zone-Trust] quit
(5) 配置安全策略放行Untrust与Local安全域、Untrust与Trust安全域之间的流量,用于用户访问SSL VPN网关设备和Server
# 配置名称为sslvpnlocalout1的安全策略规则,使Device可以向用户发送报文,具体配置步骤如下。
[Device] security-policy ip
[Device-security-policy-ip] rule name sslvpnlocalout1
[Device-security-policy-ip-1-sslvpnlocalout1] source-zone local
[Device-security-policy-ip-1-sslvpnlocalout1] destination-zone untrust
[Device-security-policy-ip-1-sslvpnlocalout1] source-ip-host 1.1.1.2
[Device-security-policy-ip-1-sslvpnlocalout1] destination-ip-host 40.1.1.1
[Device-security-policy-ip-1-sslvpnlocalout1] action pass
[Device-security-policy-ip-1-sslvpnlocalout1] quit
# 配置名称为sslvpnlocalin1的安全策略规则,使用户可以向Device发送报文,具体配置步骤如下。
[Device-security-policy-ip] rule name sslvpnlocalin1
[Device-security-policy-ip-2-sslvpnlocalin1] source-zone untrust
[Device-security-policy-ip-2-sslvpnlocalin1] destination-zone local
[Device-security-policy-ip-2-sslvpnlocalin1] source-ip-host 40.1.1.1
[Device-security-policy-ip-2-sslvpnlocalin1] destination-ip-host 1.1.1.2
[Device-security-policy-ip-2-sslvpnlocalin1] action pass
[Device-security-policy-ip-2-sslvpnlocalin1] quit
# 配置名称为sslvpnlocalout2的安全策略规则,使Device可以向Server发送报文,具体配置步骤如下。
[Device-security-policy-ip] rule name sslvpnlocalout2
[Device-security-policy-ip-3-sslvpnlocalout2] source-zone local
[Device-security-policy-ip-3-sslvpnlocalout2] destination-zone trust
[Device-security-policy-ip-3-sslvpnlocalout2] source-ip-host 2.2.2.2
[Device-security-policy-ip-3-sslvpnlocalout2] destination-ip-host 20.2.2.2
[Device-security-policy-ip-3-sslvpnlocalout2] action pass
[Device-security-policy-ip-3-sslvpnlocalout2] quit
# 配置名称为sslvpnlocalin2的安全策略规则,使Server可以向Device发送报文,具体配置步骤如下。
[Device-security-policy-ip] rule name sslvpnlocalin2
[Device-security-policy-ip-4-sslvpnlocalin2] source-zone trust
[Device-security-policy-ip-4-sslvpnlocalin2] destination-zone local
[Device-security-policy-ip-4-sslvpnlocalin2] source-ip-host 20.2.2.2
[Device-security-policy-ip-4-sslvpnlocalin2] destination-ip-host 2.2.2.2
[Device-security-policy-ip-4-sslvpnlocalin2] action pass
[Device-security-policy-ip-4-sslvpnlocalin2] quit
# 配置名称为untrust-trust的安全策略规则,使用户可以通过SSL VPN AC接口访问Server,具体配置步骤如下。
[Device-security-policy-ip] rule name untrust-trust
[Device-security-policy-ip-5-untrust-trust] source-zone untrust
[Device-security-policy-ip-5-untrust-trust] destination-zone trust
[Device-security-policy-ip-5-untrust-trust] source-ip-subnet 10.1.1.0 24
[Device-security-policy-ip-5-untrust-trust] destination-ip-host 20.2.2.2
[Device-security-policy-ip-5-untrust-trust] action pass
[Device-security-policy-ip-5-untrust-trust] quit
# 配置名称为trust-untrust的安全策略规则,使Server可以通过SSL VPN AC接口向用户发送报文,具体配置步骤如下。
[Device-security-policy-ip] rule name trust-untrust
[Device-security-policy-ip-6-trust-untrust] source-zone trust
[Device-security-policy-ip-6-trust-untrust] destination-zone untrust
[Device-security-policy-ip-6-trust-untrust] source-ip-host 20.2.2.2
[Device-security-policy-ip-6-trust-untrust] destination-ip-subnet 10.1.1.0 24
[Device-security-policy-ip-6-trust-untrust] action pass
[Device-security-policy-ip-6-trust-untrust] quit
[Device-security-policy-ip] quit
(6) 创建ACL,用于对IP接入流量进行过滤
[Device] acl advanced 3000
[Device-acl-ipv4-adv-3000] rule permit ip source 10.1.1.0 0.0.0.255 destination 20.2.2.0 0.0.0.255
[Device-acl-ipv4-adv-3000] quit
(7) 配置PKI域,设置证书申请所需的相关参数
[Device] pki domain sslvpn
[Device-pki-domain-sslvpn] public-key rsa general name sslvpn
[Device-pki-domain-sslvpn] undo crl check enable
[Device-pki-domain-sslvpn] quit
[Device] pki import domain sslvpn der ca filename ca.cer
[Device] pki import domain sslvpn p12 local filename server.pfx
(8) 配置SSL服务器端策略,引用PKI域
[Device] ssl server-policy ssl
[Device-ssl-server-policy-ssl] pki-domain sslvpn
[Device-ssl-server-policy-ssl] quit
(9) 配置SSL VPN网关,为用户提供登录SSL VPN网关的入口
# 配置SSL VPN网关gw的IP地址为1.1.1.2,端口号为4430,并引用SSL服务器端策略ssl。
<Device> system-view
[Device] sslvpn gateway gw
[Device-sslvpn-gateway-gw] ip address 1.1.1.2 port 4430
[Device-sslvpn-gateway-gw] ssl server-policy ssl
[Device-sslvpn-gateway-gw] service enable
[Device-sslvpn-gateway-gw] quit
(10) 创建SSL VPN客户端地址池,用于为IP接入客户端分配IP地址
# 创建为SSL VPN客户端分配地址的地址池sslvpnpool,地址范围为10.1.1.1~10.1.1.10。
[Device] sslvpn ip address-pool sslvpnpool 10.1.1.1 10.1.1.10
(11) 配置SSL VPN访问实例,为用户提供SSL VPN IP接入服务
# 配置SSL VPN访问实例ctxip,引用SSL VPN网关gw,指定域名为domainip。
[Device] sslvpn context ctxip
[Device-sslvpn-context-ctxip] gateway gw domain domainip
[Device-sslvpn-context-ctxip] ip-tunnel interface sslvpn-ac 1
[Device-sslvpn-context-ctxip] ip-route-list rtlist
[Device-sslvpn-context-ctxip-route-list-rtlist] include 20.2.2.0 24
[Device-sslvpn-context-ctxip-route-list-rtlist] quit
[Device-sslvpn-context-ctxip] ip-tunnel address-pool sslvpnpool mask 24
[Device-sslvpn-context-ctxip] policy-group resourcegrp
[Device-sslvpn-context-ctxip-policy-group-resourcegrp] ip-tunnel access-route ip-route-list rtlist
[Device-sslvpn-context-ctxip-policy-group-resourcegrp] filter ip-tunnel acl 3000
[Device-sslvpn-context-ctxip-policy-group-resourcegrp] quit
[Device-sslvpn-context-ctxip] service enable
[Device-sslvpn-context-ctxip] quit
(12) 配置SSL VPN用户,用于访问SSL VPN网关
# 创建本地SSL VPN用户sslvpnuser,密码为123456,用户角色为network-operator,授权用户的SSL VPN策略组为resourcegrp。
[Device] local-user sslvpnuser class network
[Device-luser-network-sslvpnuser] password simple 123456
[Device-luser-network-sslvpnuser] service-type sslvpn
[Device-luser-network-sslvpnuser] authorization-attribute sslvpn-policy-group resourcegrp
[Device-luser-network-sslvpnuser] authorization-attribute user-role network-operator
[Device-luser-network-sslvpnuser] quit
# 在Device上查看SSL VPN网关状态,可见SSL VPN网关gw处于Up状态。
[Device] display sslvpn gateway
Gateway name: gw
Operation state: Up
IP: 1.1.1.2 Port: 4430
Front VPN instance: Not configured
# 在Device上查看SSL VPN访问实例状态,可见SSL VPN访问实例ctx处于Up状态。
[Device] display sslvpn context
Context name: ctxip
Operation state: Up
AAA domain: Not specified
Certificate authentication: Disabled
Password authentication: Enabled
Authentication use: All
SMS auth type: Not configured
Urlmasking: Disabled
Code verification: Disabled
Default policy group: Not configured
Associated SSL VPN gateway: gw
Domain name: domainip
Maximum users allowed: 1048575
VPN instance: Not configured
Idle timeout: 30 min
Authentication server-type: aaa
Password changing: Enabled
# SSL VPN用户sslvpnuser在PC浏览器上输入https://1.1.1.2:4430/,进入Domain List页面,如下图所示。
图1-20 Domain List页面
# 选择domainip进入登录页面,输入用户sslvpnuser和密码123456。
图1-21 登录页面
# 单击<登录>按钮,可以成功登录SSL VPN网关。在网页的应用程序栏中选择“启动IP客户端应用程序”。
# 单击<启动>按钮,下载IP接入客户端软件Svpnclient并安装,安装完成后,启动iNode客户端,输入如下图所示的参数。
图1-22 iNode客户端
# 单击<连接>按钮,成功登录SSL VPN客户端,如下图所示。
图1-23 成功登录SSL VPN网关
# SSL VPN用户sslvpnuser可以Ping通服务器地址20.2.2.2。
C:\>ping 20.2.2.2
Pinging 20.2.2.2 with 32 bytes of data:
Reply from 20.2.2.2: bytes=32 time=31ms TTL=254
Reply from 20.2.2.2: bytes=32 time=18ms TTL=254
Reply from 20.2.2.2: bytes=32 time=15ms TTL=254
Reply from 20.2.2.2: bytes=32 time=16ms TTL=254
Ping statistics for 20.2.2.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 15ms, Maximum = 31ms, Average = 20ms
# 在Device上可以看到SSL VPN用户sslvpnuser的会话信息。
[Device] display sslvpn session user sslvpnuser
User : sslvpnuser
Context : ctxip
Policy group : resourcegrp
Idle timeout : 30 min
Created at : 16:38:48 UTC Wed 07/26/2017
Lastest : 16:47:41 UTC Wed 07/26/2017
User IPv4 address : 172.16.1.16
Allocated IP : 10.1.1.1
Session ID : 14
Web browser/OS : Windows
Device为SSL VPN网关设备,连接公网用户和企业私有网络。用户通过Device可以通过IP接入方式安全地访问私有网络内的Server。Device通过RADIUS server采用远程认证和授权方式对用户进行认证和授权。
图1-24 RADIUS认证、授权配置组网图
表1-5 组网图示例接口与设备实际接口对应关系
|
组网图示例接口 |
设备实际接口 |
|
Interface1 |
GigabitEthernet1/2/5/1 |
|
Interface2 |
GigabitEthernet1/2/5/2 |
|
Interface3 |
GigabitEthernet1/2/5/3 |
在开始下面的配置之前,假设已完成如下配置:
· Device已获取到CA证书ca.cer和服务器证书server.pfx,若SSL VPN网关不引用SSL 服务端策略,则使用设备缺省证书。
· Server上存在到达网段10.1.1.0/24的路由。
· RADIUS server已经部署完成,能够对用户进行认证和授权。
(1) 配置接口IP地址
# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。
<Device> system-view
[Device] interface gigabitethernet 1/2/5/1
[Device-GigabitEthernet1/2/5/1] ip address 1.1.1.2 255.255.255.0
[Device-GigabitEthernet1/2/5/1] quit
请参考以上步骤配置其他接口的IP地址,具体配置步骤略。
(2) 创建SSL VPN AC接口,用于转发IP接入流量
# 创建SSL VPN AC接口1,配置该接口的IP地址为10.1.1.100/24。
[Device] interface sslvpn-ac 1
[Device-SSLVPN-AC1] ip address 10.1.1.100 24
[Device-SSLVPN-AC1] quit
(3) 配置静态路由
本举例仅以静态路由方式配置路由信息。实际组网中,请根据具体情况选择相应的路由配置方式。
# 请根据组网图中规划的信息,配置静态路由,本举例假设到达Server的下一跳IP地址为2.2.2.3,到达User的下一跳IP地址为1.1.1.3实际使用中请以具体组网情况为准,具体配置步骤如下。
[Device] ip route-static 20.2.2.2 24 2.2.2.3
[Device] ip route-static 40.1.1.1 24 1.1.1.3
(4) 配置接口加入安全域
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[Device] security-zone name untrust
[Device-security-zone-Untrust] import interface gigabitethernet 1/2/5/1
[Device-security-zone-Untrust] import interface sslvpn-ac 1
[Device-security-zone-Untrust] quit
[Device] security-zone name trust
[Device-security-zone-Trust] import interface gigabitethernet 1/2/5/2
[Device-security-zone-Trust] import interface gigabitethernet 1/2/5/3
[Device-security-zone-Trust] quit
(5) 配置安全策略放行Untrust与Local安全域、Untrust与Trust安全域之间的流量,用于用户访问SSL VPN网关设备和Server
# 配置名称为sslvpnlocalout1的安全策略规则,使Device可以向用户发送报文,具体配置步骤如下。
[Device] security-policy ip
[Device-security-policy-ip] rule name sslvpnlocalout1
[Device-security-policy-ip-1-sslvpnlocalout1] source-zone local
[Device-security-policy-ip-1-sslvpnlocalout1] destination-zone untrust
[Device-security-policy-ip-1-sslvpnlocalout1] source-ip-host 1.1.1.2
[Device-security-policy-ip-1-sslvpnlocalout1] source-ip-host 10.1.1.100
[Device-security-policy-ip-1-sslvpnlocalout1] destination-ip-host 40.1.1.1
[Device-security-policy-ip-1-sslvpnlocalout1] destination-ip-subnet 10.1.1.0 24
[Device-security-policy-ip-1-sslvpnlocalout1] action pass
[Device-security-policy-ip-1-sslvpnlocalout1] quit
# 配置名称为sslvpnlocalin1的安全策略规则,使用户可以向Device发送报文,具体配置步骤如下。
[Device-security-policy-ip] rule name sslvpnlocalin1
[Device-security-policy-ip-2-sslvpnlocalin1] source-zone untrust
[Device-security-policy-ip-2-sslvpnlocalin1] destination-zone local
[Device-security-policy-ip-2-sslvpnlocalin1] source-ip-host 40.1.1.1
[Device-security-policy-ip-2-sslvpnlocalin1] source-ip-host subnet 10.1.1.0 24
[Device-security-policy-ip-2-sslvpnlocalin1] destination-ip-host 1.1.1.2
[Device-security-policy-ip-2-sslvpnlocalin1] destination-ip-host 10.1.1.100
[Device-security-policy-ip-2-sslvpnlocalin1] action pass
[Device-security-policy-ip-2-sslvpnlocalin1] quit
# 配置名称为sslvpnlocalout2的安全策略规则,使Device可以向Server发送报文,具体配置步骤如下。
[Device-security-policy-ip] rule name sslvpnlocalout2
[Device-security-policy-ip-3-sslvpnlocalout2] source-zone local
[Device-security-policy-ip-3-sslvpnlocalout2] destination-zone trust
[Device-security-policy-ip-3-sslvpnlocalout2] source-ip-host 2.2.2.2
[Device-security-policy-ip-3-sslvpnlocalout2] source-ip-host 3.3.3.1
[Device-security-policy-ip-3-sslvpnlocalout2] destination-ip-host 20.2.2.2
[Device-security-policy-ip-3-sslvpnlocalout2] destination-ip-host 3.3.3.2
[Device-security-policy-ip-3-sslvpnlocalout2] action pass
[Device-security-policy-ip-3-sslvpnlocalout2] quit
# 配置名称为sslvpnlocalin2的安全策略规则,使Server可以向Device发送报文,具体配置步骤如下。
[Device-security-policy-ip] rule name sslvpnlocalin2
[Device-security-policy-ip-4-sslvpnlocalin2] source-zone trust
[Device-security-policy-ip-4-sslvpnlocalin2] destination-zone local
[Device-security-policy-ip-4-sslvpnlocalin2] source-ip-host 20.2.2.2
[Device-security-policy-ip-4-sslvpnlocalin2] source-ip-host 3.3.3.2
[Device-security-policy-ip-4-sslvpnlocalin2] destination-ip-host 2.2.2.2
[Device-security-policy-ip-4-sslvpnlocalin2] destination-ip-host 3.3.3.1
[Device-security-policy-ip-4-sslvpnlocalin2] action pass
[Device-security-policy-ip-4-sslvpnlocalin2] quit
# 配置名称为untrust-trust的安全策略规则,使用户可以通过SSL VPN AC接口访问Server,具体配置步骤如下。
[Device-security-policy-ip] rule name untrust-trust
[Device-security-policy-ip-5-untrust-trust] source-zone untrust
[Device-security-policy-ip-5-untrust-trust] destination-zone trust
[Device-security-policy-ip-5-untrust-trust] source-ip-subnet 10.1.1.0 24
[Device-security-policy-ip-5-untrust-trust] destination-ip-host 20.2.2.2
[Device-security-policy-ip-5-untrust-trust] action pass
[Device-security-policy-ip-5-untrust-trust] quit
# 配置名称为trust-untrust的安全策略规则,使Server可以通过SSL VPN AC接口向用户发送报文,具体配置步骤如下。
[Device-security-policy-ip] rule name trust-untrust
[Device-security-policy-ip-6-trust-untrust] source-zone trust
[Device-security-policy-ip-6-trust-untrust] destination-zone untrust
[Device-security-policy-ip-6-trust-untrust] source-ip-host 20.2.2.2
[Device-security-policy-ip-6-trust-untrust] destination-ip-subnet 10.1.1.0 24
[Device-security-policy-ip-6-trust-untrust] action pass
[Device-security-policy-ip-6-trust-untrust] quit
[Device-security-policy-ip] quit
(6) 配置PKI域,设置证书申请所需的相关参数
[Device] pki domain sslvpn
[Device-pki-domain-sslvpn] public-key rsa general name sslvpn
[Device-pki-domain-sslvpn] undo crl check enable
[Device-pki-domain-sslvpn] quit
[Device] pki import domain sslvpn der ca filename ca.cer
[Device] pki import domain sslvpn p12 local filename server.pfx
(7) 配置SSL服务器端策略,引用PKI域
[Device] ssl server-policy ssl
[Device-ssl-server-policy-ssl] pki-domain sslvpn
[Device-ssl-server-policy-ssl] quit
(8) 配置SSL VPN网关,为用户提供访问SSL VPN网关的入口
# 配置SSL VPN网关gw的IP地址为1.1.1.2,端口号为2000,并引用SSL服务器端策略ssl。
[Device] sslvpn gateway gw
[Device-sslvpn-gateway-gw] ip address 1.1.1.2 port 2000
[Device-sslvpn-gateway-gw] ssl server-policy ssl
[Device-sslvpn-gateway-gw] service enable
[Device-sslvpn-gateway-gw] quit
(9) 创建SSL VPN客户端地址池,用于为IP接入客户端分配IP地址
# 创建地址池ippool,指定IP地址范围为10.1.1.1~10.1.1.10。
[Device] sslvpn ip address-pool ippool 10.1.1.1 10.1.1.10
(10) 配置RADIUS,用于远程认证SSL VPN用户
# 配置Radius方案rscheme,指定认证和授权服务器地址均为3.3.3.2、认证和授权的共享密钥均为123456、发送给RADIUS服务器的用户名格式为不携带ISP域名。
[Device] radius scheme rscheme
[Device-radius-rscheme] primary authentication 3.3.3.2
[Device-radius-rscheme] primary accounting 3.3.3.2
[Device-radius-rscheme] accounting-on enable
[Device-radius-rscheme] key authentication simple 123456
[Device-radius-rscheme] key accounting simple 123456
[Device-radius-rscheme] user-name-format without-domain
[Device-radius-rscheme] quit
(11) 配置用户组,基于用户组对用户进行授权
# 配置用户组group1,授权给该用户组的策略组为pgroup。
[Device] user-group group1
[Device-ugroup-group1] authorization-attribute sslvpn-policy-group pgroup
[Device-ugroup-group1] quit
(12) 配置ISP域,通过ISP域对SSL VPN用户进行认证
# 配置ISP域domain1,指定用户授权属性为用户组group1,认证、授权和计费使用的RADIUS方案为rscheme。
[Device] domain domain1
[Device-isp-domain1] authorization-attribute user-group group1
[Device-isp-domain1] authentication sslvpn radius-scheme rscheme
[Device-isp-domain1] authorization sslvpn radius-scheme rscheme
[Device-isp-domain1] accounting sslvpn radius-scheme rscheme
[Device-isp-domain1] quit
(13) 配置SSL VPN访问实例,为用户提供不同的SSL VPN服务
# 配置SSL VPN访问实例ctx引用SSL VPN网关gw。
[Device] sslvpn context ctx
[Device-sslvpn-context-ctx] gateway gw
[Device-sslvpn-context-ctx] aaa domain domain1
[Device-sslvpn-context-ctx] ip-route-list rtlist
[Device-sslvpn-context-ctx-route-list-rtlist] include 20.2.2.0 255.255.255.0
[Device-sslvpn-context-ctx-route-list-rtlist] quit
[Device-sslvpn-context-ctx] uri-acl uriacl
[Device-sslvpn-context-ctx-uri-acl-uriacl] rule 1 permit uri icmp://20.2.2.0
[Device-sslvpn-context-ctx-uri-acl-uriacl] quit
[Device-sslvpn-context-ctx] ip-tunnel interface sslvpn-ac 1
[Device-sslvpn-context-ctx] ip-tunnel address-pool ippool mask 255.255.255.0
[Device-sslvpn-context-ctx] policy-group pgroup
[Device-sslvpn-context-ctx-policy-group-pgroup] ip-tunnel access-route ip-route-list rtlist
[Device-sslvpn-context-ctx-policy-group-pgroup] filter ip-tunnel uri-acl uriacl
[Device-sslvpn-context-ctx-policy-group-pgroup] quit
[Device-sslvpn-context-ctx] service enable
[Device-sslvpn-context-ctx] quit
# 在Device上查看SSL VPN网关状态,可见SSL VPN网关gw处于Up状态。
[Device] display sslvpn gateway
Gateway name: gw
Operation state: Up
IP: 1.1.1.2 Port: 2000
SSL server policy configured: ssl
SSL server policy in use: ssl
Front VPN instance: Not configured
# 在Device上查看SSL VPN访问实例状态,可见SSL VPN访问实例ctx处于Up状态。
[Device] display sslvpn context
Context name: ctx
Operation state: Up
AAA domain: domain1
Certificate authentication: Disabled
Password authentication:Enabled
Authentication use: All
SMS auth type: Not configured
Urlmasking: Disabled
Code verification: Disabled
Default policy group: Not configured
Associated SSL VPN gateway: gw
SSL client policy configured: ssl
SSL client policy in use: ssl
Maximum users allowed: 1048575
VPN instance: Not configured
Idle timeout: 30 min
Authentication server-type: aaa
Password changing: Enabled
# 用户在PC上启动IP接入客户端软件,输入访问地址1.1.1.2、端口号2000、用户名sslvpn、密码123456,登录成功。
# 在Device上可以看到用户会话信息。
[Device] display sslvpn session context ctx
SSL VPN context: ctx
Users: 1
Username Connections Idle time Created User IP
sslvpn 6 0/00:02:05 0/00:03:14 40.1.1.1
# 在PC上查看IPv4路由表,其中40.1.1.1/24为本地网卡地址,10.1.1.1/24为SSL VPN网关设备分配给用户的地址,20.2.2.0/24为到达内部服务器Server的路由。
>route -4 print
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
10.1.1.0 255.255.255.0 On-link 10.1.1.1 276
10.1.1.1 255.255.255.255 On-link 10.1.1.1 276
10.1.1.255 255.255.255.255 On-link 10.1.1.1 276
20.2.2.0 255.255.255.0 On-link 10.1.1.1 276
20.2.2.255 255.255.255.255 On-link 10.1.1.1 276
40.1.1.0 255.255.255.0 On-link 40.1.1.1 276
40.1.1.1 255.255.255.255 On-link 40.1.1.1 276
40.1.1.255 255.255.255.255 On-link 40.1.1.1 276
===========================================================================
# 在PC上可以Ping通服务器地址20.2.2.2。
C:\>ping 20.2.2.2
Pinging 20.2.2.2 with 32 bytes of data:
Reply from 20.2.2.2: bytes=32 time=197ms TTL=254
Reply from 20.2.2.2: bytes=32 time=1ms TTL=254
Reply from 20.2.2.2: bytes=32 time=1ms TTL=254
Reply from 20.2.2.2: bytes=32 time=186ms TTL=254
Ping statistics for 20.2.2.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 197ms, Average = 96ms
Device为SSL VPN网关设备,连接公网用户和企业私有网络。用户通过Device可以通过IP接入方式安全地访问私有网络内的Server。Device通过LDAP server采用远程认证和授权方式对用户进行认证和授权。
图1-25 LDAP认证、授权配置组网图
表1-6 组网图示例接口与设备实际接口对应关系
|
组网图示例接口 |
设备实际接口 |
|
Interface1 |
GigabitEthernet1/2/5/1 |
|
Interface2 |
GigabitEthernet1/2/5/2 |
|
Interface3 |
GigabitEthernet1/2/5/3 |
· 本文以Microsoft Windows Server 2008 R2的Active Directory为例,说明该例中LDAP服务器的基本配置。
· 在LDAP服务器上设置管理员admin的密码为admin!123456。
· 在LDAP服务器上添加用户名为sslvpn的用户,密码为ldap!123456,所属组织单位为sslvpn_usergroup,隶属于用户组users。
· Device已获取到CA证书ca.cer和服务器证书server.pfx,若SSL VPN网关不引用SSL 服务端策略,则使用设备缺省证书。
(1) 新建组织单位sslvpn_usergroup
a. 在LDAP服务器上,选择[开始/管理工具]中的[Active Directory用户和计算机],打开Active Directory用户和计算机界面;
b. 在Active Directory用户和计算机界面的左侧导航树中,右键单击ldap.com,选择[新建/组织单位],打开[新建对象-组织单位]对话框;
c. 在对话框中输入组织单位名称sslvpn_usergroup,并单击<确定>按钮。
图1-26 新建组织单位sslvpn_usergroup
(2) 新建用户sslvpn所属组织单位为sslvpn_usergroup
a. 在Active Directory用户和计算机界面的左侧导航树中,右键单击sslvpn_usergroup,选择[新建/用户],打开[新建对象-用户]对话框;
b. 在对话框中输入姓名和用户登录名为sslvpn,并单击<下一步>按钮。
图1-27 新建用户sslvpn
c. 在弹出的对话框的“密码”区域框内输入用户密码ldap!123456,并单击<下一步>按钮。用户账户的其它属性(密码的更改方式、密码的生存方式、是否禁用账户)请根据实际情况选择配置,图中仅为示例。
图1-28 设置用户密码
d. 单击<完成>按钮,创建新用户sslvpn。
(3) 将用户sslvpn加入Users组。
在Active Directory用户和计算机界面的左侧导航树中,单击sslvpn_usergroup,在右侧信息框中右键单击用户sslvpn,选择“属性”项;
在弹出的[sslvpn属性]对话框中选择“隶属于”页签,并单击<添加(D)...>按钮。
图1-29 修改用户属性
在弹出的[选择组]对话框中的可编辑区域框中输入对象名称“Users”,单击<确定>,完成用户sslvpn添加到Users组。
图1-30 添加用户sslvpn到用户组Users
在开始下面的配置之前,假设已完成如下配置:
· Device已获取到CA证书ca.cer和服务器证书server.pfx,若SSL VPN网关不引用SSL 服务端策略,则使用设备缺省证书。
· Server上存在到达网段10.1.1.0/24的路由。
· LDAP server已经部署完成,能够对用户进行认证和授权。
(1) 配置接口IP地址
# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。
<Device> system-view
[Device] interface gigabitethernet 1/2/5/1
[Device-GigabitEthernet1/2/5/1] ip address 1.1.1.2 255.255.255.0
[Device-GigabitEthernet1/2/5/1] quit
请参考以上步骤配置其他接口的IP地址,具体配置步骤略。
(2) 创建SSL VPN AC接口,用于转发IP接入流量
# 创建SSL VPN AC接口1,配置该接口的IP地址为10.1.1.100/24。
[Device] interface sslvpn-ac 1
[Device-SSLVPN-AC1] ip address 10.1.1.100 24
[Device-SSLVPN-AC1] quit
(3) 配置静态路由
本举例仅以静态路由方式配置路由信息。实际组网中,请根据具体情况选择相应的路由配置方式。
# 请根据组网图中规划的信息,配置静态路由,本举例假设到达Server的下一跳IP地址为2.2.2.3,到达User的下一跳IP地址为1.1.1.3实际使用中请以具体组网情况为准,具体配置步骤如下。
[Device] ip route-static 20.2.2.2 24 2.2.2.3
[Device] ip route-static 40.1.1.1 24 1.1.1.3
(4) 配置接口加入安全域
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[Device] security-zone name untrust
[Device-security-zone-Untrust] import interface gigabitethernet 1/2/5/1
[Device-security-zone-Untrust] import interface sslvpn-ac 1
[Device-security-zone-Untrust] quit
[Device] security-zone name trust
[Device-security-zone-Trust] import interface gigabitethernet 1/2/5/2
[Device-security-zone-Trust] import interface gigabitethernet 1/2/5/3
[Device-security-zone-Trust] quit
(5) 配置安全策略放行Untrust与Local安全域、Untrust与Trust安全域之间的流量,用于用户访问SSL VPN网关设备和Server
# 配置名称为sslvpnlocalout1的安全策略规则,使Device可以向用户发送报文,具体配置步骤如下。
[Device] security-policy ip
[Device-security-policy-ip] rule name sslvpnlocalout1
[Device-security-policy-ip-1-sslvpnlocalout1] source-zone local
[Device-security-policy-ip-1-sslvpnlocalout1] destination-zone untrust
[Device-security-policy-ip-1-sslvpnlocalout1] source-ip-host 1.1.1.2
[Device-security-policy-ip-1-sslvpnlocalout1] source-ip-host 10.1.1.100
[Device-security-policy-ip-1-sslvpnlocalout1] destination-ip-host 40.1.1.1
[Device-security-policy-ip-1-sslvpnlocalout1] destination-ip-subnet 10.1.1.0 24
[Device-security-policy-ip-1-sslvpnlocalout1] action pass
[Device-security-policy-ip-1-sslvpnlocalout1] quit
# 配置名称为sslvpnlocalin1的安全策略规则,使用户可以向Device发送报文,具体配置步骤如下。
[Device-security-policy-ip] rule name sslvpnlocalin1
[Device-security-policy-ip-2-sslvpnlocalin1] source-zone untrust
[Device-security-policy-ip-2-sslvpnlocalin1] destination-zone local
[Device-security-policy-ip-2-sslvpnlocalin1] source-ip-host 40.1.1.1
[Device-security-policy-ip-2-sslvpnlocalin1] source-ip-host subnet 10.1.1.0 24
[Device-security-policy-ip-2-sslvpnlocalin1] destination-ip-host 1.1.1.2
[Device-security-policy-ip-2-sslvpnlocalin1] destination-ip-host 10.1.1.100
[Device-security-policy-ip-2-sslvpnlocalin1] action pass
[Device-security-policy-ip-2-sslvpnlocalin1] quit
# 配置名称为sslvpnlocalout2的安全策略规则,使Device可以向Server发送报文,具体配置步骤如下。
[Device-security-policy-ip] rule name sslvpnlocalout2
[Device-security-policy-ip-3-sslvpnlocalout2] source-zone local
[Device-security-policy-ip-3-sslvpnlocalout2] destination-zone trust
[Device-security-policy-ip-3-sslvpnlocalout2] source-ip-host 2.2.2.2
[Device-security-policy-ip-3-sslvpnlocalout2] source-ip-host 3.3.3.1
[Device-security-policy-ip-3-sslvpnlocalout2] destination-ip-host 20.2.2.2
[Device-security-policy-ip-3-sslvpnlocalout2] destination-ip-host 3.3.3.2
[Device-security-policy-ip-3-sslvpnlocalout2] action pass
[Device-security-policy-ip-3-sslvpnlocalout2] quit
# 配置名称为sslvpnlocalin2的安全策略规则,使Server可以向Device发送报文,具体配置步骤如下。
[Device-security-policy-ip] rule name sslvpnlocalin2
[Device-security-policy-ip-4-sslvpnlocalin2] source-zone trust
[Device-security-policy-ip-4-sslvpnlocalin2] destination-zone local
[Device-security-policy-ip-4-sslvpnlocalin2] source-ip-host 20.2.2.2
[Device-security-policy-ip-4-sslvpnlocalin2] source-ip-host 3.3.3.2
[Device-security-policy-ip-4-sslvpnlocalin2] destination-ip-host 2.2.2.2
[Device-security-policy-ip-4-sslvpnlocalin2] destination-ip-host 3.3.3.1
[Device-security-policy-ip-4-sslvpnlocalin2] action pass
[Device-security-policy-ip-4-sslvpnlocalin2] quit
# 配置名称为untrust-trust的安全策略规则,使用户可以通过SSL VPN AC接口访问Server,具体配置步骤如下。
[Device-security-policy-ip] rule name untrust-trust
[Device-security-policy-ip-5-untrust-trust] source-zone untrust
[Device-security-policy-ip-5-untrust-trust] destination-zone trust
[Device-security-policy-ip-5-untrust-trust] source-ip-subnet 10.1.1.0 24
[Device-security-policy-ip-5-untrust-trust] destination-ip-host 20.2.2.2
[Device-security-policy-ip-5-untrust-trust] action pass
[Device-security-policy-ip-5-untrust-trust] quit
# 配置名称为trust-untrust的安全策略规则,使Server可以通过SSL VPN AC接口向用户发送报文,具体配置步骤如下。
[Device-security-policy-ip] rule name trust-untrust
[Device-security-policy-ip-6-trust-untrust] source-zone trust
[Device-security-policy-ip-6-trust-untrust] destination-zone untrust
[Device-security-policy-ip-6-trust-untrust] source-ip-host 20.2.2.2
[Device-security-policy-ip-6-trust-untrust] destination-ip-subnet 10.1.1.0 24
[Device-security-policy-ip-6-trust-untrust] action pass
[Device-security-policy-ip-6-trust-untrust] quit
[Device-security-policy-ip] quit
(6) 配置PKI域,设置证书申请所需的相关参数
[Device] pki domain sslvpn
[Device-pki-domain-sslvpn] public-key rsa general name sslvpn
[Device-pki-domain-sslvpn] undo crl check enable
[Device-pki-domain-sslvpn] quit
[Device] pki import domain sslvpn der ca filename ca.cer
[Device] pki import domain sslvpn p12 local filename server.pfx
(7) 配置SSL服务器端策略,引用PKI域
[Device] ssl server-policy ssl
[Device-ssl-server-policy-ssl] pki-domain sslvpn
[Device-ssl-server-policy-ssl] quit
(8) 配置SSL VPN网关,为用户提供访问SSL VPN网关的入口
# 配置SSL VPN网关gw的IP地址为1.1.1.2,端口号为2000,并引用SSL服务器端策略ssl。
[Device] sslvpn gateway gw
[Device-sslvpn-gateway-gw] ip address 1.1.1.2 port 2000
[Device-sslvpn-gateway-gw] ssl server-policy ssl
[Device-sslvpn-gateway-gw] service enable
[Device-sslvpn-gateway-gw] quit
(9) 创建SSL VPN客户端地址池,用于为IP接入客户端分配IP地址
# 创建地址池ippool,指定IP地址范围为10.1.1.1~10.1.1.10。
[Device] sslvpn ip address-pool ippool 10.1.1.1 10.1.1.10
(10) 配置LDAP,用于认证SSL VPN用户
[Device] ldap server ldap1
[Device-ldap-server-ldap1] ip 3.3.3.2
[Device-ldap-server-ldap1] login-dn cn=admin,cn=users,dc=ldap,dc=com
[Device-ldap-server-ldap1] login-password simple admin!123456
[Device-ldap-server-ldap1] search-base-dn dc=ldap,dc=com
[Device-ldap-server-ldap1] quit
[Device] ldap attribute-map test
[Device-ldap-attr-map-test] map ldap-attribute memberof prefix cn= delimiter , aaa-attribute user-group
[Device-ldap-attr-map-test] quit
[Device] ldap scheme shml
[Device-ldap-shml] authentication-server ldap1
[Device-ldap-shml] authorization-server ldap1
[Device-ldap-shml] attribute-map test
[Device-ldap-shml] quit
(11) 配置ISP域,通过ISP域对SSL VPN用户进行认证
# 创建ISP域bbb,为SSL VPN用户配置AAA认证方法为LDAP认证、LDAP授权、不计费。
[Device] domain bbb
[Device-isp-bbb] authentication sslvpn ldap-scheme shml
[Device-isp-bbb] authorization sslvpn ldap-scheme shml
[Device-isp-bbb] accounting sslvpn none
[Device-isp-bbb] quit
(12) 配置SSL VPN访问实例,为用户提供不同的SSL VPN服务
# 配置SSL VPN访问实例ctx引用SSL VPN网关gw。
[Device] sslvpn context ctx
[Device-sslvpn-context-ctx] gateway gw
[Device-sslvpn-context-ctx] aaa domain bbb
[Device-sslvpn-context-ctx] ip-route-list rtlist
[Device-sslvpn-context-ctx-route-list-rtlist] include 20.2.2.0 255.255.255.0
[Device-sslvpn-context-ctx-route-list-rtlist] quit
[Device-sslvpn-context-ctx] uri-acl uriacl
[Device-sslvpn-context-ctx-uri-acl-uriacl] rule 1 permit uri icmp://20.2.2.0
[Device-sslvpn-context-ctx-uri-acl-uriacl] quit
[Device-sslvpn-context-ctx] ip-tunnel interface sslvpn-ac 1
[Device-sslvpn-context-ctx] ip-tunnel address-pool ippool mask 255.255.255.0
[Device-sslvpn-context-ctx] policy-group pgroup
[Device-sslvpn-context-ctx-policy-group-pgroup] ip-tunnel access-route ip-route-list rtlist
[Device-sslvpn-context-ctx-policy-group-pgroup] filter ip-tunnel uri-acl uriacl
[Device-sslvpn-context-ctx-policy-group-pgroup] quit
[Device-sslvpn-context-ctx] service enable
[Device-sslvpn-context-ctx] quit
(13) 配置本地用户组,基于用户组对用户进行授权
# 创建本地用户组users,指定授权SSL VPN策略组为pgroup。
[Device] user-group users
[Device-ugroup-users] authorization-attribute sslvpn-policy-group pgroup
[Device-ugroup-users] quit
# 在Device上查看SSL VPN网关状态,可见SSL VPN网关gw处于Up状态。
[Device] display sslvpn gateway
Gateway name: gw
Operation state: Up
IP: 1.1.1.2 Port: 2000
SSL server policy configured: ssl
SSL server policy in use: ssl
Front VPN instance: Not configured
# 在Device上查看SSL VPN访问实例状态,可见SSL VPN访问实例ctx处于Up状态。
[Device] display sslvpn context
Context name: ctx
Operation state: Up
AAA domain: domain1
Certificate authentication: Disabled
Password authentication:Enabled
Authentication use: All
SMS auth type: Not configured
Urlmasking: Disabled
Code verification: Disabled
Default policy group: Not configured
Associated SSL VPN gateway: gw
SSL client policy configured: ssl
SSL client policy in use: ssl
Maximum users allowed: 1048575
VPN instance: Not configured
Idle timeout: 30 min
Authentication server-type: aaa
Password changing: Enabled
# 用户在PC上启动IP接入客户端软件,输入访问地址1.1.1.2、端口号2000、用户名sslvpn、密码123456,登录成功。
# 在Device上可以看到用户会话信息。
[Device] display sslvpn session context ctx
SSL VPN context: ctx
Users: 1
Username Connections Idle time Created User IP
sslvpn 6 0/00:02:05 0/00:03:14 40.1.1.1
# 在PC上查看IPv4路由表,其中40.1.1.1/24为本地网卡地址,10.1.1.1/24为SSL VPN网关设备分配给用户的地址,20.2.2.0/24为到达内部服务器Server的路由。
>route -4 print
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
10.1.1.0 255.255.255.0 On-link 10.1.1.1 276
10.1.1.1 255.255.255.255 On-link 10.1.1.1 276
10.1.1.255 255.255.255.255 On-link 10.1.1.1 276
20.2.2.0 255.255.255.0 On-link 10.1.1.1 276
20.2.2.255 255.255.255.255 On-link 10.1.1.1 276
40.1.1.0 255.255.255.0 On-link 40.1.1.1 276
40.1.1.1 255.255.255.255 On-link 40.1.1.1 276
40.1.1.255 255.255.255.255 On-link 40.1.1.1 276
===========================================================================
# 在PC上可以Ping通服务器地址20.2.2.2。
C:\>ping 20.2.2.2
Pinging 20.2.2.2 with 32 bytes of data:
Reply from 20.2.2.2: bytes=32 time=197ms TTL=254
Reply from 20.2.2.2: bytes=32 time=1ms TTL=254
Reply from 20.2.2.2: bytes=32 time=1ms TTL=254
Reply from 20.2.2.2: bytes=32 time=186ms TTL=254
Ping statistics for 20.2.2.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 197ms, Average = 96ms
Device为SSL VPN网关设备,连接公网用户和企业私有网络。用户通过Device可以通过IP接入方式安全地访问私有网络内的Server。用户使用USB Key登录SSL VPN网关,Device采用证书认证方式对用户进行身份认证,认证通过后对用户进行授权。
图1-31 USB Key证书认证配置组网图
表1-7 组网图示例接口与设备实际接口对应关系
|
组网图示例接口 |
设备实际接口 |
|
Interface1 |
GigabitEthernet1/2/5/1 |
|
Interface2 |
GigabitEthernet1/2/5/2 |
设备支持使用缺省证书和非缺省证书作为其服务器证书,使用方法如下:
· 缺省证书:设备出厂自带的服务器证书即为缺省证书,使用缺省证书时无需引用SSL服务器端策略。
· 非缺省证书:用户自己申请的证书即为非缺省证书,使用非缺省证书时需要引用SSL服务器端策略。
由于缺省证书存在较多的安全隐患,故仅作为功能测试使用。实际组网环境中,请使用非缺省证书作为设备的服务器证书。
在开始下面的配置之前,假设已完成如下配置:
· Device已获取到CA证书ca.cer和服务器证书server.pfx,USB Key中已安装证书,Device和USB Key安装的证书为同一CA机构颁发。
· USB Key客户端证书中的指定字段(默认为CN字段)必须和该SSL VPN用户的用户名一致。
· 某些品牌的USB Key可能需要安装驱动才能使用,请做好准备。
(1) 配置接口IP地址
# 根据组网图中规划的信息,配置各接口的IP地址。
<Device> system-view
[Device] interface gigabitethernet 1/2/5/1
[Device-GigabitEthernet1/2/5/1] ip address 1.1.1.2 255.255.255.0
[Device-GigabitEthernet1/2/5/1] quit
# 创建SSL VPN AC接口,用于转发IP接入流量。
[Device] interface sslvpn-ac 1
[Device-SSLVPN-AC1] ip address 10.1.1.100 24
[Device-SSLVPN-AC1] quit
请参考以上步骤配置其他接口的IP地址,具体配置步骤略。
# 请根据组网图中规划的信息,将接口加入对应的安全域。
[Device] security-zone name untrust
[Device-security-zone-Untrust] import interface gigabitethernet 1/2/5/1
[Device-security-zone-Untrust] import interface sslvpn-ac 1
[Device-security-zone-Untrust] quit
[Device] security-zone name trust
[Device-security-zone-Trust] import interface gigabitethernet 1/2/5/2
[Device-security-zone-Trust] quit
(2) 配置静态路由
本举例仅以静态路由方式配置路由信息。实际组网中,请根据具体情况选择相应的路由配置方式。
# 请根据组网图中规划的信息,配置静态路由,本举例假设到达Server的下一跳IP地址为2.2.2.3,到达Host的下一跳IP地址为1.1.1.3,实际使用中请以具体组网情况为准。
[Device] ip route-static 20.2.2.2 24 2.2.2.3
[Device] ip route-static 40.1.1.1 24 1.1.1.3
(3) 配置安全策略放行Untrust与Local安全域、Untrust与Trust安全域之间的流量,用于用户访问SSL VPN网关设备和Server
# 配置名称为sslvpnlocalout1的安全策略规则,使SSL VPN网关可以向用户发送报文。
[Device] security-policy ip
[Device-security-policy-ip] rule name sslvpnlocalout1
[Device-security-policy-ip-1-sslvpnlocalout1] source-zone local
[Device-security-policy-ip-1-sslvpnlocalout1] destination-zone untrust
[Device-security-policy-ip-1-sslvpnlocalout1] source-ip-host 1.1.1.2
[Device-security-policy-ip-1-sslvpnlocalout1] destination-ip-host 40.1.1.1
[Device-security-policy-ip-1-sslvpnlocalout1] action pass
[Device-security-policy-ip-1-sslvpnlocalout1] quit
# 配置名称为sslvpnlocalin1的安全策略规则,使用户可以向SSL VPN网关发送报文。
[Device-security-policy-ip] rule name sslvpnlocalin1
[Device-security-policy-ip-2-sslvpnlocalin1] source-zone untrust
[Device-security-policy-ip-2-sslvpnlocalin1] destination-zone local
[Device-security-policy-ip-2-sslvpnlocalin1] source-ip-host 40.1.1.1
[Device-security-policy-ip-2-sslvpnlocalin1] destination-ip-host 1.1.1.2
[Device-security-policy-ip-2-sslvpnlocalin1] action pass
[Device-security-policy-ip-2-sslvpnlocalin1] quit
# 配置名称为sslvpnlocalout2的安全策略规则,使SSL VPN网关可以向Server发送报文。
[Device-security-policy-ip] rule name sslvpnlocalout2
[Device-security-policy-ip-3-sslvpnlocalout2] source-zone local
[Device-security-policy-ip-3-sslvpnlocalout2] destination-zone trust
[Device-security-policy-ip-3-sslvpnlocalout2] source-ip-host 2.2.2.2
[Device-security-policy-ip-3-sslvpnlocalout2] destination-ip-host 20.2.2.2
[Device-security-policy-ip-3-sslvpnlocalout2] action pass
[Device-security-policy-ip-3-sslvpnlocalout2] quit
# 配置名称为sslvpnlocalin2的安全策略规则,使Server可以向SSL VPN网关发送报文。
[Device-security-policy-ip] rule name sslvpnlocalin2
[Device-security-policy-ip-4-sslvpnlocalin2] source-zone trust
[Device-security-policy-ip-4-sslvpnlocalin2] destination-zone local
[Device-security-policy-ip-4-sslvpnlocalin2] source-ip-host 20.2.2.2
[Device-security-policy-ip-4-sslvpnlocalin2] destination-ip-host 2.2.2.2
[Device-security-policy-ip-4-sslvpnlocalin2] action pass
[Device-security-policy-ip-4-sslvpnlocalin2] quit
# 配置名称为untrust-trust的安全策略规则,使用户可以通过SSL VPN AC接口访问Server。
[Device-security-policy-ip] rule name untrust-trust
[Device-security-policy-ip-5-untrust-trust] source-zone untrust
[Device-security-policy-ip-5-untrust-trust] destination-zone trust
[Device-security-policy-ip-5-untrust-trust] source-ip-subnet 10.1.1.0 24
[Device-security-policy-ip-5-untrust-trust] destination-ip-host 20.2.2.2
[Device-security-policy-ip-5-untrust-trust] action pass
[Device-security-policy-ip-5-untrust-trust] quit
# 配置名称为trust-untrust的安全策略规则,使Server可以通过SSL VPN AC接口向用户发送报文。
[Device-security-policy-ip] rule name trust-untrust
[Device-security-policy-ip-6-trust-untrust] source-zone trust
[Device-security-policy-ip-6-trust-untrust] destination-zone untrust
[Device-security-policy-ip-6-trust-untrust] source-ip-host 20.2.2.2
[Device-security-policy-ip-6-trust-untrust] destination-ip-subnet 10.1.1.0 24
[Device-security-policy-ip-6-trust-untrust] action pass
[Device-security-policy-ip-6-trust-untrust] quit
[Device-security-policy-ip] quit
(4) 为设备配置证书,用于SSL VPN客户端验证SSL VPN网关的身份
# 配置PKI域,设置证书申请所需的相关参数。
[Device] pki domain sslvpn
[Device-pki-domain-sslvpn] public-key rsa general name sslvpn
[Device-pki-domain-sslvpn] undo crl check enable
[Device-pki-domain-sslvpn] quit
[Device] pki import domain sslvpn der ca filename ca.cer
[Device] pki import domain sslvpn p12 local filename server.pfx
# 配置SSL服务器端策略,引用PKI域,并开启验证客户端功能。
[Device] ssl server-policy ssl
[Device-ssl-server-policy-ssl] pki-domain sslvpn
[Device-ssl-server-policy-ssl] client-verify enable
[Device-ssl-server-policy-ssl] quit
(5) 配置SSL VPN业务,为用户提供SSL VPN接入服务
# 配置SSL VPN网关,为用户提供登录SSL VPN网关的入口。
[Device] sslvpn gateway gw
[Device-sslvpn-gateway-gw] ip address 1.1.1.2 port 4430
[Device-sslvpn-gateway-gw] ssl server-policy ssl
[Device-sslvpn-gateway-gw] service enable
[Device-sslvpn-gateway-gw] quit
# 创建SSL VPN客户端地址池,用于为IP接入客户端分配IP地址。
[Device] sslvpn ip address-pool sslvpnpool 10.1.1.1 10.1.1.10
# 创建ACL,用于对IP接入流量进行过滤。
[Device] acl advanced 3000
[Device-acl-ipv4-adv-3000] rule permit ip source 10.1.1.0 0.0.0.255 destination 20.2.2.0 0.0.0.255
[Device-acl-ipv4-adv-3000] quit
# 配置SSL VPN访问实例,使用证书认证方式验证用户身份,并为用户提供SSL VPN IP接入服务。
[Device] sslvpn context ctxip
[Device-sslvpn-context-ctxip] gateway gw
[Device-sslvpn-context-ctxip] certificate-authentication enable
[Device-sslvpn-context-ctxip] ip-tunnel interface sslvpn-ac 1
[Device-sslvpn-context-ctxip] ip-route-list rtlist
[Device-sslvpn-context-ctxip-route-list-rtlist] include 20.2.2.0 24
[Device-sslvpn-context-ctxip-route-list-rtlist] quit
[Device-sslvpn-context-ctxip] ip-tunnel address-pool sslvpnpool mask 24
[Device-sslvpn-context-ctxip] policy-group resourcegrp
[Device-sslvpn-context-ctxip-policy-group-resourcegrp] ip-tunnel access-route ip-route-list rtlist
[Device-sslvpn-context-ctxip-policy-group-resourcegrp] filter ip-tunnel acl 3000
[Device-sslvpn-context-ctxip-policy-group-resourcegrp] quit
[Device-sslvpn-context-ctxip] service enable
[Device-sslvpn-context-ctxip] quit
(6) 配置SSL VPN用户,用于访问SSL VPN网关
# 创建本地SSL VPN用户sslvpnuser,密码为123456TESTplat&!,用户角色为network-operator,授权用户的SSL VPN策略组为resourcegrp。
[Device] local-user sslvpnuser class network
[Device-luser-network-sslvpnuser] password simple 123456
[Device-luser-network-sslvpnuser] service-type sslvpn
[Device-luser-network-sslvpnuser] authorization-attribute sslvpn-policy-group resourcegrp
[Device-luser-network-sslvpnuser] authorization-attribute user-role network-operator
[Device-luser-network-sslvpnuser] quit
Server上需要配置到达网段10.1.1.0/24的路由。
(1) 在Device上查看SSL VPN的相关信息
# 在Device上查看SSL VPN网关状态,可见SSL VPN网关gw处于Up状态。
[Device] display sslvpn gateway
Gateway name: gw
Operation state: Up
IP: 1.1.1.2 Port: 4430
Front VPN instance: Not configured
# 在Device上查看SSL VPN访问实例状态,可见SSL VPN访问实例ctxip处于Up状态。
[Device] display sslvpn context
Context name: ctxip
Operation state: Up
AAA domain: Not specified
Certificate authentication: Enabled
Password authentication: Enabled
Authentication use: All
SMS auth type: Not configured
Urlmasking: Disabled
Code verification: Disabled
Default policy group: Not configured
Associated SSL VPN gateway: gw
Maximum users allowed: 1048575
VPN instance: Not configured
Idle timeout: 30 min
Authentication server-type: aaa
Password changing: Enabled
# 用户登录成功之后,可以在Device上看到SSL VPN用户sslvpnuser的会话信息。
[Device] display sslvpn session user sslvpnuser
User : sslvpnuser
Context : ctxip
Policy group : resourcegrp
Idle timeout : 30 min
Created at : 16:38:48 UTC Wed 07/26/2017
Lastest : 16:47:41 UTC Wed 07/26/2017
User IPv4 address : 172.16.1.16
Allocated IP : 10.1.1.1
Session ID : 14
Web browser/OS : Windows
(2) 在Host上安装USB Key
从管理员处获取制作好的USB Key安装到Host,USB Key的制作方法请参见本文附录。
(3) 在Host上登录SSL VPN网关
# 在Host的浏览器地址栏输入https://1.1.1.2:4430/,回车确认之后会弹出证书选择界面,如下图所示。
图1-32 证书选择界面
# 选择证书,单击<确定>按钮,跳转到登录页面,输入用户sslvpnuser和密码123456TESTplat&!,如下图所示。
图1-33 登录页面
# 单击<登录>按钮,可以成功登录SSL VPN网关。在网页的应用程序栏中选择“启动IP客户端应用程序”。
# 单击<启动>按钮,下载IP接入客户端软件Svpnclient并安装,安装完成后,启动iNode客户端,输入如下图所示的参数。
图1-34 iNode客户端
# 单击密码输入框右侧的<选择客户端证书>按钮,选择USBKey中的客户端证书,单击<确定>按钮,如下图所示。
图1-35 选择证书
# 单击图1-34的<连接>按钮,成功登录SSL VPN客户端,如下图所示。
图1-36 成功登录SSL VPN网关
# SSL VPN用户sslvpnuser登录成功后,SSL VPN用户可以在Host上Ping通服务器地址20.2.2.2。
C:\>ping 20.2.2.2
Pinging 20.2.2.2 with 32 bytes of data:
Reply from 20.2.2.2: bytes=32 time=31ms TTL=254
Reply from 20.2.2.2: bytes=32 time=18ms TTL=254
Reply from 20.2.2.2: bytes=32 time=15ms TTL=254
Reply from 20.2.2.2: bytes=32 time=16ms TTL=254
Ping statistics for 20.2.2.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 15ms, Maximum = 31ms, Average = 20ms
在管理员PC上制作USB Key的流程如下:
(1) 配置管理员PC的IP地址、网关,保证PC到达CA服务器的路由可达。本文以Windows 2008 server作为CA服务器举例,组网图如下图所示。
图1-37 制作USB Key组网图
表1-8 组网图示例接口与设备实际接口对应关系
|
组网图示例接口 |
设备实际接口 |
|
Interface1 |
GigabitEthernet1/2/5/1 |
|
Interface2 |
GigabitEthernet1/2/5/2 |
(2) 申请USBKey客户端证书。
# 在浏览器地址栏输入https://192.168.100.247/certsrv,进入证书申请页面,如下图所示。
图1-38 证书申请页面
# 单击<申请证书>按钮,跳转页面如下图所示。
图1-39 证书申请页面
# 单击<高级证书申请>按钮,在跳转的页面选择<创建并向此CA提交一个申请>,申请客户端证书,参数配置如下图所示。
图1-40 申请客户端证书
# 其余选用默认配置,单击页面最下方的<提交>按钮,提交客户端证书申请。
# 提交成功之后,页面会弹出输入框,请按提示输入USB Key的用户密码,并单击<登录>按钮,如下图所示。
图1-41 安装客户端证书到USB Key
# 单击<安装此证书>,潜在的脚本冲突单击<是>,客户端证书会直接安装到USBKey中,如下图所示。
图1-42 USB Key客户端证书
至此,USB Key制作完毕。
关于此配置举例的具体内容,请参见“安全配置指导”中的“用户身份识别与管理”。
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!
