逻辑系统的安全性配置文件
逻辑系统的安全性配置文件允许您分配资源。安全性配置文件指定要分配给绑定安全配置文件的逻辑系统的资源数。所有系统资源都分配给主逻辑系统,主管理员使用安全配置文件将其分配给用户逻辑系统。有关更多信息,请参阅以下主题:
了解逻辑系统安全性配置文件(仅限主管理员)
逻辑系统允许您将受支持的 SRX 系列防火墙虚拟地划分为多个设备,将彼此隔离,保护它们免受入侵和攻击,并保护它们免受自身环境之外的故障情况的影响。为了保护逻辑系统,安全资源的配置方式与为离散设备配置安全资源的方式类似。但是,作为主管理员,您必须为逻辑系统分配安全资源的种类和数量。逻辑系统管理员为自己的逻辑系统分配资源。
运行逻辑系统的 SRX 系列防火墙可以划分为用户逻辑系统、互连逻辑系统(如果需要)和默认主逻辑系统。系统初始化时,将在根级别创建主逻辑系统。所有系统资源都分配给它,从而有效地创建了默认的主逻辑系统安全配置文件。要跨逻辑系统分配安全资源,主管理员可创建安全配置文件,用于指定要分配给安全配置文件绑定到的逻辑系统的资源的类型和数量。只有主管理员可以配置安全配置文件并将其绑定到逻辑系统。用户逻辑系统管理员可为其逻辑系统配置这些资源。
逻辑系统主要由分配给它们的资源来定义,包括安全组件、接口、路由实例、静态路由和动态路由协议。主管理员配置用户逻辑系统时,会将安全配置文件绑定到该系统。任何尝试为未绑定安全配置文件的用户逻辑系统提交配置的尝试都将失败。
本主题包含以下部分:
逻辑系统安全性配置文件
作为主管理员,您可以配置单个安全配置文件以将资源分配给特定逻辑系统,对多个逻辑系统使用相同的安全配置文件,或者混合使用这两种方法。在运行逻辑系统的 SRX 系列防火墙上,您最多可以配置 32 个安全配置文件。达到限制时,必须先删除安全配置文件并提交配置更改,然后才能创建和提交其他安全配置文件。在许多情况下,需要的安全配置文件较少,因为您可能会将单个安全配置文件绑定到多个逻辑系统。
安全性配置文件允许您:
在所有逻辑系统之间适当共享设备的资源,包括策略、区域、地址和地址簿、流会话以及各种形式的 NAT。您可以将不同数量的资源专用于逻辑系统,并允许它们争夺免费资源的使用权。
安全性配置文件可防止一个逻辑系统耗尽其他逻辑系统同时需要的资源。安全性配置文件可保护关键系统资源,并在设备遇到大量流量时在用户逻辑系统之间保持相当高的性能水平。它们防御一个用户逻辑系统主导资源的使用并剥夺其他用户逻辑系统的资源。
以可扩展的方式配置设备,以便将来创建其他用户逻辑系统。
在删除逻辑系统之前,必须先删除该逻辑系统的安全配置文件。
系统如何评估跨逻辑系统的资源分配和使用情况
要使用安全资源配置逻辑系统,您作为主管理员配置一个安全配置文件,该配置文件为每个资源指定:
预留配额,保证逻辑系统始终可以使用指定的资源量。
允许的最大配额。如果逻辑系统需要的资源多于其预留量允许的资源,则可以利用为全局最大量配置的资源(如果可用),即,如果这些资源未分配给其他逻辑系统。允许的最大配额指定逻辑系统可以使用的可用全局资源部分。允许的最大配额不能保证安全配置文件中为资源指定的数量可用。逻辑系统必须争夺全局资源。
如果未为资源配置预留配额,则默认值为 0。如果未为资源配置允许的最大配额,则默认值是资源的全局系统配额(全局系统配额取决于平台)。主管理员必须在安全配置文件中配置适当的最大允许配额值,这样特定逻辑系统的最大资源使用量就不会对设备上配置的其他逻辑系统产生负面影响。
系统会保留所有已分配资源的计数,这些资源在删除逻辑系统时已保留、使用和重新可用。此计数确定资源是否可用于新逻辑系统,或者通过其安全配置文件增加分配给现有逻辑系统的资源量。
删除用户逻辑系统后,将释放其预留资源分配以供其他逻辑系统使用。
在安全配置文件中配置的资源分为静态、模块化资源或动态资源。对于静态资源,建议为资源设置等于或接近指定为其预留配额的数量的最大配额,以允许对逻辑系统进行可扩展配置。资源的高最大配额可能会通过访问大量资源为逻辑系统提供更大的灵活性,但会限制可用于分配给新用户逻辑系统的数量。
动态资源的预留量和最大允许量之间的差异并不重要,因为动态资源已过时,不会耗尽可用于分配给其他逻辑系统的池。
可以在安全配置文件中指定以下资源:
安全性策略,包括调度程序
安全性区域
安全策略的地址和地址簿
应用防火墙规则集
应用防火墙规则
防火墙身份验证
流会话和门
NAT,包括:
锥形 NAT 绑定
NAT 目标规则
NAT 目标池
源池中没有端口地址转换 (PAT) 的 NAT IP 地址
注意:不带 PAT 的 IPv6 源池中的 IPv6 地址不包含在安全配置文件中。
源池中带有 PAT 的 NAT IP 地址
NAT 端口过载
NAT 源池
NAT 源规则
NAT 静态规则
除流会话外,所有资源都是静态的。
您可以动态修改逻辑系统安全配置文件,同时将安全配置文件分配给其他逻辑系统。但是,为了确保不超过系统资源配额,系统会采取以下作:
如果更改了静态配额,则维护安全配置文件中指定资源的逻辑系统计数的系统守护程序将重新验证安全配置文件。此检查标识跨所有逻辑系统分配的资源数,以确定分配的资源(包括其增加的数量)是否可用。
这些配额检查与添加新用户逻辑系统并将安全配置文件绑定到该系统时系统执行的配额检查相同。将与当前分配给它的安全配置文件不同的安全配置文件绑定到现有用户逻辑系统(或主逻辑系统)时,也会执行这些作。
如果更改了动态配额,则不会执行任何检查,但会对未来的资源使用情况施加新的配额。
案例:评估通过安全性配置文件分配的预留资源
若要了解系统如何通过安全配置文件评估预留资源的分配,请考虑以下三种情况,这些情况涉及一个资源(区域)的分配。为了使示例简单易懂,在 security-profile-1 中分配了 10 个区域:4 个保留区域和 6 个最大区域。此示例假定指定的全部最大数量(六个区域)可供用户逻辑系统使用。系统最大区域数为 10。
这些案例涉及跨逻辑系统的配置。它们测试以查看配置在根据区域分配提交时是成功还是失败。
表 1 显示了安全配置文件及其区域分配。
配置用例中使用的两个安全性配置文件 |
|---|
安全配置文件-1
注意:
稍后,主管理员动态增加此配置文件中指定的预留区域计数。 |
主逻辑系统配置文件
|
表 2 显示了三种情况,说明了系统如何根据安全配置文件配置评估跨逻辑系统区域的预留资源。
第一种情况的配置成功,因为绑定到所有逻辑系统的安全配置文件中配置的区域的累积预留资源配额为 8,小于系统最大资源配额。
第二种情况的配置失败,因为绑定到所有逻辑系统的安全配置文件中配置的区域的累计预留资源配额为 12,大于系统最大资源配额。
第三种情况的配置失败,因为绑定到所有逻辑系统的安全配置文件中配置的区域的累积预留资源配额为 12,大于系统最大资源配额。
跨逻辑系统的预留资源配额检查 |
|---|
示例 1:成功 此配置在以下范围内:4+4+0=8,最大容量=10。 使用的安全性配置文件
|
示例 2:失败 此配置超出范围:4+4+4=12,最大容量=10。
安全性配置文件
|
示例 3:失败 此配置超出范围:6+6=12,最大容量=10。 主管理员修改 security-profile-1 中的预留区域配额,将计数增加到 6。
|
也可以看看
示例:配置逻辑系统安全性配置文件(仅限主管理员)
此示例说明主管理员如何配置三个逻辑系统安全配置文件以分配给用户逻辑系统和主逻辑系统,以便为其配置安全资源。
要求
此示例使用运行 Junos OS 和逻辑系统的 SRX5600 设备。
开始之前,请阅读 SRX 系列逻辑系统主管理员配置任务概述 ,了解此任务如何适应整个配置流程。
概述
此示例说明如何为以下逻辑系统配置安全配置文件:
根逻辑系统逻辑系统。安全配置文件 primary-profile 将分配给主逻辑系统或根逻辑系统。
ls-product-design 逻辑系统。安全配置文件 ls-design-profile 将分配给逻辑系统。
ls-marketing-dept 逻辑系统。安全配置文件 ls-accnt-mrkt-profile 将分配给逻辑系统。
ls-accounting-dept 逻辑系统。安全配置文件 ls-accnt-mrkt-profile 将分配给逻辑系统。
互连逻辑系统(如果使用的话)您必须为其分配虚拟或空安全配置文件。
拓扑结构
此配置依赖于示例中所示的部署 :创建用户逻辑系统、其管理员、其用户和互连逻辑系统。
配置
配置逻辑系统安全性配置文件
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层次结构级别的 [edit] CLI 中,然后从配置模式进入。commit
set system security-profile master-profile policy maximum 65 set system security-profile master-profile policy reserved 60 set system security-profile master-profile zone maximum 22 set system security-profile master-profile zone reserved 17 set system security-profile master-profile flow-session maximum 3000 set system security-profile master-profile flow-session reserved 2100 set system security-profile master-profile icap-redirect-profile maximum 64 set system security-profile master-profile icap-redirect-profile reserved 30 set system security-profile master-profile nat-nopat-address maximum 115 set system security-profile master-profile nat-nopat-address reserved 100 set system security-profile master-profile nat-static-rule maximum 125 set system security-profile master-profile nat-static-rule reserved 100 set system security-profile master-profile idp set system security-profile master-profile root-logical-system set system security-profile ls-accnt-mrkt-profile policy maximum 65 set system security-profile ls-accnt-mrkt-profile policy reserved 60 set system security-profile ls-accnt-mrkt-profile zone maximum 22 set system security-profile ls-accnt-mrkt-profile zone reserved 17 set system security-profile ls-accnt-mrkt-profile flow-session maximum 2500 set system security-profile ls-accnt-mrkt-profile flow-session reserved 2000 set system security-profile master-profile icap-redirect-profile maximum 64 set system security-profile master-profile icap-redirect-profile reserved 30 set system security-profile ls-accnt-mrkt-profile nat-nopat-address maximum 125 set system security-profile ls-accnt-mrkt-profile nat-nopat-address reserved 100 set system security-profile ls-accnt-mrkt-profile nat-static-rule maximum 125 set system security-profile ls-accnt-mrkt-profile nat-static-rule reserved 100 set system security-profile ls-accnt-mrkt-profile logical-system ls-marketing-dept set system security-profile ls-accnt-mrkt-profile logical-system ls-accounting-dept set system security-profile ls-design-profile policy maximum 50 set system security-profile ls-design-profile policy reserved 40 set system security-profile ls-design-profile zone maximum 10 set system security-profile ls-design-profile zone reserved 5 set system security-profile ls-design-profile flow-session maximum 2500 set system security-profile ls-design-profile flow-session reserved 2000 set system security-profile master-profile icap-redirect-profile maximum 64 set system security-profile master-profile icap-redirect-profile reserved 30 set system security-profile ls-design-profile nat-nopat-address maximum 120 set system security-profile ls-design-profile nat-nopat-address reserved 100 set system security-profile ls-design-profile logical-system ls-product-design set system security-profile interconnect-profile logical-system interconnect-logical-system
分步程序
下面的示例要求您在各个配置层级中进行导航。有关作说明,请参阅《Junos OS CLI 用户指南》中的在 配置模式下使用CLI编辑器 。
创建三个安全配置文件。
创建第一个安全配置文件。
分步程序
指定最大策略和保留策略的数量。
[edit system security-profile] user@host# set master-profile policy maximum 65 reserved 60
指定最大区域数和保留区域数。
[edit system security-profile] user@host# set master-profile zone maximum 22 reserved 17
指定最大会话数和保留会话数。
[edit system security-profile] user@host# set master-profile flow-session maximum 3000 reserved 2100
指定最大和保留的 ICAP 重定向配置文件数量
[edit system security-profile] user@host# set master-profile icap-redirect-profile maximum 64 reserved 30
指定最大和保留源 NAT、无 PAT 地址和静态 NAT 规则的数量。
[edit system security-profile] user@host# set master-profile nat-nopat-address maximum 115 reserved 100 user@host# set master-profile nat-static-rule maximum 125 reserved 100
启用入侵检测和防御 (IDP)。您只能为主(根)逻辑系统启用 IDP。
[edit system security-profile] user@host# set idp
将安全配置文件绑定到逻辑系统。
[edit system security-profile] user@host# set master-profile root-logical-system
创建第二个安全配置文件。
分步程序
指定最大策略和保留策略的数量。
[edit system security-profile] user@host# set ls-accnt-mrkt-profile policy maximum 65 reserved 60
指定最大区域数和保留区域数。
[edit system security-profile] user@host# set ls-accnt-mrkt-profile zone maximum 22 reserved 17
指定最大会话数和保留会话数。
[edit system security-profile] user@host# set ls-accnt-mrkt-profile flow-session maximum 2500 reserved 2000
指定最大和保留的 ICAP 重定向配置文件数量
[edit system security-profile] user@host# set ls-accnt-mrkt-profile icap-redirect-profile maximum 64 reserved 30
指定最大和保留源 NAT 无 PAT 地址的数量。
[edit system security-profile] user@host# set ls-accnt-mrkt-profile nat-nopat-address maximum 125 reserved 100
指定最大和保留的静态 NAT 规则数量。
[edit system security-profile] user@host# set ls-accnt-mrkt-profile nat-static-rule maximum 125 reserved 100
将安全配置文件绑定到两个逻辑系统。
[edit system] user@host# set security-profile ls-accnt-mrkt-profile logical-system ls-marketing-dept user@host# set security-profile ls-accnt-mrkt-profile logical-system ls-accounting-dept
创建第三个安全配置文件。
分步程序
指定最大策略和保留策略的数量。
[edit system security-profile] user@host# set ls-design-profile policy maximum 50 reserved 40
指定最大区域数和保留区域数。
[edit system security-profile] user@host# set ls-design-profile zone maximum 10 reserved 5
指定最大会话数和保留会话数。
[edit system security-profile] user@host# set ls-design-profile flow-session maximum 2500 reserved 2000
指定最大和保留的 ICAP 重定向配置文件数量
[edit system security-profile] user@host# setls-design-profile icap-redirect-profile maximum 64 reserved 30
指定最大和保留源 NAT 无 PAT 地址的数量。
[edit system security-profile] user@host# set ls-design-profile nat-nopat-address maximum 120 reserved 100
将安全配置文件绑定到逻辑系统。
user@host# set system security-profile ls-design-profile logical-system ls-product-design
将 null 安全配置文件绑定到互连逻辑系统。
user@host# set system security-profile interconnect-profile logical-system interconnect-logical-system
结果
在配置模式下,输入 show system security-profile 命令以确认您的配置,以查看配置的所有安全配置文件。
要查看各个安全配置文件,请输入 show system security-profile master-profile、 和 show system security-profile ls-accnt-mrkt-profile 和 命令 show system security-profile ls-design-profile 。如果输出未显示预期的配置,请重复此示例中的配置说明进行更正。
user@host# show system security-profile
interconnect-profile {
logical-system interconnect-logical-system;
}
ls-accnt-mrkt-profile {
policy {
maximum 65;
reserved 60;
}
zone {
maximum 22;
reserved 17;
}
flow-session {
maximum 2500;
reserved 2000;
}
icap-redirect-profile {
maximum 64;
reserved 30;
}
nat-nopat-address {
maximum 125;
reserved 100;
}
nat-static-rule {
maximum 125;
reserved 100;
}
logical-system [ ls-marketing-dept ls-accounting-dept ];
}
ls-design-profile {
policy {
maximum 50;
reserved 40;
}
zone {
maximum 10;
reserved 5;
}
flow-session {
maximum 2500;
reserved 2000;
}
icap-redirect-profile {
maximum 64;
reserved 30;
}
nat-nopat-address {
maximum 120;
reserved 100;
}
nat-static-rule {
maximum 125;
reserved 100;
}
logical-system ls-product-design;
}
master-profile {
policy {
maximum 65;
reserved 60;
}
zone {
maximum 22;
reserved 17;
}
flow-session {
maximum 3000;
reserved 2100;
}
icap-redirect-profile {
maximum 64;
reserved 30;
}
nat-nopat-address {
maximum 115;
reserved 100;
}
nat-static-rule {
maximum 125;
reserved 100;
}
root-logical-system;
}
user@host# show system security-profile master-profile
policy {
maximum 65;
reserved 60;
}
zone {
maximum 22;
reserved 17;
}
flow-session {
maximum 3000;
reserved 2100;
}
icap-redirect-profile {
maximum 64;
reserved 30;
}
nat-nopat-address {
maximum 115;
reserved 100;
}
nat-static-rule {
maximum 125;
reserved 100;
}
root-logical-system;
user@host# show system security-profile ls-accnt-mrkt-profile
policy {
maximum 65;
reserved 60;
}
zone {
maximum 22;
reserved 17;
}
flow-session {
maximum 2500;
reserved 2000;
}
icap-redirect-profile {
maximum 64;
reserved 30;
}
nat-nopat-address {
maximum 125;
reserved 100;
}
nat-static-rule {
maximum 125;
reserved 100;
}
logical-system [ ls-accounting-dept ls-marketing-dept ];
user@host# show system security-profile ls-design-profile
policy {
maximum 50;
reserved 40;
}
zone {
maximum 10;
reserved 5;
}
flow-session {
maximum 2500;
reserved 2000;
}
icap-redirect-profile {
maximum 64;
reserved 30;
}
nat-nopat-address {
maximum 120;
reserved 100;
}
nat-static-rule {
maximum 125;
reserved 100;
}
logical-system ls-product-design;
如果完成设备配置,请从配置模式输入 commit。
验证
要确认已为逻辑系统分配的安全资源已分配给它们,请为每个逻辑系统及其所有资源执行此过程。
验证是否为逻辑系统有效地分配了安全性配置文件资源
目的
验证每个逻辑系统的安全资源。对所有配置的逻辑系统执行此过程。
行动
-
使用 SSH 以用户逻辑系统管理员身份登录到每个用户逻辑系统。
运行 SSH,并指定 SRX 系列防火墙的 IP 地址。
输入您创建的某个用户逻辑系统的登录 ID 和密码。
login: lsmarketingadmin1 password: Talk2345 lsmarketingadmin1@host:ls-marketing-dept>
输入以下语句,标识为配置文件配置的资源。
lsmarketingadmin1@host:ls-marketing-dept> show system security-profile ?
在出现的提示符中输入以下命令。对为配置文件配置的每个功能执行此作。
lsmarketingadmin1@host:ls-marketing-dept> show system security-profile zone detail logical system name : ls-marketing-dept security profile name : ls-accnt-mrkt-profile used amount : 0 reserved amount : 17 maximum quota : 22
示例:配置用户逻辑系统安全性配置文件
在此示例中,您将配置用户逻辑系统安全配置文件。它提供有关安全配置文件中分配给逻辑系统的资源的信息。
SRX4100 和 SRX4200 设备支持透明模式和路由模式下的逻辑系统。
SRX4600 设备仅支持路由模式下的逻辑系统。
不支持第 2 层跨逻辑系统流量。
要求
概述
逻辑系统允许主管理员将 SRX 系列防火墙划分为称为用户逻辑系统的离散上下文。用户逻辑系统是独立的专用上下文,彼此分离,也独立于主逻辑系统。用户逻辑系统具有自己的安全、网络、逻辑接口、路由配置以及一个或多个用户逻辑系统管理员。
在此示例中,您将为 表 3 中所述的用户逻辑系统配置安全功能。此配置供用户逻辑系统管理员显示用户逻辑系统的资源信息。
字段名称 |
字段说明 |
|---|---|
MAC 标志 |
每个接口的 MAC 地址学习属性状态:
|
以太网交换表 |
对于学习的条目,条目添加到以太网交换表的时间。 |
逻辑系统 |
逻辑系统的名称 |
路由实例 |
路由实例的名称 |
VLAN 名称 |
VLAN 的名称 |
MAC 地址 |
在逻辑接口上获知的 MAC 地址或地址 |
年龄 |
不支持此字段 |
逻辑接口 |
逻辑接口的名称 |
RTR ID |
路由设备的 ID |
NH 指数 |
用于路由给定前缀流量的下一跃点的软件索引。 |
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层次结构级别的 [edit] CLI 中,然后从配置模式进入。commit
set system security-profile security-profile-name logical-system logical-system-name set logical-systems logical-system-name interfaces xe-0/0/0 unit 0 family ethernet-switching interface-mode access set logical-systems logical-system-name interfaces xe-0/0/0 unit 0 family ethernet-switching vlan members VLAN100 set logical-systems logical-system-name interfaces xe-0/0/1 unit 0 family ethernet-switching interface-mode access set logical-systems logical-system-name interfaces xe-0/0/1 unit 0 family ethernet-switching vlan members VLAN100 set logical-systems logical-system-name interfaces xe-0/0/2 unit 0 family ethernet-switching interface-mode trunk set logical-systems logical-system-name interfaces xe-0/0/2 unit 0 family ethernet-switching vlan members VLAN200 set logical-systems logical-system-name interfaces xe-0/0/1.0 unit 0 family ethernet-switching interface-mode trunk set logical-systems logical-system-name interfaces xe-0/0/2.0 unit 0 family ethernet-switching vlan members vlan200 set logical-systems logical-system-name interfaces irb unit 22 family inet address 10.11.11.150/24 set logical-systems logical-system-name security policies default-policy permit-all set logical-systems logical-system-name security zones security-zone trust host-inbound-traffic system-services all set logical-systems logical-system-name security zones security-zone trust host-inbound-traffic protocols all set logical-systems logical-system-name security zones security-zone trust interfaces xe-0/0/2.0 set logical-systems logical-system-name security zones security-zone untrust host-inbound-traffic system-services all set logical-systems logical-system-name security zones security-zone untrust host-inbound-traffic protocols all set logical-systems logical-system-name security zones security-zone untrust interfaces xe-0/0/2.0 set logical-systems logical-system-name security zones security-zone untrust interfaces xe-0/0/3.0 set logical-systems logical-system-name vlans VLAN100 vlan-id 100 set logical-systems logical-system-name vlans VLAN100 l3-interface irb.22
过程
分步程序
下面的示例要求您在各个配置层级中进行导航。有关作说明,请参阅《Junos OS CLI 用户指南》中的在 配置模式下使用CLI编辑器 。
要配置用户逻辑系统安全配置文件,请执行以下作:
以逻辑系统管理员身份登录到用户逻辑系统,进入配置模式。
[edit] admin@host> configure admin@host#
配置安全配置文件并将其分配给逻辑系统。
[edit system security-profile ] admin@host# set system security-profile security-profile-name logical-system
将接口设置为适当的接口模式,并指定将接收未标记数据包的逻辑接口是本机 VLAN 的成员。
[edit logical-systems] admin@host#set logical-systems logical-system-name interfaces xe-0/0/0 unit 0 family ethernet-switching interface-mode access admin@host# set logical-systems logical-system-name interfaces xe-0/0/2 unit 0 family ethernet-switching vlan members VLAN100 admin@host#set logical-systems logical-system-name interfaces xe-0/0/1 unit 0 family ethernet-switching interface-mode access admin@host# set logical-systems logical-system-name interfaces xe-0/0/3 unit 0 family ethernet-switching vlan members VLAN100 admin@host#set logical-systems logical-system-name interfaces xe-0/0/2 unit 0 family ethernet-switching interface-mode trunk admin@host#set logical-systems logical-system-name interfaces xe-0/0/2 unit 0 family ethernet-switching vlan members VLAN100 admin@host#set logical-systems logical-system-name interfaces xe-0/0/1.0 unit 0 family ethernet-switching interface-mode trunk admin@host#set logical-systems logical-system-name interfaces xe-0/0/2.0 unit 0 family ethernet-switching vlan members vlan200
创建 IRB 接口并在子网中为其分配地址。
[edit interface] admin@host# set interfaces irb unit 22 family inet address 10.11.11.150/24
创建安全策略以允许从信任区域到非信任区域的流量,并为每个区域分配接口。
[edit security policies] admin@host# set security policies default-policy permit-all admin@host# set security zones security-zone trust host-inbound-traffic system-services all admin@host# set security zones security-zone trust host-inbound-traffic protocols all admin@host# set security zones security-zone trust interfaces xe-0/0/2.0 admin@host# set security zones security-zone untrust host-inbound-traffic system-services all admin@host# set security zones security-zone untrust host-inbound-traffic protocols all admin@host# set security zones security-zone untrust interfaces xe-0/0/2.0 admin@host# set security zones security-zone untrust interfaces xe-0/0/3.0
将 IRB 接口与 VLAN 进行关联。
[edit logical-systems] admin@host# set logical-systems logical-system-name vlans VLAN100 vlan-id 100 admin@host# set logical-systems logical-system-name vlans VLAN100 l3-interface irb.22
结果
在配置模式下,输入 show ethernet-switching table 命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明进行更正。
admin@host# show ethernet-switching table
ethernet-switching table {
filter;
inner-vlan;
inter-switch-link;
interface-mode;
policer;
recovery-timeout;
storm-control;
vlan;
vlan-auto-sense;
vlan-rewrite;
}
验证
要确认配置工作正常,请执行以下任务:
验证用户逻辑系统安全性配置文件配置
目的
验证安全策略信息。
行动
在作模式下,输入命令 show ethernet-switching table 。
admin@host> show ethernet-switching table
MAC flags (S - static MAC, D - dynamic MAC, L - locally learned, P - Persistent static, C - Control MAC
SE - statistics enabled, NM - non configured MAC, R - remote PE MAC, O - ovsdb MAC)
Ethernet switching table : 1 entries, 1 learned
Logical system : LD2
Routing instance : default
Vlan MAC MAC Age Logical NH RTR
name address flags interface Index ID
VLAN100 d4:04:ff:89:fd:30 D - xe-0/0/2.0 0 0
示例:为逻辑系统配置安全性日志流
此示例说明了如何为逻辑系统配置安全配置文件。
要求
概述
作为主管理员,您可以配置单个安全配置文件,以便将资源分配给特定的逻辑系统。您可以对多个逻辑系统使用相同的安全配置文件,也可以混合使用这两种方法。 set logical-system LSYS1 security log 该命令是为了在 SRX 系列防火墙上提供日志记录支持。
配置
配置逻辑系统安全性配置文件 logical-system
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层次结构级别的 [edit] CLI 中,然后从配置模式进入。commit
set system security-profile p1 security-log-stream-number reserved 1 set system security-profile p1 security-log-stream-number maximum 2 set system security-profile p1 logical-system LSYS1
分步程序
下面的示例要求您在各个配置层级中进行导航。有关作说明,请参阅《Junos OS CLI 用户指南》中的在 配置模式下使用CLI编辑器 。
配置安全配置文件并指定最大策略和保留策略的数量。.
[edit system] user@host# set security-profile p1 security-log-stream-number reserved 1 user@host# set security-profile p1 security-log-stream-number maximum 2
将配置的安全配置文件分配给 LSYS1。
user@host# set security-profile p1 logical-system LSYS1
结果
在配置模式下,输入 show system security-profile 命令以确认您的配置,以查看配置的所有安全配置文件。
[edit]
user@host# show system security-profile
p1 {
security-log-stream-number {
maximum 2;
reserved 1;
}
logical-system LSYS1;
}
验证
要确认配置工作正常,请执行以下任务:
验证逻辑系统的安全性配置文件资源
目的
验证每个逻辑系统的安全资源。
行动
在作模式下,输入 show system security-profile all-resource、 show system security-profile security-log-stream-number logical-system all、 show system security-profile security-log-stream-number summary或 show system security-profile security-log-stream-number detail logical-system all 命令以查看输出:
显示系统安全配置文件 all-resource
user@host> show system security-profile all-resource resource usage reserved maximum [logical system name: root-logical-system] [security profile name: Default-Profile] address-book 0 0 512 auth-entry 0 0 2147483647 cpu on CP 0.00% 1.00% 80.00% cpu on SPU 0.00% 1.00% 80.00% flow-gate 0 0 524288 flow-session 2 0 6291456 nat-cone-binding 0 0 65536 nat-destination-pool 0 0 4096 nat-destination-rule 0 0 8192 nat-nopat-address 0 0 1048576 nat-pat-address 0 0 2048 nat-port-ol-ipnumber 0 0 4 nat-rule-referenced-prefix 0 0 1048576 nat-source-pool 0 0 2048 nat-source-rule 0 0 8192 nat-static-rule 0 0 20480 policy 0 0 40000 policy-with-count 0 0 1024 scheduler 0 0 64 zone 0 0 512
意义
示例输出显示有关安全配置文件中分配给逻辑系统的资源的信息。对于每个指定的资源,将显示逻辑系统使用的数量以及配置的最大值和保留值。
验证逻辑系统的安全日志流编号
目的
验证每个逻辑系统的 security-log-stream-number。
行动
在作模式下,输入命令 show system security-profile security-log-stream-number logical-system all 以查看输出:
显示系统安全配置文件 security-log-stream-number logical-system all
user@host> show system security-profile security-log-stream-number logical-system all logical system name security profile name usage reserved maximum root-logical-system Default-Profile 1 0 3 LSYS1 sp1 0 1 3 LSYS2 sp2 1 0 3
意义
示例输出显示有关在具有安全配置文件名称的安全配置文件中分配给逻辑系统的资源的信息。对于每个指定的资源,将显示逻辑系统使用的数量以及配置的最大值和保留值。
验证逻辑系统的安全日志流编号摘要
目的
验证 security-log-stream-number 摘要。
行动
在作模式下,输入命令 show system security-profile security-log-stream-number summary 以查看输出:
显示系统安全配置文件 security-log-stream-number 摘要
user@host> show system security-profile security-log-stream-number summary global used amount : 0 global maximum quota : 32 global available amount : 32 total logical systems : 1 total security profiles : 0 heaviest usage / user : 0 / root-logical-system lightest usage / user : 0 / root-logical-system
意义
示例输出显示有关所有逻辑系统资源的摘要信息。
验证逻辑系统的 security-log-stream-number 详细信息
目的
验证 security-log-stream-number 详细信息。
行动
在作模式下,输入命令 show system security-profile security-log-stream-number detail logical-system all 以查看输出:
显示系统安全配置文件 security-log-stream-number detail logical-system all
user@host> show system security-profile security-log-stream-number detail logical-system all logical system name : root-logical-system security profile name : Default-Profile used amount : 0 reserved amount : 0 maximum quota : 8 logical system name : lsys0 security profile name : lsys_profile used amount : 0 reserved amount : 0 maximum quota : 8 logical system name : lsys1 security profile name : lsys_profile used amount : 0 reserved amount : 0 maximum quota : 8 logical system name : lsys2 security profile name : lsys_profile used amount : 0 reserved amount : 0 maximum quota : 8
意义
示例输出显示所有逻辑系统的详细输出级别。