域帐号使用 forticlient 客户端 sslvpn 拨号后 如何通过 ad server … · 2020. 8....

14
Fortinet 公司 1 / 14 www.fortinet.com.cn 域帐号使用 Forticlient 客户端 sslvpn 拨号后 如何通过 AD server 获取固定 IP 地址 版本 1.0 时间 2020 7 21 测试设备及版本 FortiGate 300D V6.4.0 + WinServer2016 AD 作者 季家强 状态 待审核 反馈 [email protected]

Upload: others

Post on 15-Mar-2021

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 域帐号使用 Forticlient 客户端 sslvpn 拨号后 如何通过 AD server … · 2020. 8. 8. · 域帐号使用Forticlient 客户端sslvpn 拨号后 如何通过AD server 获取固定IP

Fortinet 公司 第 1 页 / 共 14 页 www.fortinet.com.cn

域帐号使用 Forticlient客户端 sslvpn拨号后

如何通过 AD server获取固定 IP地址

版本 1.0

时间 2020年 7月 21

测试设备及版本 FortiGate 300D V6.4.0 + WinServer2016 AD

作者 季家强

状态 待审核

反馈 [email protected]

Page 2: 域帐号使用 Forticlient 客户端 sslvpn 拨号后 如何通过 AD server … · 2020. 8. 8. · 域帐号使用Forticlient 客户端sslvpn 拨号后 如何通过AD server 获取固定IP

Fortinet 公司 第 2 页 / 共 14 页 www.fortinet.com.cn

目录 1. 测试拓扑...................................................................................................................... 3

PC(win10)-- FGT300D -- Winserver2016 AD server ......................................................... 3

PC 上使用域帐号,fortiClient sslvpn 拔号到 FGT300D, AD server 分配固定的 IP 地址给

相应的域帐号。 ............................................................................................................................ 3

2. AD server端上给域帐号分配固定 IP ........................................................................ 3

AD 中创建对应的域用户 ...................................................................................................... 3

为用户分配静态 IP 地址 192.168.168.168 ........................................................................... 4

3. AD server上配置策略服务器(NPS) ...................................................................... 5

AD 服务器配置 NPS(Network Policy Service)网络策略和访问服务 .............................. 5

打开该“网络策略服务器” ..................................................................................................... 6

将策略服务器注册到 AD 服务器 ......................................................................................... 7

配置基本的 RADIUS 客户端信息 .......................................................................................... 7

配置相应的网络策略 ............................................................................................................ 8

4. FortiGate 上的配置 ................................................................................................... 10

FGT 上配置 radius server 的信息, .................................................................................... 10

使用 AD 的域用户帐号进行认证测试 ............................................................................... 10

定义 User Group 组,并调 radius server ........................................................................... 11

更改 SSL-VPN portal 下 ip-mode 为 user-group .................................................................. 11

SSLVPN setting 新建一个 authentication rule ..................................................................... 12

5. 测试结果.................................................................................................................... 12

diag debug application sslvpn -1 查看拨号过程.............................................................. 12

WireShark 下的抓包 ............................................................................................................ 14

Page 3: 域帐号使用 Forticlient 客户端 sslvpn 拨号后 如何通过 AD server … · 2020. 8. 8. · 域帐号使用Forticlient 客户端sslvpn 拨号后 如何通过AD server 获取固定IP

Fortinet 公司 第 3 页 / 共 14 页 www.fortinet.com.cn

1. 测试拓扑

PC(win10)-- FGT300D -- Winserver2016 AD server

PC 上使用域帐号,fortiClient sslvpn 拔号到 FGT300D, AD server 分

配固定的 IP 地址给相应的域帐号。

2. AD server 端上给域帐号分配固定 IP 先在 AD 中创建对应的域用户

Page 4: 域帐号使用 Forticlient 客户端 sslvpn 拨号后 如何通过 AD server … · 2020. 8. 8. · 域帐号使用Forticlient 客户端sslvpn 拨号后 如何通过AD server 获取固定IP

Fortinet 公司 第 4 页 / 共 14 页 www.fortinet.com.cn

在用户的属性下为该用户分配静态 IP 地址 192.168.168.168

Page 5: 域帐号使用 Forticlient 客户端 sslvpn 拨号后 如何通过 AD server … · 2020. 8. 8. · 域帐号使用Forticlient 客户端sslvpn 拨号后 如何通过AD server 获取固定IP

Fortinet 公司 第 5 页 / 共 14 页 www.fortinet.com.cn

3. AD server 上配置策略服务器(NPS)

