逻辑系统的用户身份验证
逻辑系统的用户身份验证允许您定义防火墙用户并创建策略,要求用户通过两种身份验证方案之一(直通身份验证或 Web 身份验证)进行自身身份验证。有关更多信息,请参阅以下主题:
示例:配置访问配置文件(仅限主管理员)
主管理员负责在主逻辑系统中配置访问配置文件。此示例说明如何配置访问配置文件。
要求
开始之前:
以主管理员身份登录到主逻辑系统。请参阅 了解主要逻辑系统和主要管理员角色。
阅读 防火墙用户身份验证概述。
概述
此示例配置用于逻辑系统用户的 LDAP 身份验证的访问配置文件。此示例将创建 表 1 中描述的访问配置文件。
主管理员创建访问配置文件。
名字 |
配置参数 |
---|---|
ldap1 |
|
配置
程序
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层级的 [edit]
CLI 中,然后从配置模式进入 commit
。
您必须以主管理员身份登录。
set access profile ldap1 authentication-order ldap set access profile ldap1 ldap-options base-distinguished-name ou=people,dc=example,dc=com set access profile ldap1 ldap-options assemble common-name uid set access profile ldap1 ldap-server 10.155.26.104 port 389
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关如何操作的说明,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
在主逻辑系统中配置访问配置文件:
以主管理员身份登录主逻辑系统并进入配置模式。
admin@host> configure admin@host#
配置访问配置文件并设置身份验证顺序。
[edit access profile ldap1] admin@host# set authentication-order ldap
配置 LDAP 选项。
[edit access profile ldap1] admin@host# set ldap-options base-distinguished-name ou=people,dc=example,dc=com admin@host# set ldap-options assemble common-name uid
配置 LDAP 服务器。
[edit access profile ldap1] admin@host# set ldap-server 10.155.26.104 port 389
结果
在配置模式下,输入命令以确认 show access profile profile-name
您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。
admin@host# show access profile ldap1 authentication-order ldap; ldap-options { base-distinguished-name ou=people,dc=example,dc=com; assemble { common-name uid; } } ldap-server { 10.155.26.104 port 389; }
完成设备配置后,请从配置模式进入 commit
。
示例:为主逻辑系统配置安全功能
此示例说明如何为主逻辑系统配置安全功能,例如区域、策略和防火墙身份验证。
要求
开始之前:
-
以主管理员身份登录到主逻辑系统。请参阅 示例:为逻辑系统配置 root 密码。
-
show system security-profile
使用命令查看分配给主逻辑系统的资源。 -
为主逻辑系统配置逻辑接口。请参阅 示例:为主和互连逻辑系统配置接口、路由实例和静态路由,以及为用户逻辑系统配置逻辑隧道接口(仅限主管理员)。
-
在主逻辑系统中配置访问配置文件 ldap1。ldap1 访问配置文件用于防火墙用户的 Web 身份验证。
概述
在此示例中,您可以为称为 root 逻辑系统的主逻辑系统( 如示例:创建用户逻辑系统、管理员、用户和互连逻辑系统)配置安全功能。此示例配置 表 2 中描述的安全功能。
特征 |
名字 |
配置参数 |
---|---|---|
区 |
ls-root-trust |
绑定到接口 ge-0/0/4.0。 |
|
ls-root-untrust |
绑定到接口 lt-0/0/0.1 |
地址簿 |
根内部 |
|
|
根外部 |
|
安全策略 |
permit-to-userlsys |
允许以下流量:
|
|
允许授权用户 |
允许以下流量:
|
防火墙身份验证 |
|
|
HTTP 守护程序 |
|
在接口 ge-0/0/4.0 上激活 |
配置
程序
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层级的 [edit]
CLI 中,然后从配置模式进入 commit
。
set security address-book root-internal address masters 10.12.12.0/24 set security address-book root-internal attach zone ls-root-trust set security address-book root-external address design 10.12.1.0/24 set security address-book root-external address accounting 10.14.1.0/24 set security address-book root-external address marketing 10.13.1.0/24 set security address-book root-external address-set userlsys address design set security address-book root-external address-set userlsys address accounting set security address-book root-external address-set userlsys address marketing set security address-book root-external attach zone ls-root-untrust set security policies from-zone ls-root-trust to-zone ls-root-untrust policy permit-to-userlsys match source-address masters set security policies from-zone ls-root-trust to-zone ls-root-untrust policy permit-to-userlsys match destination-address userlsys set security policies from-zone ls-root-trust to-zone ls-root-untrust policy permit-to-userlsys match application any set security policies from-zone ls-root-trust to-zone ls-root-untrust policy permit-to-userlsys then permit set security policies from-zone ls-root-untrust to-zone ls-root-trust policy permit-authorized-users match source-address userlsys set security policies from-zone ls-root-untrust to-zone ls-root-trust policy permit-authorized-users match destination-address masters set security policies from-zone ls-root-untrust to-zone ls-root-trust policy permit-authorized-users match application junos-http set security policies from-zone ls-root-untrust to-zone ls-root-trust policy permit-authorized-users match application junos-https set security policies from-zone ls-root-untrust to-zone ls-root-trust policy permit-authorized-users then permit firewall-authentication web-authentication set security zones security-zone ls-root-trust interfaces ge-0/0/4.0 set security zones security-zone ls-root-untrust interfaces lt-0/0/0.1 set system services web-management http interface ge-0/0/4.0 set access firewall-authentication web-authentication default-profile ldap1 set access firewall-authentication web-authentication banner success "WEB AUTH LOGIN SUCCESS"
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关如何操作的说明,请参阅 Junos OS CLI 用户指南 中的在配置模式下使用 CLI 编辑器 。
要为主逻辑系统配置区域和策略:
-
以主管理员身份登录主逻辑系统并进入配置模式。
admin@host> configure admin@host#
-
创建安全区域并将接口分配给每个区域。
[edit security zones] admin@host# set security-zone ls-root-trust interfaces ge-0/0/4.0 admin@host# set security-zone ls-root-untrust interfaces lt-0/0/0.1
-
创建通讯簿条目。
[edit security] admin@host# set address-book root-internal address masters 10.12.12.0/24 admin@host# set address-book root-external address design 10.12.1.0/24 admin@host# set address-book root-external address accounting 10.14.1.0/24 admin@host# set address-book root-external address marketing 10.13.1.0/24 admin@host# set address-book root-external address-set userlsys address design admin@host# set address-book root-external address-set userlsys address accounting admin@host# set address-book root-external address-set userlsys address marketing
-
将通讯簿附加到区域。
[edit security] admin@host# set address-book root-internal attach zone ls-root-trust admin@host# set address-book root-external attach zone ls-root-untrust
-
配置安全策略,以允许从 ls-root-trust 区域到 ls-root-untrust 区域的流量。
[edit security policies from-zone ls-root-trust to-zone ls-root-untrust] admin@host# set policy permit-to-userlsys match source-address masters admin@host# set policy permit-to-userlsys match destination-address userlsys admin@host# set policy permit-to-userlsys match application any admin@host# set policy permit-to-userlsys then permit
-
配置安全策略,用于验证从 ls-root-untrust 区域到 ls-root-trust 区域的流量。
[edit security policies from-zone ls-root-untrust to-zone ls-root-trust] admin@host# set policy permit-authorized-users match source-address userlsys admin@host# set policy permit-authorized-users match destination-address masters admin@host# set policy permit-authorized-users match application junos-http admin@host# set policy permit-authorized-users match application junos-https admin@host# set policy permit-authorized-users then permit firewall-authentication web-authentication
-
配置 Web 身份验证访问配置文件并定义成功横幅。
[edit access] admin@host# set firewall-authentication web-authentication default-profile ldap1 admin@host# set firewall-authentication web-authentication banner success “WEB AUTH LOGIN SUCCESS”
-
激活设备上的 HTTP 守护程序。
[edit system] admin@host# set services web-management http interface ge-0/0/4.0
结果
在配置模式下,输入 、 show access
和show system services
命令,show security
以确认您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。
为简洁起想,此命令 show
输出仅包含与此示例相关的配置。系统上的任何其他配置都已替换为椭圆 (...)。
[edit] admin@host# show security ... address-book { root-internal { address masters 10.12.12.0/24; attach { zone ls-root-trust; } } root-external { address design 10.12.1.0/24; address accounting 10.14.1.0/24; address marketing 10.13.1.0/24; address-set userlsys { address design; address accounting; address marketing; } attach { zone ls-root-untrust; } } } policies { from-zone ls-root-trust to-zone ls-root-untrust { policy permit-to-userlsys { match { source-address masters; destination-address userlsys; application any; } then { permit; } } } from-zone ls-root-untrust to-zone ls-root-trust { policy permit-authorized-users { match { source-address userlsys; destination-address masters; application [ junos-http junos-https ]; } then { permit { firewall-authentication { web-authentication; } } } } } } zones { security-zone ls-root-trust { interfaces { ge-0/0/4.0; } } security-zone ls-root-untrust { interfaces { lt-0/0/0.1; } } } [edit] admin@host# show access ... firewall-authentication { web-authentication { default-profile ldap1; banner { success "WEB AUTH LOGIN SUCCESS"; } } } [edit] admin@host# show system services web-management { http { interface ge-0/0/4.0; } }
完成设备配置后,请从配置模式进入 commit
。
了解逻辑系统防火墙身份验证
防火墙用户是指在跨防火墙启动连接时必须提供用于身份验证的用户名和密码的网络用户。Junos OS 使管理员能够根据源 IP 地址和其他凭据限制和允许防火墙用户访问防火墙后面的受保护资源(不同区域)。
主管理员负责在主逻辑系统中配置访问配置文件。访问配置文件存储用户的用户名和密码,或者指向存储此类信息的外部身份验证服务器。所有用户逻辑系统都可使用在主逻辑系统上配置的访问配置文件。
主管理员为每个用户逻辑系统配置防火墙身份验证的最大和保留数。然后,用户逻辑系统管理员可以在用户逻辑系统中创建防火墙身份验证。用户逻辑系统管理员可以在用户逻辑系统中使用 show system security-profile auth-entry
命令查看分配给用户逻辑系统的身份验证资源数量。
要配置访问配置文件,主管理员在profile
主逻辑系统的 [edit access
] 层次结构级别使用配置语句。访问配置文件还可以包括身份验证方法顺序、LDAP 或 RADIUS 服务器选项以及会话选项。
然后,用户逻辑系统管理员可以将访问配置文件与用户逻辑系统中的安全策略相关联。用户逻辑系统管理员还会指定身份验证类型:
使用直通身份验证,一个区域的主机或用户会尝试使用 FTP、telnet 或 HTTP 客户端访问另一个区域的资源。设备使用 FTP、Telnet 或 HTTP 收集用户名和密码信息,并且会根据此身份验证结果允许或拒绝来自用户或主机的后续流量。
使用 Web 身份验证,用户使用 HTTP 连接到启用了 Web 身份验证并提示输入用户名和密码的设备上的 IP 地址。根据此身份验证结果,会允许或拒绝来自用户或主机的后续流量到受保护资源。
用户逻辑系统管理员为用户逻辑系统中的防火墙身份验证配置以下属性:
为匹配流量指定防火墙身份验证的安全策略。防火墙身份验证使用
firewall-authentication
[edit security policies from-zone zone-name to-zone zone-name policy policy-name then permit
] 层次结构级别的配置语句指定。访问配置文件中策略允许访问的用户或用户组可以选择使用客户端匹配配置语句指定。(如果未指定任何用户或用户组,则允许任何成功通过身份验证的用户进行访问。)
对于直通身份验证,可以选择指定访问配置文件并启用 Web 重定向(将客户端系统重定向到网页进行身份验证)。
身份验证类型(直通或 Web 身份验证)、默认访问配置文件以及 FTP、Telnet 或 HTTP 会话的成功横幅。这些属性在 [
edit access
] 层次结构级别使用firewall-authentication
配置语句进行配置。托管入站流量。允许协议、服务或两者同时访问逻辑系统。流量类型在 [] 或 [
edit security zones security-zone zone-name
edit security zones security-zone zone-name interfaces interface-name
] 层次结构级别使用host-inbound-traffic
配置语句配置。
用户逻辑系统管理员可以在用户逻辑系统中使用 show security firewall-authentication users
or show security firewall-authentication history
命令查看有关防火墙用户和用户逻辑系统历史记录的信息。在主逻辑系统中,主管理员可以使用相同的命令查看主逻辑系统、特定用户逻辑系统或所有逻辑系统的信息。
另请参阅
示例:为用户逻辑系统配置防火墙身份验证
此示例说明如何为用户逻辑系统配置防火墙身份验证。
要求
开始之前:
以逻辑系统管理员身份登录到用户逻辑系统。请参阅 用户逻辑系统配置概述。
show system security-profiles auth-entry
使用命令查看分配给逻辑系统的防火墙身份验证条目。主管理员必须在主逻辑系统中配置访问配置文件。
概述
此示例配置 示例:创建用户逻辑系统、管理员、用户和互连逻辑系统中显示的 ls-product 设计用户逻辑系统。
在此示例中,当将某些连接启动到产品设计人员子网时,需要 ls-marketing-dept 和 ls-accounting-dept 逻辑系统中的用户进行身份验证。此示例配置 表 3 中描述的防火墙身份验证。
此示例使用 在示例:为用户逻辑系统配置安全区域中配置的访问配置文件和地址簿条目。
特征 |
名字 |
配置参数 |
---|---|---|
安全策略 |
允许授权用户
注意:
按配置策略的顺序执行策略查找。使用与流量匹配的第一个策略。如果您之前配置过允许同一区域、到区域、源地址和目标地址的流量的策略,但对于应用程序 |
允许针对以下流量进行防火墙身份验证:
ldap1 访问配置文件用于直通身份验证。 |
防火墙身份验证 |
|
|
配置
程序
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层级的 [edit]
CLI 中,然后从配置模式进入 commit
。
set security policies from-zone ls-product-design-untrust to-zone ls-product-design-trust policy permit-authorized-users match source-address otherlsys set security policies from-zone ls-product-design-untrust to-zone ls-product-design-trust policy permit-authorized-users match destination-address product-designers set security policies from-zone ls-product-design-untrust to-zone ls-product-design-trust policy permit-authorized-users match application junos-h323 set security policies from-zone ls-product-design-untrust to-zone ls-product-design-trust policy permit-authorized-users then permit firewall-authentication pass-through access-profile ldap1 set access firewall-authentication pass-through default-profile ldap1 set access firewall-authentication pass-through http banner login “welcome”
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关如何操作的说明,请参阅 Junos OS CLI 用户指南 中的在配置模式下使用 CLI 编辑器 。
在用户逻辑系统中配置防火墙身份验证:
以逻辑系统管理员身份登录用户逻辑系统并进入配置模式。
lsdesignadmin1@host:ls-product-design> configure lsdesignadmin1@host:ls-product-design#
配置允许防火墙身份验证的安全策略。
[edit security policies from-zone ls-product-design-untrust to-zone ls-product-design-trust] lsdesignadmin1@host:ls-product-design# set policy permit-authorized-users match source-address otherlsys lsdesignadmin1@host:ls-product-design# set policy permit-authorized-users match destination -address product-designers lsdesignadmin1@host:ls-product-design# set policy permit-authorized-users match application junos-h323 lsdesignadmin1@host:ls-product-design# set policy permit-authorized-users then permit firewall-authentication pass-through access-profile ldap1
重新对安全策略进行订购。
[edit] lsdesignadmin1@host:ls-product-design# insert security policies from-zone ls-product-design-untrust to-zone ls-product-design-trust policy permit-authorized-users before policy permit-all-from-otherlsys
配置防火墙身份验证。
[edit access firewall-authentication] lsdesignadmin1@host:ls-product-design# set pass-through http banner login "welcome" lsdesignadmin1@host:ls-product-design# set pass-through default-profile ldap1
结果
在配置模式下,输入和 show access firewall-authentication
命令以确认show security policies
您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。
lsdesignadmin1@host:ls-product-design# show security policies from-zone ls-product-design-trust to-zone ls-product-design-untrust { policy permit-all-to-otherlsys { match { source-address product-designers; destination-address otherlsys; application any; } then { permit; } } } from-zone ls-product-design-untrust to-zone ls-product-design-trust { policy permit-authorized-users { match { source-address otherlsys; destination-address product-designers; application junos-h323; } then { permit { firewall-authentication { pass-through { access-profile ldap1; } } } } } policy permit-all-from-otherlsys { match { source-address otherlsys; destination-address product-designers; application any; } then { permit; } } } lsdesignadmin1@host:ls-product-design# show access firewall-authentication pass-through { default-profile ldap1; http { banner { login welcome; } } }
完成设备配置后,请从配置模式进入 commit
。
验证
要确认配置工作正常,请执行以下任务:
验证防火墙用户身份验证以及监控用户和 IP 地址
目的
显示防火墙身份验证用户历史记录,并验证成功身份验证的防火墙用户和登录失败的防火墙用户的数量。
行动
在操作模式下,输入以下命令 show
。
lsdesignadmin1@host:ls-product-design> show security firewall-authentication history lsdesignadmin1@host:ls-product-design> show security firewall-authentication history identifier id lsdesignadmin1@host:ls-product-design> show security firewall-authentication users lsdesignadmin1@host:ls-product-design> show security firewall-authentication users identifier id
了解逻辑系统中的集成用户防火墙支持
从 Junos OS 18.3R1 版开始,除了对身份验证源瞻博网络身份管理服务 (JIMS) 和 ClearPass 身份验证的现有支持外,还扩展了对身份验证源的支持,包括本地身份验证、Active Directory (AD) 身份验证和防火墙身份验证。
从 Junos OS 18.2R1 版开始,使用共享模型增强了对用户防火墙身份验证的支持。在此模型中,用户逻辑系统与主逻辑系统共享用户防火墙配置和身份验证条目,用户逻辑系统中支持集成用户防火墙身份验证。
在共享模型中,用户防火墙相关配置在主逻辑系统下配置,例如身份验证源、身份验证源优先级、认证条目超时以及 IP 查询或个人查询等。用户防火墙为 SRX 系列防火墙中的应用程序提供用户信息服务,例如策略和日志记录。来自用户逻辑系统的流量对主逻辑系统的身份验证表进行查询。
认证表由主逻辑系统管理。用户逻辑系统共享身份验证表。来自主逻辑系统和用户逻辑系统的流量查询同一认证表。用户逻辑系统支持在安全策略中使用源身份。
例如,如果主逻辑系统配置了 员工 ,而用户逻辑系统配置了源身份 管理器,则此身份验证条目的参考组包括 员工 和 管理器。此参考组包含来自主逻辑系统和用户逻辑系统的相同身份验证条目。
从 Junos OS 19.3R1 版开始,通过集成有源模式的 JIMS 使用自定义模型,增强了对用户防火墙身份验证的支持。在此模型中,逻辑系统从根级别提取身份验证条目。根据逻辑系统和租户系统名称,将主逻辑系统配置为 JIMS 服务器。在活动模式下,SRX 系列防火墙会主动查询通过 HTTPs 协议从 JIMS 服务器收到的正版条目。为了减少数据交换,我们应用了防火墙过滤器。
用户防火墙使用逻辑系统名称作为差异化因素,JIMS 服务器和 SRX 系列防火墙之间保持一致。JIMS 服务器发送身份验证条目中包含的差异化因素。当区分符设置为主逻辑系统的默认时,身份验证条目会分发到根逻辑系统中。
用户防火墙支持逻辑系统的不中断服务的软件升级 (ISSU),因为用户防火墙从 Junos OS 19.2R1 版开始更改内部数据库表格式。在 Junos OS 19.2R1 版之前,逻辑系统不支持 ISSU。
使用用户防火墙身份验证的限制
在租户系统上使用用户防火墙身份验证有以下限制:
JIMS 服务器会根据来自客户网络的 IP 地址收集身份验证条目。如果 IP 地址重叠,则当用户使用不同用户逻辑系统登录时,身份验证条目将发生变化。
在逻辑系统上的自定义模型中使用用户防火墙身份验证的限制
在逻辑系统上的自定义模型中使用用户防火墙身份验证有以下限制:
在根逻辑系统下配置的 JIMS 服务器配置。
JIMS 服务器和 SRX 系列防火墙之间的逻辑系统名称应一致且唯一。
另请参阅
示例:为用户逻辑系统配置集成用户防火墙识别管理
此示例说明如何配置 SRX 系列防火墙的高级查询功能,以便从瞻博网络身份管理服务 (JIMS) 获取用户身份信息,以及与用户逻辑系统的源身份匹配的安全策略。在根逻辑系统中,用户防火墙配置了 JIMS,然后根逻辑系统管理来自 JIMS 的所有身份验证条目。在此示例中,所有用户逻辑系统都与根逻辑系统共享其身份验证条目。
要求
此示例使用以下硬件和软件组件:
在机箱群集中运行的SRX1500设备
JIMS 服务器
Junos OS 18.2 R1 版
开始之前:
以逻辑系统管理员身份登录到用户逻辑系统。请参阅 用户逻辑系统概述
配置用户逻辑系统 lsys1 和 lsys2。请参阅 示例:配置用户逻辑系统
在主逻辑系统上配置安全配置文件,并将其分配给用户逻辑系统 lsys1 和 lsys2。请参阅 示例:配置逻辑系统安全配置文件(仅限主管理员)
在逻辑系统根逻辑系统、用户逻辑系统 lsys1 和 lsys2 上配置接口和路由选项。请参阅 示例:为主和互连逻辑系统配置接口、路由实例和静态路由,为用户逻辑系统配置逻辑隧道接口(仅限主管理员) 和 示例:为用户逻辑系统配置接口和路由实例
为用户逻辑系统配置安全策略。请参阅 示例:在用户逻辑系统中配置安全策略
为用户逻辑系统配置区域。请参阅 示例:为用户逻辑系统配置安全区域
在基本的主动/被动机箱群集中配置逻辑系统。请参阅 示例:在主动/被动机箱群集中配置逻辑系统(仅限主管理员)
概述
在此示例中,您可以在端口 443 和主服务器上配置 HTTPs 连接,在主逻辑系统上使用 IPv4 地址配置 JIMS,在逻辑系统 lsys1 上配置具有 dc0 域的源身份“group1”的策略 p1,在逻辑系统 lsys2 上配置带有 dc0 域的源身份“group1”的策略 p1,以及将流量从逻辑系统 lsys1 发送到逻辑系统 lsys2。即使在重新启动主节点之后,您也可以查看主逻辑系统和用户逻辑系统(lsys1 和 lsys2)上的身份验证条目。
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层级的 [edit]
CLI 中,然后从配置模式进入 commit
。
set logical-systems lsys1 security policies from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 match source-address any set logical-systems lsys1 security policies from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 match destination-address any set logical-systems lsys1 security policies from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 match application any set logical-systems lsys1 security policies from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 then permit set logical-systems lsys1 security policies from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 match source-identity "example.com\group1" set logical-systems lsys1 security policies from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 then permit set logical-systems lsys1 security policies from-zone lsys1_trust to-zone lsys1_untrust policy lsys1_policy2 match source-address any set logical-systems lsys1 security policies from-zone lsys1_trust to-zone lsys1_untrust policy lsys1_policy2 match destination-address any set logical-systems lsys1 security policies from-zone lsys1_trust to-zone lsys1_untrust policy lsys1_policy2 match application any set logical-systems lsys1 security policies from-zone lsys1_trust to-zone lsys1_untrust policy lsys1_policy2 then permit set logical-systems lsys1 security policies from-zone lsys1_untrust to-zone lsys1_trust policy lsys1_policy3 match source-address any set logical-systems lsys1 security policies from-zone lsys1_untrust to-zone lsys1_trust policy lsys1_policy3 match destination-address any set logical-systems lsys1 security policies from-zone lsys1_untrust to-zone lsys1_trust policy lsys1_policy3 match application any set logical-systems lsys1 security policies from-zone lsys1_untrust to-zone lsys1_trust policy lsys1_policy3 then permit set logical-systems lsys1 security policies policy-rematch set logical-systems lsys2 security policies from-zone lsys2_untrust to-zone lsys2_untrust policy lsys2_policy1 match source-address any set logical-systems lsys2 security policies from-zone lsys2_untrust to-zone lsys2_untrust policy lsys2_policy1 match destination-address any set logical-systems lsys2 security policies from-zone lsys2_untrust to-zone lsys2_untrust policy lsys2_policy1 match application any set logical-systems lsys2 security policies from-zone lsys2_untrust to-zone lsys2_untrust policy lsys2_policy1 match source-identity "example.com\group2" set logical-systems lsys2 security policies from-zone lsys2_untrust to-zone lsys2_untrust policy lsys2_policy1 then permit set logical-systems lsys2 security policies policy-rematch set services user-identification identity-management connection connect-method https set services user-identification identity-management connection port 443 set services user-identification identity-management connection primary address 192.0.2.5 set services user-identification identity-management connection primary client-id otest set services user-identification identity-management connection primary client-secret "$ABC123" set security policies from-zone root_trust to-zone root_trust policy root_policy1 match source-address any set security policies from-zone root_trust to-zone root_trust policy root_policy1 match destination-address any set security policies from-zone root_trust to-zone root_trust policy root_policy1 match application any set security policies from-zone root_trust to-zone root_trust policy root_policy1 then permit set security policies policy-rematch set security zones security-zone root_trust interfaces reth1.0 host-inbound-traffic system-services all set security zones security-zone root_trust interfaces reth1.0 host-inbound-traffic protocols all set security zones security-zone root_trust interfaces lt-0/0/0.1 host-inbound-traffic system-services all set security zones security-zone root_trust interfaces lt-0/0/0.1 host-inbound-traffic protocols all set firewall family inet filter impair-ldap term allow_all then accept
配置用户防火墙识别管理
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关如何操作的说明,请参阅 Junos OS CLI 用户指南 中的在配置模式下使用 CLI 编辑器 。
要配置用户防火墙识别管理,
以主管理员身份登录主逻辑系统并进入配置模式。
user@host> configure user@host#
创建逻辑系统。
[edit logical-systems] user@host#set LSYS0 user@host#set LSYS1 user@host#set LSYS2
在逻辑系统 lsys1 上配置带有源身份组1 的安全策略lsys1_policy1,以允许lsys1_trust流量lsys1_trust。
[edit security policies] user@host#set from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 match source-address any user@host#set from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 match destination-address any user@host#set from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 match application any user@host#set from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 match source-identity "example.com\group1" user@host#set from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 then permit
配置允许lsys1_trust lsys1_untrust流量的安全策略lsys1_policy2。
[edit security policies] user@host#set from-zone lsys1_trust to-zone lsys1_untrust policy lsys1_policy2 match source-address any user@host#set from-zone lsys1_trust to-zone lsys1_untrust policy lsys1_policy2 match destination-address any user@host#set from-zone lsys1_trust to-zone lsys1_untrust policy lsys1_policy2 match application any user@host#set from-zone lsys1_trust to-zone lsys1_untrust policy lsys1_policy2 then permit
配置允许lsys1_untrust lsys1_trust流量的安全策略lsys1_policy3。
[edit security policies] user@host#set from-zone lsys1_untrust to-zone lsys1_trust policy lsys1_policy3 match source-address any user@host#set from-zone lsys1_untrust to-zone lsys1_trust policy lsys1_policy3 match destination-address any user@host#set from-zone lsys1_untrust to-zone lsys1_trust policy lsys1_policy3 match application any user@host#set from-zone lsys1_untrust to-zone lsys1_trust policy lsys1_policy3 then permit user@host#set policy-rematch
配置安全区域并将接口分配给每个区域。
[edit security zones] user@host#set security-zone lsys1_trust interfaces reth2.0 host-inbound-traffic system-services all user@host#set security-zone lsys1_trust interfaces reth2.0 host-inbound-traffic protocols all user@host#set security-zone lsys1_trust interfaces lt-0/0/0.11 host-inbound-traffic system-services all user@host#set security-zone lsys1_trust interfaces lt-0/0/0.11 host-inbound-traffic protocols all user@host#set security-zone lsys1_untrust interfaces reth3.0 host-inbound-traffic system-services all user@host#set security-zone lsys1_untrust interfaces reth3.0 host-inbound-traffic protocols all
使用源身份组 1 配置安全策略lsys2_policy1,以允许lsys2_untrust流量在 lsys2 上lsys2_untrust。
[edit security policies] user@host#set from-zone lsys2_untrust to-zone lsys2_untrust policy lsys2_policy1 match source-address any user@host#set from-zone lsys2_untrust to-zone lsys2_untrust policy lsys2_policy1 match destination-address any user@host#set from-zone lsys2_untrust to-zone lsys2_untrust policy lsys2_policy1 match application any user@host#set from-zone lsys2_untrust to-zone lsys2_untrust policy lsys2_policy1 match source-identity "example.com\group2" user@host#set from-zone lsys2_untrust to-zone lsys2_untrust policy lsys2_policy1 then permit user@host#set policy-rematch
配置安全区域并将接口分配给 lsys2 上的每个区域。
[edit security zones] user@host#set security-zone lsys2_untrust interfaces reth4.0 host-inbound-traffic system-services all user@host#set security-zone lsys2_untrust interfaces reth4.0 host-inbound-traffic protocols all user@host#set security-zone lsys2_untrust interfaces lt-0/0/0.21 host-inbound-traffic system-services all user@host#set security-zone lsys2_untrust interfaces lt-0/0/0.21 host-inbound-traffic protocols all
-
将 JIMS 配置为使用主地址的高级查询请求的身份验证源。SRX 系列防火墙需要此信息与服务器联系。
[edit services user-identification identity-management] user@host#set connection port 443 user@host#set connection connect-method https user@host#set connection primary address 192.0.2.5 user@host#set connection primary client-id otest user@host#set connection primary client-secret test user@host#set authentication-entry-timeout 0
在主逻辑系统上配置安全策略和区域。
[edit security policies] user@host#set from-zone root_trust to-zone root_trust policy root_policy1 match source-address any user@host#set from-zone root_trust to-zone root_trust policy root_policy1 match destination-address any user@host#set from-zone root_trust to-zone root_trust policy root_policy1 match application any user@host#set from-zone root_trust to-zone root_trust policy root_policy1 then permit user@host#set policy-rematch
配置安全区域并将接口分配给主逻辑系统上的每个区域。
[edit security zones] user@host#set security-zone root_trust interfaces reth1.0 host-inbound-traffic system-services all user@host#set security-zone root_trust interfaces reth1.0 host-inbound-traffic protocols all user@host#set security-zone root_trust interfaces lt-0/0/0.1 host-inbound-traffic system-services all user@host#set security-zone root_trust interfaces lt-0/0/0.1 host-inbound-traffic protocols all user@host#set firewall family inet filter impair-ldap term allow_all then accept
结果
在配置模式下,输入命令以确认show services user-identification identity-management
show chassis cluster
您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。
user@host# show services user-identification identity-management connection { connect-method https; port 443; primary { address 192.0.2.5; client-id otest; client-secret "$ABC123"; ## SECRET-DATA } }
user@host# show chassis cluster reth-count 5; control-ports { fpc 3 port 0; fpc 9 port 0; } redundancy-group 0 { node 0 priority 200; node 1 priority 1; } redundancy-group 1 { node 0 priority 100; node 1 priority 1; } redundancy-group 2 { node 0 priority 100; node 1 priority 1; } redundancy-group 3 { node 0 priority 100; node 1 priority 1; } redundancy-group 4 { node 0 priority 100; node 1 priority 1; }
完成设备配置后,请从配置模式进入 commit
。
验证
要确认配置工作正常,请执行以下任务:
验证机箱群集状态和身份验证条目
目的
验证逻辑系统中的身份验证条目。
行动
要验证配置是否工作正常,请输入 show services user-identification authentication-table authentication-source identity-management logical-system all
命令。
user@host> show services user-identification authentication-table authentication-source identity-management logical-system all
node0:
--------------------------------------------------------------------------
Logical System: root-logical-system
Domain: ad2012.jims.com
Total entries: 3
Source IP Username groups(Ref by policy) state
2001:db8:aaaa: N/A Valid
2001:db8:aaaa: administrator Valid
203.0.113.50 administrator Valid
node1:
--------------------------------------------------------------------------
Logical System: root-logical-system
Domain: ad2012.jims.com
Total entries: 3
Source IP Username groups(Ref by policy) state
2001:db8:aaaa: N/A Valid
2001:db8:aaaa: administrator Valid
203.0.113.50 administrator Valid
意义
输出显示从用户逻辑系统到根逻辑系统共享的身份验证条目。
验证机箱群集状态
目的
重新启动主节点后验证机箱群集状态。
行动
要验证配置是否工作正常,请输入 show chassis cluster status
命令。
user@host> show chassis cluster status
Monitor Failure codes:
CS Cold Sync monitoring FL Fabric Connection monitoring
GR GRES monitoring HW Hardware monitoring
IF Interface monitoring IP IP monitoring
LB Loopback monitoring MB Mbuf monitoring
NH Nexthop monitoring NP NPC monitoring
SP SPU monitoring SM Schedule monitoring
CF Config Sync monitoring RE Relinquish monitoring
Cluster ID: 6
Node Priority Status Preempt Manual Monitor-failures
Redundancy group: 0 , Failover count: 0
node0 200 hold no no None
node1 1 secondary no no None
Redundancy group: 1 , Failover count: 0
node0 0 hold no no CS
node1 1 secondary no no None
Redundancy group: 2 , Failover count: 0
node0 0 hold no no CS
node1 1 secondary no no None
Redundancy group: 3 , Failover count: 0
node0 0 hold no no CS
node1 1 secondary no no None
Redundancy group: 4 , Failover count: 0
node0 0 hold no no CS
node1 1 secondary no no None
意义
输出显示重新启动主节点后 lsys1 和 lsys2 上现有的用户识别管理会话。
示例:在自定义模型中为逻辑系统配置集成用户防火墙
此示例说明如何通过具有逻辑系统活动模式的瞻博网络身份管理服务 (JIMS) 服务器使用自定义模型来配置集成用户防火墙。主逻辑系统不会与逻辑系统共享身份验证条目。SRX 系列防火墙在主动模式下通过 HTTPs 协议查询从 JIMS 服务器收到的身份验证条目。
在此示例中,将执行以下配置:
-
活动 JIMS 服务器配置
-
逻辑系统 IP 查询配置
-
逻辑系统身份验证条目配置
-
逻辑系统安全策略配置
要求
此示例使用以下硬件和软件组件:
-
JIMS 服务器 2.0 版
-
Junos OS 19.3R1 版
开始之前,请确保您有以下信息:
-
JIMS 服务器的 IP 地址。
-
JIMS 服务器上用于接收 HTTPs 请求的端口号。
-
来自活动查询服务器的 JIMS 服务器的客户端 ID。
-
来自 JIMS 服务器的客户端密钥,用于活动查询服务器。
概述
在此示例中,您可以将 JIMS 配置为端口 443 和主服务器(在主逻辑系统上使用 IPv4 地址)上的 HTTPs 连接,在逻辑系统上LSYS1
配置带有源身份group1
的策略 p2。
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到 [edit] 层次结构级别的 CLI 中,然后从配置模式进入提交。
set services user-identification logical-domain-identity-management active query-server jims1 connection connect-method https set services user-identification logical-domain-identity-management active query-server jims1 connection port 443 set services user-identification logical-domain-identity-management active query-server jims1 connection primary address 192.0.2.5 set services user-identification logical-domain-identity-management active query-server jims1 connection primary client-id otest set services user-identification logical-domain-identity-management active query-server jims1 connection primary client-secret "$ABC123" set logical-systems LSYS1 services user-identification logical-domain-identity-management active ip-query query-delay-time 30 set logical-systems LSYS1 services user-identification logical-domain-identity-management active invalid-authentication-entry-timeout 1 set logical-systems LSYS1 security policies from-zone untrust to-zone trust policy p2 match source-address any set logical-systems LSYS1 security policies from-zone untrust to-zone trust policy p2 match destination-address any set logical-systems LSYS1 security policies from-zone untrust to-zone trust policy p2 match application any set logical-systems LSYS1 security policies from-zone untrust to-zone trust policy p2 match source-identity "example.com\group1" set logical-systems LSYS1 security policies from-zone untrust to-zone trust policy p2 then permit
在自定义模型中配置集成用户防火墙:
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关如何操作的说明,请参阅 Junos OS CLI 用户指南 中的在配置模式下使用 CLI 编辑器 。
要以自定义模式配置集成用户防火墙,
-
将 JIMS 配置为使用主地址的高级查询请求的身份验证源。SRX 系列防火墙需要此信息与服务器联系。
user@host# set services user-identification logical-domain-identity-management active query-server jims1 connection connect-method https user@host# set services user-identification logical-domain-identity-management active query-server jims1 connection port 443 user@host# set services user-identification logical-domain-identity-management active query-server jims1 connection primary address 192.0.2.5 user@host# set services user-identification logical-domain-identity-management active query-server jims1 connection primary client-id otest user@host# set services user-identification logical-domain-identity-management active query-server jims1 connection primary client-secret "$ABC123"
-
为 LSYS1 配置 IP 查询延迟时间。
user@host# set logical-systems LSYS1 services user-identification logical-domain-identity-management active ip-query query-delay-time 30
-
配置 LSYS1 的身份验证条目属性。
user@host# set logical-systems LSYS1 services user-identification logical-domain-identity-management active invalid-authentication-entry-timeout 1
-
配置安全策略 p2,允许 LSYS1 不信任区域到区域信任的流量。
user@host# set logical-systems LSYS1 security policies from-zone untrust to-zone trust policy p2 match source-address any user@host# set logical-systems LSYS1 security policies from-zone untrust to-zone trust policy p2 match destination-address any user@host# set logical-systems LSYS1 security policies from-zone untrust to-zone trust policy p2 match application any user@host# set logical-systems LSYS1 security policies from-zone untrust to-zone trust policy p2 match source-identity "example.com\group1" user@host#set logical-systems LSYS1 security policies from-zone untrust to-zone trust policy p2 then permit
结果
在配置模式下,输入和 show logical-systems LSYS1
命令以确认show services user-identification logical-domain-identity-management
您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。
user@host# show services user-identification logical-domain-identity-management active { query-server jims1 { connection { connect-method https; port 443; primary { address 192.0.2.5; client-id otest; client-secret "$ABC123"; ## SECRET-DATA } } } }
user@host# show logical-systems LSYS1 security { policies { from-zone untrust to-zone trust { policy p2 { match { source-address any; destination-address any; application any; source-identity "example.com\group1"; } then { permit; } } } } } services { user-identification { logical-domain-identity-management { active { invalid-authentication-entry-timeout 1; ip-query { query-delay-time 30; } } } } }
完成设备配置后,请从配置模式进入 commit
。
验证
验证用户标识身份管理状态
目的
将身份管理验证为身份验证源的用户识别状态。
行动
要验证配置是否工作正常,请输入 show services user-identification logical-domain-identity-management status
命令。
user@host> show services user-identification logical-domain-identity-management status node0: -------------------------------------------------------------------------- Query server name :jims1 Primary server : Address : 192.0.2.5 Port : 443 Connection method : HTTPS Connection status : Online Last received status message : OK (200) Access token : isdHIbl8BXwxFftMRubGVsELRukYXtW3rtKmHiL Token expire time : 2017-11-27 23:45:22 Secondary server : Address : Not configured
意义
输出显示有关高级用户查询功能批次查询和 IP 查询的统计数据,或显示瞻博网络身份管理服务服务器上的状态。
验证用户标识身份管理状态计数器
目的
验证作为身份验证源进行身份管理的用户识别计数器。
行动
要验证配置是否工作正常,请输入 show services user-identification logical-domain-identity-management counters
命令。
user@host> show services user-identification logical-domain-identity-management counters node0: -------------------------------------------------------------------------- Query server name :jims1 Primary server : Address : 192.0.2.5 Batch query sent number : 65381 Batch query total response number : 64930 Batch query error response number : 38 Batch query last response time : 2018-08-14 15:10:52 IP query sent number : 10 IP query total response number : 10 IP query error response number : 0 IP query last response time : 2018-08-13 12:41:56 Secondary server : Address : Not configured
意义
输出显示有关高级用户查询功能批次查询和 IP 查询的统计数据,或显示瞻博网络身份管理服务服务器上的计数器。
验证用户标识认证表
目的
验证指定身份验证源的用户身份信息身份验证表条目。
行动
要验证配置是否工作正常,请输入 show services user-identification authentication-table authentication-source all logical-system LSYS1
命令。
user@host> show services user-identification authentication-table authentication-source all logical-system LSYS1 node0: -------------------------------------------------------------------------- Logical System: LSYS1 Domain: example.com Total entries: 4 Source IP Username groups(Ref by policy) state 10.12.0.2 administrator posture-healthy Valid 10.12.0.15 administrator posture-healthy Valid 2001:db8::5 N/A posture-healthy Valid 2001:db8::342c:302b N/A posture-healthy Valid
意义
输出根据用户名显示指定身份验证源的身份验证表或者特定域、组或用户的全部内容。根据用户设备的 IP 地址显示用户的身份信息。