逻辑系统中的安全区域
安全区域是策略的构建块。安全区域是一个或多个接口绑定的逻辑实体,可通过一种方法将主机组(用户逻辑系统和其他主机,如服务器)资源与另一个主机区分开来,以便应用不同的安全措施。有关更多信息,请参阅以下主题:
了解逻辑系统区域
安全区域是一个或多个接口绑定的逻辑实体。安全区域可由主逻辑系统上由主管理员配置,也可由用户逻辑系统管理员在用户逻辑系统上配置。在逻辑系统上,管理员可以配置多个安全区域,将网络划分为多个网段,以便对其应用各种安全选项。
主管理员为每个用户逻辑系统配置安全区域的最大和保留数量。然后,用户逻辑系统管理员可以在用户逻辑系统中创建安全区域,并将接口分配给每个安全区域。用户逻辑系统管理员可以在用户逻辑系统中使用 show system security-profile zones
命令查看分配给用户逻辑系统的安全区域数,并使用 show interfaces
命令查看分配给用户逻辑系统的接口。
主管理员可以为主逻辑系统配置安全配置文件,以指定应用于主逻辑系统的安全区域的最大和保留数量。在主逻辑系统中配置的区域数计入设备上可用的最大区域数。
主管理员和用户管理员可以在逻辑系统中配置安全区域的以下属性:
属于安全区域的接口。
筛选选项 — 对于每个安全区域,都可以启用一组预定义的筛选选项,以检测并阻止设备确定为潜在有害的各类流量。
TCP 重置 — 启用此功能后,当流量到达时,系统会发送一个带有 RESET 标志的 TCP 分段,该分段与现有会话不匹配,并且没有设置同步标记。
主机入站流量 — 此功能指定可以从直接连接到其接口的系统访问设备的流量类型。您可以在区域级别(在这种情况下,它们会影响区域的所有接口)或接口级别配置这些参数。(接口配置将覆盖区域的配置。)
主逻辑系统或用户逻辑系统中没有预配置的安全区域。
只能为主逻辑系统配置管理功能区 (MGT)。每个设备只有一个管理接口,并且该接口分配给主逻辑系统。
接口 all
只能由主管理员分配给主逻辑系统中的一个区域。
用户逻辑系统管理员可以在用户逻辑系统中配置和查看安全区域的所有属性。主管理员也可以看到用户逻辑系统中安全区域的所有属性。
另请参阅
示例:配置用户逻辑系统
此示例显示了用户逻辑系统的接口、路由实例、区域和安全策略的配置。
要求
开始之前:
以逻辑系统管理员身份登录到用户逻辑系统。请参阅 用户逻辑系统配置概述。
确保您知道主管理员为用户逻辑系统分配了哪些逻辑接口,或者选择将哪些逻辑隧道接口(及其 IP 地址)分配给您的用户逻辑系统。请参阅 了解主要逻辑系统和主要管理员角色。
概述
此示例配置 示例:创建用户逻辑系统、管理员、用户和互连逻辑系统中显示的 ls-marketing-dept 和 ls-accounting-dept 用户逻辑系统。
特征 |
名字 |
配置参数 |
---|---|---|
接口 |
ge-0/0/6.1 |
|
路由实例 |
mk-vr1 |
|
区 |
ls-marketing-trust |
绑定到接口 ge-0/0/6.1。 |
|
ls-marketing-untrust |
绑定到接口 lt-0/0/0.5 |
地址簿 |
内部营销 |
|
|
外部营销 |
|
政策 |
permit-all-to-otherlsys |
允许以下流量:
|
|
permit-all-from-otherlsys |
允许以下流量:
|
特征 |
名字 |
配置参数 |
---|---|---|
接口 |
ge-0/0/7.1 |
|
路由实例 |
acct-vr1 |
|
区 |
ls-accounting-trust |
绑定到接口 ge-0/0/7.1。 |
|
ls-accounting-untrust |
绑定到接口 lt-0/0/0.7 |
地址簿 |
内部计费 |
|
|
外部计费 |
|
政策 |
permit-all-to-otherlsys |
允许以下流量:
|
|
permit-all-from-otherlsys |
允许以下流量:
|
配置
配置 ls-marketing-dept 用户逻辑系统
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层级的 [edit]
CLI 中,然后从配置模式进入 commit
。
set interfaces ge-0/0/6 unit 1 family inet address 13.1.1.1/24 set interfaces ge-0/0/6 unit 1 vlan-id 800 set routing-instances mk-vr1 instance-type virtual-router set routing-instances mk-vr1 interface ge-0/0/6.1 set routing-instances mk-vr1 interface lt-0/0/0.5 set routing-instances mk-vr1 routing-options static route 12.1.1.0/24 next-hop 10.0.1.2 set routing-instances mk-vr1 routing-options static route 14.1.1.0/24 next-hop 10.0.1.4 set routing-instances mk-vr1 routing-options static route 12.12.1.0/24 next-hop 10.0.1.1 set security zones security-zone ls-marketing-trust interfaces ge-0/0/6.1 set security zones security-zone ls-marketing-untrust interfaces lt-0/0/0.5 set security address-book marketing-external address design 12.1.1.0/24 set security address-book marketing-external address accounting 14.1.1.0/24 set security address-book marketing-external address others 12.12.1.0/24 set security address-book marketing-external address-set otherlsys address design set security address-book marketing-external address-set otherlsys address accounting set security address-book marketing-external attach zone ls-marketing-untrust set security address-book marketing-internal address marketers 13.1.1.0/24 set security address-book marketing-internal attach zone ls-marketing-trust set security policies from-zone ls-marketing-trust to-zone ls-marketing-untrust policy permit-all-to-otherlsys match source-address marketers set security policies from-zone ls-marketing-trust to-zone ls-marketing-untrust policy permit-all-to-otherlsys match destination-address otherlsys set security policies from-zone ls-marketing-trust to-zone ls-marketing-untrust policy permit-all-to-otherlsys match application any set security policies from-zone ls-marketing-trust to-zone ls-marketing-untrust policy permit-all-to-otherlsys then permit set security policies from-zone ls-marketing-untrust to-zone ls-marketing-trust policy permit-all-from-otherlsys match source-address otherlsys set security policies from-zone ls-marketing-untrust to-zone ls-marketing-trust policy permit-all-from-otherlsys match destination-address marketers set security policies from-zone ls-marketing-untrust to-zone ls-marketing-trust policy permit-all-from-otherlsys match application any set security policies from-zone ls-marketing-untrust to-zone ls-marketing-trust policy permit-all-from-otherlsys then permit
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关如何操作的说明,请参阅 Junos OS CLI 用户指南 中的在配置模式下使用 CLI 编辑器 。
要配置用户逻辑系统:
以逻辑系统管理员身份登录用户逻辑系统并进入配置模式。
lsmarketingadmin1@host:ls-marketing-dept> configure lsmarketingadmin1@host:ls-marketing-dept#
为用户逻辑系统配置逻辑接口。
[edit interfaces] lsmarketingadmin1@host:ls-marketing-dept# set ge-0/0/6 unit 1 family inet address 13.1.1.1/24 lsmarketingadmin1@host:ls-marketing-dept# set ge-0/0/6 unit 1 vlan-id 800
配置路由实例并分配接口。
[edit routing-instances] lsmarketingadmin1@host:ls-marketing-dept# set mk-vr1 instance-type virtual-router lsmarketingadmin1@host:ls-marketing-dept# set mk-vr1 interface ge-0/0/6.1 lsmarketingadmin1@host:ls-marketing-dept# set mk-vr1 interface lt-0/0/0.5
配置静态路由。
[edit routing-instances] lsmarketingadmin1@host:ls-marketing-dept# set mk-vr1 routing-options static route 12.12.1.0/24 next-hop 10.0.1.2 lsmarketingadmin1@host:ls-marketing-dept# set mk-vr1 routing-options static route 14.1.1.0/24 next-hop 10.0.1.4 lsmarketingadmin1@host:ls-marketing-dept# set mk-vr1 routing-options static route 12.12.1.0/24 next-hop 10.0.1.1
配置安全区域并将接口分配给每个区域。
[edit security zones] lsmarketingadmin1@host:ls-marketing-dept# set security-zone ls-marketing-trust interfaces ge-0/0/6.1 lsmarketingadmin1@host:ls-marketing-dept# set security-zone ls-marketing-untrust interfaces lt-0/0/0.5
创建通讯簿条目。
[edit security] lsmarketingadmin1@host:ls-marketing-dept# set address-book marketing-internal address marketers 13.1.1.0/24 lsmarketingadmin1@host:ls-marketing-dept# set address-book marketing-external address design 12.1.1.0/24 lsmarketingadmin1@host:ls-marketing-dept# set address-book marketing-external address accounting 14.1.1.0/24 lsmarketingadmin1@host:ls-marketing-dept# set address-book marketing-external address others 12.12.1.0/24 lsmarketingadmin1@host:ls-marketing-dept# set address-book marketing-external address-set otherlsys address design lsmarketingadmin1@host:ls-marketing-dept# set address-book marketing-external address-set otherlsys address accounting
将通讯簿附加到区域。
[edit security] lsmarketingadmin1@host:ls-marketing-dept# set address-book marketing-internal attach zone ls-marketing-trust lsmarketingadmin1@host:ls-marketing-dept# set address-book marketing-external attach zone ls-marketing-untrust
配置一个安全策略,以允许从 ls-marketing-trust 区域到 ls-marketing-untrust 区域的流量。
[edit security policies from-zone ls-marketing-trust to-zone ls-marketing-untrust] lsmarketingadmin1@host:ls-marketing-dept# set policy permit-all-to-otherlsys match source-address marketers lsmarketingadmin1@host:ls-marketing-dept# set policy permit-all-to-otherlsys match destination-address otherlsys lsmarketingadmin1@host:ls-marketing-dept# set policy permit-all-to-otherlsys match application any lsmarketingadmin1@host:ls-marketing-dept# set policy permit-all-to-otherlsys then permit
配置一个安全策略,以允许从 ls-marketing-untrust 区域到 ls-marketing-trust 区域的流量。
[edit security policies from-zone ls-marketing-untrust to-zone ls-marketing-trust] lsmarketingadmin1@host:ls-marketing-dept# set policy permit-all-from-otherlsys match source-address otherlsys lsmarketingadmin1@host:ls-marketing-dept# set policy permit-all-from-otherlsys match destination-address marketers lsmarketingadmin1@host:ls-marketing-dept# set policy permit-all-from-otherlsys match application any lsmarketingadmin1@host:ls-marketing-dept# set policy permit-all-from-otherlsys then permit
结果
在配置模式下,输入和 show security
命令以确认show routing-instances
您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。
lsmarketingadmin1@host:ls-marketing-dept# show routing instances mk-vr1 { instance-type virtual-router; interface ge-0/0/6.1; interface lt-0/0/0.5; routing-options { static { route 12.1.1.0/24 next-hop 10.0.1.2; route 14.1.1.0/24 next-hop 10.0.1.4; route 12.12.1.0/24 next-hop 10.0.1.1; } } } lsmarketingadmin1@host:ls-marketing-dept# show security address-book { marketing-external { address product-designers 12.1.1.0/24; address accounting 14.1.1.0/24; address others 12.12.1.0/24; address-set otherlsys { address product-designers; address accounting; } attach { zone ls-marketing-untrust; } } marketing-internal { address marketers 13.1.1.0/24; attach { zone ls-marketing-trust; } } } policies { from-zone ls-marketing-trust to-zone ls-marketing-untrust { policy permit-all-to-otherlsys { match { source-address marketers; destination-address otherlsys; application any; } then { permit; } } } from-zone ls-marketing-untrust to-zone ls-marketing-trust { policy permit-all-from-otherlsys { match { source-address otherlsys; destination-address marketers; application any; } then { permit; } } } } zones { security-zone ls-marketing-trust { interfaces { ge-0/0/6.1; } } security-zone ls-marketing-untrust { interfaces { lt-0/0/0.5; } } }
完成设备配置后,请从配置模式进入 commit
。
配置 ls-accounting-dept 用户逻辑系统
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层级的 [edit]
CLI 中,然后从配置模式进入 commit
。
set interfaces ge-0/0/7 unit 1 family inet address 14.1.1.1/24 set interfaces ge-0/0/7 unit 1 vlan-id 900 set routing-instances acct-vr1 instance-type virtual-router set routing-instances acct-vr1 interface ge-0/0/7.1 set routing-instances acct-vr1 interface lt-0/0/0.7 set routing-instances acct-vr1 routing-options static route 12.12.1.0/24 next-hop 10.0.1.1 set routing-instances acct-vr1 routing-options static route 12.1.1.0/24 next-hop 10.0.1.2 set routing-instances acct-vr1 routing-options static route 13.1.1.0/24 next-hop 10.0.1.3 set security address-book accounting-internal address accounting 14.1.1.0/24 set security address-book accounting-internal attach zone ls-accounting-trust set security address-book accounting-external address design 12.1.1.0/24 set security address-book accounting-external address marketing 13.1.1.0/24 set security address-book accounting-external address others 12.12.1.0/24 set security address-book accounting-external address-set otherlsys address design set security address-book accounting-external address-set otherlsys address marketing set security address-book accounting-external attach zone ls-accounting-untrust set security policies from-zone ls-accounting-trust to-zone ls-accounting-untrust policy permit-all-to-otherlsys match source-address accounting set security policies from-zone ls-accounting-trust to-zone ls-accounting-untrust policy permit-all-to-otherlsys match destination-address otherlsys set security policies from-zone ls-accounting-trust to-zone ls-accounting-untrust policy permit-all-to-otherlsys match application any set security policies from-zone ls-accounting-trust to-zone ls-accounting-untrust policy permit-all-to-otherlsys then permit set security policies from-zone ls-accounting-untrust to-zone ls-accounting-trust policy permit-all-from-otherlsys match source-address otherlsys set security policies from-zone ls-accounting-untrust to-zone ls-accounting-trust policy permit-all-from-otherlsys match destination-address accounting set security policies from-zone ls-accounting-untrust to-zone ls-accounting-trust policy permit-all-from-otherlsys match application any set security policies from-zone ls-accounting-untrust to-zone ls-accounting-trust policy permit-all-from-otherlsys then permit set security zones security-zone ls-accounting-trust interfaces ge-0/0/7.1 set security zones security-zone ls-accounting-untrust interfaces lt-0/0/0.7
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关操作说明,请参阅 在配置模式下使用 CLI 编辑器。
要配置用户逻辑系统:
以逻辑系统管理员身份登录用户逻辑系统并进入配置模式。
lsaccountingadmin1@host:ls-accounting-dept> configure lsaccountingadmin1@host:ls-accounting-dept#
为用户逻辑系统配置逻辑接口。
[edit interfaces] lsaccountingadmin1@host:ls-accounting-dept# set ge-0/0/7 unit 1 family inet address 14.1.1.1/24 lsaccountingadmin1@host:ls-accounting-dept# set ge-0/0/7 unit 1 vlan-id 900
配置路由实例并分配接口。
[edit routing-instances] lsaccountingadmin1@host:ls-accounting-dept# set acct-vr1 instance-type virtual-router lsaccountingadmin1@host:ls-accounting-dept# set acct-vr1 interface ge-0/0/7.1 lsaccountingadmin1@host:ls-accounting-dept# set acct-vr1 interface lt-0/0/0.7
配置静态路由。
[edit routing-instances] lsaccountingadmin1@host:ls-accounting-dept# set acct-vr1 routing-options static route 12.1.1.0/24 next-hop 10.0.1.2 lsaccountingadmin1@host:ls-accounting-deptt# set acct-vr1 routing-options static route 13.1.1.0/24 next-hop 10.0.1.3 lsaccountingadmin1@host:ls-accounting-dept# set acct-vr1 routing-options static route 12.12.1.0/24 next-hop 10.0.1.1
配置安全区域并将接口分配给每个区域。
[edit security zones] lsaccountingadmin1@host:ls-accounting-dept# set security-zone ls-accounting-trust interfaces ge-0/0/7.1 lsaccountingadmin1@host:ls-accounting-dept# set security-zone ls-accounting-untrust interfaces lt-0/0/0.7
创建通讯簿条目。
[edit security] lsaccountingadmin1@host:ls-accounting-dept# set address-book accounting-internal address accounting 14.1.1.0/24 lsaccountingadmin1@host:ls-accounting-dept# set address-book accounting-external address design 12.1.1.0/24 lsaccountingadmin1@host:ls-accounting-dept# set address-book accounting-external address marketing 13.1.1.0/24 lsaccountingadmin1@host:ls-accounting-dept# set address-book accounting-external address others 12.12.1.0/24 lsaccountingadmin1@host:ls-accounting-dept# set address-book accounting-external address-set otherlsys address design lsaccountingadmin1@host:ls-accounting-dept# set address-book accounting-external address-set otherlsys address marketing
将通讯簿附加到区域。
[edit security] lsaccountingadmin1@host:ls-accounting-dept# set address-book accounting-internal attach zone ls-accounting-trust lsaccountingadmin1@host:ls-accounting-dept# set address-book accounting-external attach zone ls-accounting-untrust
配置一个安全策略,以允许从 ls 计费信任区域到 ls 核算不信任区域的流量。
[edit security policies from-zone ls-accounting-trust to-zone ls-accounting-untrust] lsaccountingadmin1@host:ls-accounting-dept# set policy permit-all-to-otherlsys match source-address accounting lsaccountingadmin1@host:ls-accounting-dept# set policy permit-all-to-otherlsys match destination-address otherlsys lsaccountingadmin1@host:ls-accounting-dept# set policy permit-all-to-otherlsys match application any lsaccountingadmin1@host:ls-accounting-dept# set policy permit-all-to-otherlsys then permit
配置一个安全策略,允许从 ls-accounting-untrust 区域到 ls-accounting-trust 区域的流量。
[edit security policies from-zone ls-accounting-untrust to-zone ls-accounting-trust] lsaccountingadmin1@host:ls-accounting-dept# set policy permit-all-from-otherlsys match source-address otherlsys lsaccountingadmin1@host:ls-accounting-dept# set policy permit-all-from-otherlsys match destination-address accounting lsaccountingadmin1@host:ls-accounting-dept# set policy permit-all-from-otherlsys match application any lsaccountingadmin1@host:ls-accounting-dept# set policy permit-all-from-otherlsys then permit
结果
在配置模式下,输入和 show security
命令以确认show routing-instances
您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。
lsaccountingadmin1@host:ls-accounting-dept# show routing-instances acct-vr1 { instance-type virtual-router; interface ge-0/0/7.1; interface lt-0/0/0.7; routing-options { static { route 12.12.1.0/24 next-hop 10.0.1.1; route 12.1.1.0/24 next-hop 10.0.1.2; route 13.1.1.0/24 next-hop 10.0.1.3; } } } lsaccountingadmin1@host:ls-accounting-dept# show security address-book { accounting-internal { address accounting 14.1.1.0/24; attach { zone ls-accounting-trust; } } accounting-external { address design 12.1.1.0/24; address marketing 13.1.1.0/24; address others 12.12.1.0/24; address-set otherlsys { address design; address marketing; } attach { zone ls-accounting-untrust; } } } policies { from-zone ls-accounting-trust to-zone ls-accounting-untrust { policy permit-all-to-otherlsys { match { source-address accounting; destination-address otherlsys; application any; } then { permit; } } } from-zone ls-accounting-untrust to-zone ls-accounting-trust { policy permit-all-from-otherlsys { match { source-address otherlsys; destination-address accounting; application any; } then { permit; } } } } zones { security-zone ls-accounting-trust { interfaces { ge-0/0/7.1; } } security-zone ls-accounting-untrust { interfaces { lt-0/0/0.7; } } }
完成设备配置后,请从配置模式进入 commit
。
示例:为用户逻辑系统配置安全区域
此示例说明如何为用户逻辑系统配置区域。
要求
开始之前:
以用户逻辑系统管理员身份登录用户逻辑系统。请参阅 用户逻辑系统配置概述。
show system security-profile zones
使用命令查看分配给逻辑系统的区域资源。必须配置用户逻辑系统的逻辑接口。请参阅 示例:为用户逻辑系统配置接口和路由实例。
概述
此示例配置 示例:创建用户逻辑系统、管理员、用户和互连逻辑系统中显示的 ls-product 设计用户逻辑系统。
此示例创建 表 3 中描述的区域和地址簿。
特征 |
名字 |
配置参数 |
---|---|---|
区 |
ls-product-design-trust |
|
|
ls-product-design-untrust |
|
地址簿 |
产品设计内部 |
|
|
产品设计-外部 |
|
配置
程序
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层级的 [edit]
CLI 中,然后从配置模式进入 commit
。
set security address-book product-design-internal address product-designers 12.1.1.0/24 set security address-book product-design-internal attach zone ls-product-design-trust set security address-book product-design-external address marketing 13.1.1.0/24 set security address-book product-design-external address accounting 14.1.1.0/24 set security address-book product-design-external address others 12.12.1.0/24 set security address-book product-design-external address-set otherlsys address marketing set security address-book product-design-external address-set otherlsys address accounting set security address-book product-design-external attach zone ls-product-design-untrust set security zones security-zone ls-product-design-trust tcp-rst set security zones security-zone ls-product-design-trust interfaces ge-0/0/5.1 set security zones security-zone ls-product-design-untrust interfaces lt-0/0/0.3
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关如何操作的说明,请参阅 Junos OS CLI 用户指南 中的在配置模式下使用 CLI 编辑器 。
在用户逻辑系统中配置区域:
以逻辑系统管理员身份登录用户逻辑系统并进入配置模式。
lsdesignadmin1@host:ls-product-design> configure lsdesignadmin1@host:ls-product-design#
配置安全区域并将其分配给接口。
[edit security zones] lsdesignadmin1@host:ls-product-design# set security-zone ls-product-design-trust interfaces ge-0/0/5.1
为区域配置 TCP-Reset 参数。
[edit security zones security-zone ls-product-design-trust] lsdesignadmin1@host:ls-product-design# set tcp-rst
配置安全区域并将其分配给接口。
[edit security zones] lsdesignadmin1@host:ls-product-design# set security-zone ls-product-design-untrust interfaces lt-0/0/0.3
创建全局通讯簿条目。
[edit security] lsdesignadmin1@host:ls-product-design# set address-book product-design-internal address product-designers 12.1.1.0/24 lsdesignadmin1@host:ls-product-design# set address-book product-design-external address marketing 13.1.1.0/24 lsdesignadmin1@host:ls-product-design# set address-book product-design-external address accounting 14.1.1.0/24 lsdesignadmin1@host:ls-product-design# set address-book product-design-external address others 12.12.1.0/24 lsdesignadmin1@host:ls-product-design# set address-book product-design-external address-set otherlsys address marketing lsdesignadmin1@host:ls-product-design# set address-book product-design-external address-set otherlsys address accounting
将通讯簿附加到区域。
[edit security] lsdesignadmin1@host:ls-product-design# set address-book product-design-internal attach zone ls-product-design-trust lsdesignadmin1@host:ls-product-design# set address-book product-design-external attach zone ls-product-design-untrust
结果
在配置模式下,输入命令以确认 show security
您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。
lsdesignadmin1@host:ls-product-design# show security address-book { product-design-internal { address product-designers 12.1.1.0/24; attach { zone ls-product-design-trust; } } product-design-external { address marketing 13.1.1.0/24; address accounting 14.1.1.0/24; address others 12.12.1.0/24; address-set otherlsys { address marketing; address accounting; } attach { zone ls-product-design-untrust; } } } zones { security-zone ls-product-design-trust { tcp-rst; interfaces { ge-0/0/5.1; } } security-zone ls-product-design-untrust { interfaces { lt-0/0/0.3; } } }
完成设备配置后,请从配置模式进入 commit
。