需要为 AD 服务器配置 NPS(Network Policy Service)网络策略和访问

服务

Page 6: 域帐号使用 Forticlient 客户端 sslvpn 拨号后 如何通过 AD server … · 2020. 8. 8. · 域帐号使用Forticlient 客户端sslvpn 拨号后 如何通过AD server 获取固定IP

Fortinet 公司 第 6 页 / 共 14 页 www.fortinet.com.cn

安装好该服务后,可以从开始菜单打开该“网络策略服务器”

Page 7: 域帐号使用 Forticlient 客户端 sslvpn 拨号后 如何通过 AD server … · 2020. 8. 8. · 域帐号使用Forticlient 客户端sslvpn 拨号后 如何通过AD server 获取固定IP

Fortinet 公司 第 7 页 / 共 14 页 www.fortinet.com.cn

先将策略服务器注册到 AD 服务器

接下来配置基本的 RADIUS 客户端信息,这里填写对应的 FGT IP 地址

和共享密钥, 注意如果 FGT 穿过了三层设备且做了 NAT 的情况下,

则此处的地址需要填写 NAT 后的地址

Page 8: 域帐号使用 Forticlient 客户端 sslvpn 拨号后 如何通过 AD server … · 2020. 8. 8. · 域帐号使用Forticlient 客户端sslvpn 拨号后 如何通过AD server 获取固定IP

Fortinet 公司 第 8 页 / 共 14 页 www.fortinet.com.cn

接下来需要配置对应的网络策略

在设置选项卡下,勾选“客户端可以请求一个 IP 地址”

Page 9: 域帐号使用 Forticlient 客户端 sslvpn 拨号后 如何通过 AD server … · 2020. 8. 8. · 域帐号使用Forticlient 客户端sslvpn 拨号后 如何通过AD server 获取固定IP

Fortinet 公司 第 9 页 / 共 14 页 www.fortinet.com.cn

Page 10: 域帐号使用 Forticlient 客户端 sslvpn 拨号后 如何通过 AD server … · 2020. 8. 8. · 域帐号使用Forticlient 客户端sslvpn 拨号后 如何通过AD server 获取固定IP

Fortinet 公司 第 10 页 / 共 14 页 www.fortinet.com.cn

4. FortiGate 上的配置

接下来在 FGT 上配置 radius server 的信息,IP 为 AD server(with NPS

server), secret 为 NPS 预设好的密码

此时使用 AD 下的 user 已可以正常通过认证 CNBJ-TAC-FG3HD # di te authserver radius FortiAD-lab mschap2 justinji forti.123

authenticate 'justinji' against 'mschap2' succeeded, server=primary assigned_rad_session_id=566858794

session_timeout=0 secs idle_timeout=0 secs!

Page 11: 域帐号使用 Forticlient 客户端 sslvpn 拨号后 如何通过 AD server … · 2020. 8. 8. · 域帐号使用Forticlient 客户端sslvpn 拨号后 如何通过AD server 获取固定IP

Fortinet 公司 第 11 页 / 共 14 页 www.fortinet.com.cn

在 User Group 下定义相应的组,并调用上面配置好的 radius server

在 sslpn setting 和 firewall policy 下调用这个定义好的 User Group

在命令行下更改 SSL-VPN portal 下的 “full-access-jq”, 将其 ip-mode 从默

认的 range 改为 user-group config vpn ssl web portal

edit "full-access-jq"

set ip-mode user-group -----> 从默认的 range 改为 user-group

set ip-pools "10.10.68.32" -----> 当改为 user-group 并与对接的 radius 设置好后,sslvpn portals 下

的 ip-pools 不再生效

end

CNBJ-TAC-FG3HD (full-access-jq) # set ip-mode

range Use the IP addresses available for all SSL-VPN users as defined by the SSL settings command.

user-group Use IP the addresses associated with individual users or user groups (usually from external

auth servers).

Page 12: 域帐号使用 Forticlient 客户端 sslvpn 拨号后 如何通过 AD server … · 2020. 8. 8. · 域帐号使用Forticlient 客户端sslvpn 拨号后 如何通过AD server 获取固定IP

Fortinet 公司 第 12 页 / 共 14 页 www.fortinet.com.cn

SSLVPN setting 设置 中新建一个 users/groups 与 sslvpn portal 的

mapping

5. 测试结果

此时 fortiClient 拨号便可以使用 AD 里面为 user 预分配的固定 IP 地址

了。 CNBJ-TAC-FG3HD # di de app sslvpn -1

[187:root:2305]sslvpn_tunnel_handler,52, Calling rmt_conn_access_ex.

