示例:配置 IoT 设备发现和策略实施
在此示例中,你将为 IoT 设备发现和安全策略实施配置安全设备。
概述
要开始在网络中发现 IoT 设备,您只需要一台连接到瞻博网络 ATP 云的安全设备。 图 1 显示了此示例中使用的拓扑。

如拓扑所示,网络包括一些通过无线接入点 (AP) 连接到 SRX 系列防火墙的物联网设备。安全设备已连接到瞻博网络云 ATP 服务器和主机设备。
安全设备收集物联网设备元数据,并将相关信息流式传输到瞻博网络 ATP 云。若要启用 IoT 元数据流式处理,需要创建安全元数据流式处理策略,并将这些策略附加到安全策略。当瞻博网络云服务器具有足够的详细信息来对物联网设备进行分类时,物联网设备流量的流式传输会自动暂停。
瞻博网络 ATP 云可发现物联网设备并对其进行分类。使用发现的 IoT 设备清单,您将以动态地址组的形式创建威胁源。安全设备下载动态地址组后,您可以使用动态地址组为 IoT 流量创建并实施安全策略。
连接到 | 的区域接口 | |
---|---|---|
信任 | ge-0/0/2.0 | 客户端设备 |
不信任 | ge-0/0/4.0 和 ge-0/0/3.0 | 用于管理 IoT 流量的接入点 |
云 | ge-0/0/1.0 | 互联网(连接到瞻博网络 ATP 云) |
策略 | 类型 | 应用 |
---|---|---|
小一 | 安全策略 | 允许从信任区域到不信任区域的流量 |
小二 | 安全策略 | 允许从不信任区域到信任区域的流量 |
小三 | 安全策略 | 允许流量从信任区域到云区域 |
第 1 页 | 元数据流式处理策略 | 流式传输不信任区域到信任区域流量元数据 |
第 2 页 | 元数据流式处理策略 | 将信任区域流式传输到块区域流量元数据 |
Unwanted_Applications | 全球安全策略 | 根据全局环境中的威胁源和安全策略阻止 IoT 流量 |
要求
- SRX 系列防火墙或 NFX 系列设备
- IoT 安全是一项高级 ATP 功能,需要高级许可证(高级 1 或高级 2)才能获得权利。有关详细信息,请查看 ATP 云的软件许可证。
- Junos OS 22.1R1 或更高版本
- 瞻博网络高级威胁防御云帐户。请参阅 注册瞻博网络高级威胁防御云帐户。
我们已使用运行 Junos OS 22.1R1 版的 vSRX 虚拟防火墙实例验证并测试了配置。
配置
让您的 SRX 系列防火墙准备好与瞻博网络 ATP 云配合使用
您需要配置 SRX 系列防火墙才能与瞻博网络 ATP 云 Web 门户通信。确保您的 SRX 系列防火墙已连接到互联网。确保完成以下初始配置,以将 SRX 系列防火墙设置为互联网。
- 配置接口。在此示例中,我们将接口 ge-0/0/1.0 用作 SRX 系列防火墙上面向互联网的接口。
[edit] user@host# set interfaces ge-0/0/1 unit 0 family inet address 10.50.50.1/24
- 将接口添加到安全区域。
[edit] user@host# set security zones security-zone cloud interfaces ge-0/0/1.0 host-inbound-traffic system-services all user@host# set security zones security-zone cloud interfaces ge-0/0/1.0 host-inbound-traffic protocols all
- 配置 DNS。
[edit] user@host# set groups global system name-server 172.16.1.1
- 配置 NTP。
[edit] user@host# set groups global system processes ntp enable user@host# set groups global system ntp boot-server 192.168.1.20 user@host# set groups global system ntp server 192.168.1.20
一旦 SRX 系列可以通过 ge-0/0/1.0 接口访问互联网,请继续执行后续步骤。
- 检查所需的许可证和应用程序签名包
- 使用瞻博网络 ATP 云注册安全设备
- 配置 IoT 流量流设置
- 配置 SRX 系列防火墙
- 查看在 ATP 云中发现的 IoT 设备
- 创建威胁信息源
- 使用自适应威胁分析源创建安全策略
- 结果
检查所需的许可证和应用程序签名包
- 确保您拥有相应的瞻博网络 ATP 云许可证。
show system license
使用命令检查许可证状态。输出可能会显示基于 SRX 设备类型(SRX 或 vSRX)和 JUNOS 版本的旧版 ATP 云品牌 (SkyATP),如以下示例所示:user@host> show system license License identifier: JUNOS123456 License version: 4 Software Serial Number: 1234567890 Customer ID: JuniperTest Features: Sky ATP - Sky ATP: Cloud Based Advanced Threat Prevention on SRX firewalls date-based, 2016-07-19 17:00:00 PDT - 2016-07-30 17:00:00 PDT
root@host> show system license License identifier: JUNOS123456 License version: 4 Software Serial Number: 1234567890 Customer ID: JuniperTest Features: ATP Cloud - Cloud Based Advanced Threat Prevention on SRX firewalls date-based, 2016-07-19 17:00:00 PDT - 2016-07-30 17:00:00 PDT
注意:show system license
如果授权在云中进行托管,则 SRX 系列防火墙上的命令可能不会显示 ATP 云许可证。这是因为 SRX 系列设备不需要安装 ATP 云许可证密钥;相反,当您使用 SRX 系列序列号和授权码生成许可证密钥时,权利会自动传输到云服务器。对于 vSRX 虚拟防火墙,需要已安装的许可证。 - 确保您的安全设备安装了最新的应用签名包。
- 验证设备上是否安装了应用识别许可证。
user@host> show system license License usage: Licenses Licenses Licenses Expiry Feature name used installed needed logical-system 4 1 3 permanent License identifier: JUNOSXXXXXX License version: 2 Valid for device: AA4XXXX005 Features: appid-sig - APPID Signatur
- 下载最新版本的应用程序签名包。
user@host> request services application-identification download
- 检查下载状态。
user@host> request services application-identification download status Downloading application package 3475 succeeded.
- 安装应用程序标识签名包。
user@host> request services application-identification install
- 检查已安装的应用程序签名包版本。
user@host> show services application-identification version Application package version: 3418 Release date: Tue Sep 14 14:40:55 2021 UTC
- 验证设备上是否安装了应用识别许可证。
使用瞻博网络 ATP 云注册安全设备
让我们从使用瞻博网络 ATP 云注册安全设备开始。如果已注册设备,则可以跳过此步骤,直接跳转到 配置 IoT 流量流设置。如果没有,请使用以下方法之一进行设备注册。
方法一:使用 CLI 注册安全设备
- 在 SRX 系列防火墙上,运行以下命令以启动注册过程。
user@host> request services advanced-anti-malware enroll Please select geographical region from the list: 1. North America 2. European Region 3. Canada 4. Asia Pacific Your choice: 1
- 选择现有领域或创建新领域。
Enroll SRX to: 1. A new SkyATP security realm (you will be required to create it first) 2. An existing SkyATP security realm
选择选项 1 以创建领域。使用以下步骤:
-
You are going to create a new Sky ATP realm, please provide the required information:
-
Please enter a realm name (This should be a name that is meaningful to your organization. A realm name can only contain alphanumeric characters and the dash symbol. Once a realm is created, it cannot be changed): Real name: example-company-a
-
Please enter your company name: Company name: Example Company A
-
Please enter your e-mail address. This will be your username for your Sky ATP account: Email: me@example-company-a.com
-
Please setup a password for your new Sky ATP account (It must be at least 8 characters long and include both uppercase and lowercase letters, at least one number, at least one special character): Password: ********** Verify: **********
-
Please review the information you have provided: Region: North America New Realm: example-company-a Company name: Example Company A Email: me@example-company-a.com
-
Create a new realm with the above information? [yes,no] yes Device enrolled successfully!
您还可以使用现有领域将 SRX 系列注册到瞻博网络 ATP 云中。
-
show services advanced-anti-malware
使用状态 CLI 命令确认您的 SRX 系列防火墙已连接到云服务器。root@idpreg-iot-v2# run show services advanced-anti-malware dynamic-filter status Feb 09 18:36:46 Dynamic Filter Server Connection Status: Server Hostname: srxapi.us-west-2.sky.junipersecurity.net Server Port: 443 Proxy Hostname: None Proxy Port: None Control Plane Connection Status: Connected Last Successful Connect: 2022-02-09 18:36:07 PST Pkts Sent: 2 Pkts Received: 6
方法 2:在瞻博网络 ATP 云 Web 门户中注册安全设备
您可以使用 Junos OS作 (op) 脚本配置 SRX 系列防火墙,以连接到瞻博网络高级威胁防御云服务。
- 在瞻博网络 ATP 云 Web 门户上,单击设备页面上的注册按钮。
- 将命令复制到剪贴板,然后单击“确定”。
- 在作模式下,将命令粘贴到 SRX 系列防火墙的 Junos OS CLI 中。
show services advanced-anti-malware
使用 status 命令验证是否已从 SRX 系列防火墙连接到云服务器。以下示例中的服务器主机名仅是一个示例。user@host> show services advanced-anti-malware status
Server connection status: Server hostname: srxapi.us-west-2.sky.junipersecurity.net Server realm: qatest Server port: 443 Proxy hostname: None Proxy port: None Control Plane: Connection time: 2022-02-15 21:31:03 PST Connection status: Connected Service Plane: fpc0 Connection active number: 18 Connection retry statistics: 48在示例中,连接状态表示云服务器已连接到您的安全设备。
- 您还可以在瞻博网络 ATP 云门户中查看已注册的设备。转到 “设备”>“所有设备” 页面。该页面列出了所有已注册的设备。
配置 IoT 流量流设置
在此过程中,您将创建元数据流式处理策略并在安全设备上启用安全服务。
- 完成云连接配置。
[edit] user@host# set services security-intelligence url https://cloudfeeds.sky.junipersecurity.net/api/manifest.xml user@host# set services security-intelligence authentication tls-profile aamw-ssl
-
创建安全元数据流式处理策略。
[edit] user@host# set services security-metadata-streaming policy p1 dynamic-filter user@host# set services security-metadata-streaming policy p2 dynamic-filter
稍后,我们会将这些安全元数据流式处理策略附加到安全策略,以启用会话的 IoT 流量流式处理。
- 开启应用跟踪、应用识别、PKI 等安全服务。
[edit] user@host# set services application-identification user@host# set security pki user@host# set security application-tracking
配置 SRX 系列防火墙
使用此过程可在安全设备上配置接口、区域和策略,以启用物联网数据包过滤和流式传输服务。
-
配置接口。
[edit] user@host# set interfaces ge-0/0/2 mtu 9092 user@host# set interfaces ge-0/0/2 unit 0 family inet address 10.60.60.1/24 user@host# set interfaces ge-0/0/3 mtu 9092 user@host# set interfaces ge-0/0/3 unit 0 family inet address 10.70.70.1/24 user@host# set interfaces ge-0/0/4 mtu 9092 user@host# set interfaces ge-0/0/4 unit 0 family inet address 10.80.80.1/24
-
配置安全区域并为每个配置的区域启用应用程序流量。
[edit] user@host# set security zones security-zone trust interfaces ge-0/0/2.0 host-inbound-traffic system-services all user@host# set security zones security-zone trust interfaces ge-0/0/2.0 host-inbound-traffic protocols all user@host# set security zones security-zone trust application-tracking user@host# set security zones security-zone untrust interfaces ge-0/0/4.0 host-inbound-traffic system-services all user@host# set security zones security-zone untrust interfaces ge-0/0/4.0 host-inbound-traffic protocols all user@host# set security zones security-zone untrust interfaces ge-0/0/3.0 host-inbound-traffic system-services all user@host# set security zones security-zone untrust interfaces ge-0/0/3.0 host-inbound-traffic protocols all user@host# set security zones security-zone untrust application-tracking user@host# set security zones security-zone cloud application-tracking
如拓扑所示,不信任区域接收来自网络中 IoT 设备的中转和主机绑定流量。客户端设备位于信任区域,而瞻博网络 ATP 云位于云区域。
-
配置安全策略 P1。
[edit] user@host# set security policies from-zone trust to-zone untrust policy P1 match source-address any user@host# set security policies from-zone trust to-zone untrust policy P1 match destination-address any user@host# set security policies from-zone trust to-zone untrust policy P1 match application any user@host# set security policies from-zone trust to-zone untrust policy P1 then permit
此配置允许从信任区域到不信任区域的流量。
-
配置安全策略 P2。
[edit] user@host# set security policies from-zone untrust to-zone trust policy P2 match source-address any user@host# set security policies from-zone untrust to-zone trust policy P2 match destination-address any user@host# set security policies from-zone untrust to-zone trust policy P2 match application any user@host# set security policies from-zone untrust to-zone trust policy P2 then permit user@host# set security policies from-zone untrust to-zone trust application-services security-metadata-streaming-policy p1
该配置允许从不信任区域到信任区域的流量,并应用安全元数据流策略 p1 为会话启用 IoT 流量流。
-
配置安全策略 P3。
[edit] user@host# set security policies from-zone trust to-zone cloud policy P3 match source-address any user@host# set security policies from-zone trust to-zone cloud policy P3 match destination-address any user@host# set security policies from-zone trust to-zone cloud policy P3 match application any user@host# set security policies from-zone trust to-zone cloud policy P3 then permit user@host# set security policies from-zone trust to-zone cloud application-services security-metadata-streaming-policy p2
此配置允许从信任区域到云区域的流量,并应用安全元数据流策略 p2 为会话启用 IoT 流量流。
- 提交配置。
[edit] user@host# commit
让我们检查在瞻博网络 ATP 云门户中发现的所有物联网设备。
查看在 ATP 云中发现的 IoT 设备
要在瞻博网络 ATP 云门户中查看发现的 IoT 设备,请导航到 Minotor > IoT 设备 页面。