[187:root:2305]deconstruct_session_id:426 decode session id ok, user=[justinji],group=[Fortiad-

Lab],authserver=[FortiAD-lab],portal=[full-access-

jq],host=[192.168.118.33],realm=[],idx=0,auth=2,sid=7f5b4b01,login=1595319033,access=1595319033,sa

ml_logout_url=no

[187:root:2305]sslvpn_tunnel_handler,152, Calling tunnel.

[187:root:2305]tunnelEnter:434 0x7fc230eb8700:0x7fc231016800 sslvpn user[justinji],type 2,logintime 0

vd 0

[187:root:2305]sconn 0x7fc230eb8700 (0:root) vfid=0 local=[111.204.123.112] remote=[192.168.118.33]

dynamicip=[192.168.168.168]

[187:root:2305]Prepare to launch ppp service...

[187:root:2305]tun: ppp 0x7fc230fd9000 dev (ssl.root) opened fd 43

Page 13: 域帐号使用 Forticlient 客户端 sslvpn 拨号后 如何通过 AD server … · 2020. 8. 8. · 域帐号使用Forticlient 客户端sslvpn 拨号后 如何通过AD server 获取固定IP

Fortinet 公司 第 13 页 / 共 14 页 www.fortinet.com.cn

[187:root:2305]Will add auth policy for policy 129 for user justinji:Fortiad-Lab

[187:root:2305]Add auth logon for user justinji:Fortiad-Lab, matched group number 1

[187:root:0]RCV: LCP Configure_Request id(1) len(14) [Maximum_Received_Unit 1354] [Magic_Number

3974214F]

[187:root:0]SND: LCP Configure_Request id(1) len(10) [Magic_Number 8B79D21C]

[187:root:0]lcp_reqci: returning CONFACK.

[187:root:0]SND: LCP Configure_Ack id(1) len(14) [Maximum_Received_Unit 1354] [Magic_Number

3974214F]

[187:root:0]RCV: LCP Configure_Ack id(1) len(10) [Magic_Number 8B79D21C]

[187:root:0]lcp_up: with mtu 1354

[187:root:0]SND: IPCP Configure_Request id(1) [IP_Address 111.204.123.112]

[187:root:0]RCV: IPCP Configure_Request id(0) [IP_Address 0.0.0.0] [Primary_DNS_IP_Address 0.0.0.0]

[Secondary_DNS_IP_Address 0.0.0.0]

[187:root:0]ipcp: returning Configure-NAK

[187:root:0]SND: IPCP Configure_Nak id(0) [IP_Address 192.168.168.168] [Primary_DNS_IP_Address

192.168.118.1] [Secondary_DNS_IP_Address 114.114.114.114]

[187:root:0]RCV: IPCP Configure_Ack id(1) [IP_Address 111.204.123.112]

[187:root:0]RCV: IPCP Configure_Request id(1) [IP_Address 192.168.168.168] [Primary_DNS_IP_Address

192.168.118.1] [Secondary_DNS_IP_Address 114.114.114.114]

[187:root:0]ipcp: returning Configure-ACK

[187:root:0]SND: IPCP Configure_Ack id(1) [IP_Address 192.168.168.168] [Primary_DNS_IP_Address

192.168.118.1] [Secondary_DNS_IP_Address 114.114.114.114]

[187:root:0]ipcp: up ppp:0x7fc230fd9000 caller:0x7fc230eb8700 tun:43

[187:root:0]Cannot determine ethernet address for proxy ARP

[187:root:0]local IP address 111.204.123.112

[187:root:0]remote IP address 192.168.168.168

[187:root:2305]sslvpn_ppp_associate_fd_to_ipaddr:280 associate 192.168.168.168 to tun (ssl.root:43)

[187:root:2304]sslvpn_read_request_common,649, ret=-1 error=-1, sconn=0x7fc230eb8200.

[187:root:2304]Destroy sconn 0x7fc230eb8200, connSize=2. (root)

[187:root:2303]sslvpn_read_request_common,649, ret=-1 error=-1, sconn=0x7fc230eb5f00.

[187:root:2303]Destroy sconn 0x7fc230eb5f00, connSize=1. (root)

Page 14: 域帐号使用 Forticlient 客户端 sslvpn 拨号后 如何通过 AD server … · 2020. 8. 8. · 域帐号使用Forticlient 客户端sslvpn 拨号后 如何通过AD server 获取固定IP

Fortinet 公司 第 14 页 / 共 14 页 www.fortinet.com.cn

WireShark 下的抓包