您可以根据设备类别、制造商、作系统类型单击并过滤 IoT 设备。


该页面列出了 IoT 设备,其中包含 IP 地址、类型、制造商、型号等详细信息。利用这些详细信息,您可以监控和创建威胁源以实施安全策略。
创建威胁信息源
瞻博网络 ATP 云识别到物联网设备后,您就可以创建威胁信息源。当您的安全设备以动态地址组的形式下载威胁源时,您可以使用安全策略中的源对这些 IoT 设备上的入站和出站流量采取强制措施。
- 转到 Minotor > IoT 设备 页面,然后单击 创建源 选项。
-
单击加号 (+)。此时将显示“添加新源”页面。
在此示例中,我们将使用生存时间 (TTL) 为 7 天的源名称 android_phone_user 。
-
信息源名称:
输入威胁源的唯一名称。信息源名称必须以字母数字字符开头,并且可以包含字母、数字和下划线;不允许有空格。长度为 8-63 个字符。
-
类型: 选择源的内容类型作为 IP。
-
数据来源: 选择用于将源创建为 IoT 的数据源。
-
活动时间: 输入所需 Feed 条目处于活动状态的天数。当源条目超过生存时间 (TTL) 值后,源条目将被自动删除。可用范围为 1-365 天。
-
- 单击 “确定 ”保存更改。
- 转到 配置>自适应威胁分析。该页面显示创建的所有威胁源。您可以看到页面上列出的威胁源 android_phone_user 。
单击威胁源以显示威胁源中包含的 IP 地址。
- 确保您的安全设备已下载信息源。下载会定期自动进行,但可能需要几分钟。
user@host> show services security-intelligence sec-profiling-feed status Category name :SecProfiling Feed name :Android_Phone_User Feed type :IP Last post time :N/A Last post status code:N/A Last post status :N/A Feed name :IT_feed Feed type :IP Last post time :N/A Last post status code:N/A Last post status :N/A Feed name :High_Risk_Users Feed type :IP Last post time :N/A Last post status code:N/A Last post status :N/A
您可以使用以下命令手动下载威胁信息源:
request services security-intelligence download status ||match android_phone_user
让我们继续使用下载的威胁源创建安全策略。
使用自适应威胁分析源创建安全策略
安全设备下载威胁信息源后,您可以在安全策略中将其称为动态地址组。动态地址是属于特定域的一组物联网设备 IP 地址。
在此示例中,我们创建一个策略来检测来自 Android 手机的流量并阻止流量。
- 定义安全策略匹配标准。
[edit] user@host# set security policies global policy Block_Android_Traffic match source-address android_phone_user user@host# set security policies global policy Block_Android_Traffic match destination-address any user@host# set security policies global policy Block_Android_Traffic match application any
- 定义安全策略作。
[edit] user@host# set security policies global policy Block_Android_Traffic then deny
在此示例中,当您提交配置时,您的安全设备会阻止属于特定域的 IoT 设备的 HTTP 流量。
有关详细信息,请参阅 配置自适应威胁分析。
结果
在配置模式下,输入 show security 命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。
[edit] user@host# show security policies from-zone trust to-zone untrust { policy P1 { match { source-address any; destination-address any; application any; } then { permit; } } } from-zone untrust to-zone trust { policy P2 { match { source-address any; destination-address any; application any; } then { permit; } } application-services { security-metadata-streaming-policy p1; } } from-zone trust to-zone cloud { policy P3 { match { source-address any; destination-address any; application any; } then { permit; } } application-services { security-metadata-streaming-policy p2; } }
user@host# show security policies global policy Block_Android_Traffic { match { source-address android_phone_user; destination-address any; application any; } then { deny; } }
检查安全区域。
[edit] user@host# show security zones security-zone trust { interfaces { ge-0/0/2.0 { host-inbound-traffic { system-services { all; } protocols { all; } } } } application-tracking; } security-zone untrust { interfaces { ge-0/0/4.0 { host-inbound-traffic { system-services { all; } protocols { all; } } } ge-0/0/3.0 { host-inbound-traffic { system-services { all; } protocols { all; } } } } application-tracking; } security-zone cloud { interfaces { ge-0/0/0.1 { host-inbound-traffic { system-services { all; } protocols { all; } } } } application-tracking; }
显示服务
[edit] user@host# show services advanced-anti-malware { dynamic-filter { traceoptions { file dyn-filterd-log size 1g world-readable; level all; flag all; } } connection { url https://srxapi.us-west-2.sky.junipersecurity.net; authentication { tls-profile aamw-ssl; } } } ssl { initiation { profile aamw-ssl { trusted-ca [ aamw-secintel-ca aamw-cloud-ca ]; client-certificate aamw-srx-cert; actions { crl { disable; } } } } } security-metadata-streaming { policy p1 { dynamic-filter; } policy p2 { dynamic-filter; } } security-intelligence { url https://cloudfeeds.sky.junipersecurity.net/api/manifest.xml; authentication { tls-profile aamw-ssl; } }
如果完成设备上的功能配置,请从配置模式进入提交。
验证
检查 Feed 摘要和状态
目的: 验证您的安全设备是否正在以动态地址组的形式接收 IP 地址源。
行动: 运行以下命令:
user@host> show services advanced-anti-malware dynamic-filter status Dynamic Filter Server Connection Status: Server Hostname: srxapi.us-west-2.sky.junipersecurity.net Server Port: 443 Proxy Hostname: None Proxy Port: None Control Plane Connection Status: Connected Last Successful Connect: 2022-02-12 09:51:50 PST Pkts Sent: 3 Pkts Received: 42
意义 输出显示瞻博网络 ATP 云服务器的连接状态和其他详细信息。