
CÔNG TY CỔ PHẦN DỊCH VỤ CÔNG NGHỆ DATECH
Cấu hình phát hiện thiết bị IoT và thực thi chính sách trên vSRX
Để bắt đầu phát hiện thiết bị IoT trong mạng của bạn, bạn chỉ cần một thiết bị bảo mật được kết nối với Juniper ATP Cloud. Hình 1 hiển thị sơ đồ mạng được sử dụng trong ví dụ này.
Hình 1: Sơ đồ Phát hiện Thiết bị IoT và Thực thi Chính sách
Như được hiển thị trong sơ đồ mạng, hệ thống bao gồm một số thiết bị IoT được kết nối với firewall dòng SRX thông qua điểm truy cập không dây (AP). Thiết bị bảo mật được kết nối với máy chủ Juniper Cloud ATP và một thiết bị đầu cuối.
Thiết bị bảo mật thu thập metadata của thiết bị IoT và truyền dữ liệu liên quan lên Juniper ATP Cloud. Để kích hoạt tính năng truyền metadata của thiết bị IoT, bạn cần tạo chính sách truyền metadata bảo mật và gán chúng vào các chính sách bảo mật. Việc truyền dữ liệu về lưu lượng của thiết bị IoT sẽ tự động tạm dừng khi máy chủ Juniper Cloud đã thu thập đủ thông tin để phân loại thiết bị IoT.
Juniper ATP Cloud sẽ phát hiện và phân loại các thiết bị IoT. Dựa trên danh sách các thiết bị IoT được phát hiện, bạn sẽ tạo nguồn dữ liệu mối đe dọa dưới dạng nhóm địa chỉ động (Dynamic Address Groups). Khi thiết bị bảo mật tải xuống nhóm địa chỉ động, bạn có thể sử dụng chúng để tạo và thực thi các chính sách bảo mật cho lưu lượng IoT.
Bảng 1 và Bảng 2 cung cấp chi tiết về các tham số được sử dụng trong ví dụ này.
Bảng 1: Các tham số cấu hình vùng bảo mật.
Zones | Interfaces | Connected To |
untrust | ge-0/0/4.0 and ge-0/0/3.0 | Access points to manage IoT traffic |
trust | ge-0/0/2.0 | Client device |
cloud | ge-0/0/1.0 | Internet (to connect to Juniper ATP cloud) |
Bảng 2: Tham số cấu hình chính sách bảo mật.
Policy | Type | Application |
P1 | Security policy | Allows traffic from trust zone to untrust zone |
P2 | Security policy | Allows traffic from untrust zone to trust zone |
P3 | Security policy | Allows traffic from trust zone to cloud zone |
P1 | Metadata streaming Policy | Streams untrust zone to trust zone traffic metadata |
P2 | Metadata streaming Policy | Streams trust zone to clod zone traffic metadata |
Unwanted_Applications | Global Security Policy | Prevents IoT traffic based on the threat feed and security policy at global-context |
Yêu cầu
Chúng tôi đã kiểm tra và xác nhận cấu hình này bằng cách sử dụng tường lửa ảo vSRX với Junos OS phiên bản 22.1R1.
Chuẩn bị Tường lửa SRX để làm việc với Juniper ATP Cloud
Bạn cần cấu hình tường lửa dòng SRX để có thể giao tiếp với cổng web Juniper ATP Cloud. Hãy đảm bảo rằng tường lửa SRX của bạn đã được kết nối Internet. Đồng thời, hãy hoàn tất các bước cấu hình ban đầu sau để đảm bảo tường lửa có thể kết nối với Internet.
- Cấu hình giao diện, trong ví dụ này, chúng tôi sử dụng giao diện ge-0/0/1.0 làm giao diện kết nối Internet trên tường lửa SRX.
[edit] user@host# set interfaces ge-0/0/1 unit 0 family inet address 10.50.50.1/24 |
- Thêm giao diện vào zone bảo mật
[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 |
- Cấu hình DNS
[edit] user@host# set groups global system name-server 172.16.1.1 |
- Cấu hình 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 |
Sau khi thiết bị firewall SRX Series của bạn có thể kết nối Internet thông qua giao diện ge-0/0/1.0, hãy tiến hành các bước tiếp theo
Bước 1: Kiểm tra giấy phép cần thiết và gói chữ ký ứng dụng
show system license
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 |
+ Xác minh rằng giấy phép nhận diện ứng dụng (Application Identification License) đã được cài đặt trên thiết bị của bạn.
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 |
+ Tải xuống phiên bản mới nhất của gói chữ ký ứng dụng (Application Signature Pack).
user@host> request services application-identification download |
+ Kiểm tra phiên bản gói chữ ký ứng dụng (Application Signature Pack) đã cài đặt.
user@host> show services application-identification version Application package version: 3418 Release date: Tue Sep 14 14:40:55 2021 UTC |
Bước 2: Đăng ký thiết bị bảo mật với Juniper ATP Cloud
Bắt đầu bằng việc đăng ký thiết bị bảo mật với Juniper ATP Cloud. Nếu thiết bị của bạn đã được đăng ký, bạn có thể bỏ qua bước này và chuyển thẳng đến phần Cấu hình Cài đặt Truyền Tải Lưu Lượng IoT. Nếu chưa, hãy sử dụng một trong các phương pháp sau để đăng ký thiết bị:
Phương pháp 1: Đăng ký thiết bị bảo mật bằng CLI
- Trên firewall SRX series, chạy lệnh sau để bắt đầu quá trình đăng ký:
user@host> request services advanced-anti-malware enroll Please select geographical region from the list:
Your choice: 1 |
- Chọn một realm hiện có hoặc tạo một realm mới.
Enroll SRX to:
|
- Chọn tùy chọn 1 để tạo một realm. Thực hiện các bước sau:
a.
You are going to create a new Sky ATP realm, please provide the required information: |
b.
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 |
c.
Please enter your company name: Company name: Example Company A |
d.
Please enter your e-mail address. This will be your username for your Sky ATP account: Email: me@example-company-a.com |
e.
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: ********** |
f.
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 |
g.
Create a new realm with the above information? [yes,no] yes Device enrolled successfully! |
Bạn cũng có thể sử dụng một realm hiện có để đăng ký SRX Series với Juniper ATP Cloud.
- Sử dụng lệnh sau để xác nhận rằng firewall SRX Series đã kết nối với máy chủ đám mây: show services advanced-anti-malware status
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 |
Phương pháp 2: Đăng ký thiết bị Bảo mật qua Cổng Web Juniper ATP Cloud
Bạn có thể sử dụng tập lệnh thao tác (op script) của Junos OS để cấu hình tường lửa dòng SRX kết nối với dịch vụ Juniper Advanced Threat Prevention (ATP) Cloud.
Thực hiện các bước sau:
1. Trên cổng web Juniper ATP Cloud, nhấp vào nút Enroll trong trang Devices.
2. Sao chép lệnh hiển thị vào clipboard, sau đó nhấp vào OK.
3. Dán lệnh vào CLI của Junos OS trên tường lửa SRX Series ở chế độ thao tác (operational mode).
4. Sử dụng lệnh sau để xác minh kết nối giữa SRX Series Firewall và máy chủ đám mây: show services advanced-anti-malware status. Tên máy chủ trong ví dụ sau chỉ mang tính minh họa.
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 |
Trong ví dụ, trạng thái kết nối cho thấy máy chủ đám mây đã kết nối với thiết bị bảo mật của bạn.
5. Bạn cũng có thể xem các thiết bị đã đăng ký trong cổng Juniper ATP Cloud. Đi tới Devices > All Devices. Trang này sẽ hiển thị danh sách tất cả các thiết bị đã đăng ký.
Cấu hình Cài đặt Truyền Tải Lưu Lượng IoT
Trong quy trình này, bạn sẽ tạo chính sách truyền tải metadata và kích hoạt dịch vụ bảo mật trên thiết bị bảo mật của mình.
- Hoàn tất cấu hình kết nối đám mây
[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 |
- Tạo chính sách truyền phát siêu dữ liệu bảo mật.
[edit] user@host# set services security-metadata-streaming policy p1 dynamic-filter user@host# set services security-metadata-streaming policy p2 dynamic-filter |
Sau đó, chúng ta sẽ gán chính sách truyền tải metadata bảo mật vào chính sách bảo mật để kích hoạt truyền tải lưu lượng IoT cho phiên làm việc.
- Bật các dịch vụ bảo mật, bao gồm: theo dõi ứng dụng (Application Tracking), nhận diện ứng dụng (Application Identification), cơ sở hạ tầng khóa công khai (PKI - Public Key Infrastructure)
[edit] user@host# set services application-identification user@host# set security pki user@host# set security application-tracking |
Cấu hình firewall SRX Series
Sử dụng quy trình này để cấu hình giao diện, vùng bảo mật, chính sách, cũng như bật lọc gói IoT và dịch vụ truyền tải trên thiết bị bảo mật của bạn.
- Cấu hình giao diện
[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 |
- Cấu hình vùng bảo mật (Security Zones) và bật lưu lượng ứng dụng cho từng vùng đã được cấu hình.
[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 |
Như được hiển thị trong sơ đồ mạng, vùng Untrust nhận lưu lượng chuyển tiếp và lưu lượng hướng đến thiết bị từ các thiết bị IoT trong mạng. Thiết bị khách nằm trong vùng Trust, và Juniper ATP Cloud nằm trong vùng Cloud.
- Cấu hình chính sách bảo mật 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 |
Cấu hình này cho phép lưu lượng từ vùng Trust đến vùng Untrust.
- Cấu hình chính sách bảo mật 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 |
Cấu hình này cho phép lưu lượng từ vùng Untrust đến vùng Trust và áp dụng chính sách truyền tải metadata bảo mật P1 để kích hoạt truyền tải lưu lượng IoT cho phiên làm việc.
- Cấu hình chính sách bảo mật 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 |
Cấu hình này cho phép lưu lượng từ vùng Trust đến vùng Cloud và áp dụng chính sách truyền tải metadata bảo mật P2 để kích hoạt truyền tải lưu lượng IoT cho phiên làm việc.
- Xác nhận và áp dụng cấu hình
[edit] user@host# commit |
Bây giờ, thiết bị bảo mật của bạn đã sẵn sàng để truyền tải lưu lượng IoT đến Juniper ATP Cloud.
Hãy kiểm tra tất cả các thiết bị IoT đã được phát hiện trong cổng Juniper ATP Cloud.
Xem các Thiết bị IoT Đã Phát Hiện trong ATP Cloud
Để xem các thiết bị IoT đã được phát hiện trong cổng Juniper ATP Cloud, điều hướng đến: Monitor > IoT Devices
Bạn có thể nhấp chọn và lọc các thiết bị IoT dựa trên danh mục thiết bị, nhà sản xuất, loại hệ điều hành.

Trong hình ảnh sau, chúng tôi đang lọc các thiết bị sử dụng hệ điều hành Android.
Trang này hiển thị danh sách các thiết bị IoT cùng với các thông tin chi tiết như địa chỉ IP, loại thiết bị, nhà sản xuất, model, v.v. Dựa vào những thông tin này, bạn có thể giám sát và tạo danh sách mối đe dọa (threat feeds) để thực thi chính sách bảo mật.
Tạo Danh Sách Mối Đe Dọa (Threat Feeds)
Sau khi Juniper ATP Cloud nhận diện các thiết bị IoT, bạn có thể tạo danh sách mối đe dọa. Khi thiết bị bảo mật tải về các threat feeds dưới dạng nhóm địa chỉ động (dynamic address groups), bạn có thể sử dụng danh sách này trong chính sách bảo mật để thực thi các biện pháp bảo vệ lưu lượng vào và ra của các thiết bị IoT.
- Đi tới Monitor > IoT Devices, sau đó nhấp vào tùy chọn Create Feeds.
- Nhấp vào dấu "+". Trang Add New Feed sẽ xuất hiện.
Trong ví dụ này, chúng tôi sẽ sử dụng tên danh sách mối đe dọa là android_phone_user với thời gian tồn tại (TTL - Time-To-Live) là 7 ngày.
Hoàn tất cấu hình cho các trường sau:
Feed Name (Tên danh sách mối đe dọa):
Nhập tên duy nhất cho danh sách mối đe dọa. Tên phải bắt đầu bằng ký tự chữ hoặc số và có thể chứa chữ cái, số, dấu gạch dưới (_) nhưng không được có khoảng trắng. Độ dài từ 8–63 ký tự.
Type (Loại):
Chọn IP làm loại nội dung của danh sách mối đe dọa.
Data Source (Nguồn dữ liệu):
Chọn IOT làm nguồn dữ liệu để tạo danh sách mối đe dọa.
Time to Live (Thời gian tồn tại - TTL):
Nhập số ngày mà danh sách mối đe dọa sẽ có hiệu lực. Khi vượt quá giá trị TTL, mục nhập sẽ bị xóa tự động. Khoảng giá trị hợp lệ: 1–365 ngày.
- Nhấp vào OK để lưu thay đổi.
- Đi tới Configure > Adaptive Threat Profiling. Trang này sẽ hiển thị tất cả các danh sách mối đe dọa đã tạo, bao gồm android_phone_user.
Nhấp vào danh sách mối đe dọa (threat feed) để hiển thị các địa chỉ IP được bao gồm trong danh sách.
- Đảm bảo rằng thiết bị bảo mật của bạn đã tải xuống danh sách mối đe dọa. Việc tải xuống diễn ra tự động theo các khoảng thời gian định kỳ, nhưng có thể mất vài phút để hoàn tất.
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 |
Bạn có thể tải xuống thủ công nguồn cấp dữ liệu về mối đe dọa bằng lệnh sau:
request services security-intelligence download status ||match android_phone_user |
Tiến hành tạo các chính sách bảo mật với danh sách mối đe dọa đã tải xuống.
Tạo chính sách bảo mật sử dụng Adaptive Threat Profiling Feeds
Sau khi thiết bị bảo mật tải xuống danh sách mối đe dọa (threat feed), bạn có thể sử dụng nó làm nhóm địa chỉ động (dynamic address group) trong chính sách bảo mật. Nhóm địa chỉ động là tập hợp các địa chỉ IP của các thiết bị IoT thuộc một miền cụ thể.
Trong ví dụ này, chúng tôi sẽ tạo một chính sách bảo mật để phát hiện lưu lượng từ điện thoại Android và chặn lưu lượng đó.
- Xác định tiêu chí khớp cho chính sách bảo mật
[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 |
- Xác định hành động chính sách bảo mật
[edit] user@host# set security policies global policy Block_Android_Traffic then deny |
Trong ví dụ này, khi bạn cam kết (commit) cấu hình, thiết bị bảo mật của bạn sẽ chặn lưu lượng HTTP từ các thiết bị IoT thuộc miền cụ thể.
Kết quả
Từ chế độ cấu hình (configuration mode), xác nhận cấu hình của bạn bằng cách nhập lệnh:
show security
Nếu đầu ra không hiển thị cấu hình mong muốn, hãy lặp lại các bước cấu hình trong ví dụ này để sửa lỗi.
[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;}} |
Kiểm tra vùng bảo mật (security zones).
[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;} |
show services
[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;}} |
Nếu bạn đã hoàn tất cấu hình tính năng trên thiết bị, hãy nhập lệnh sau từ chế độ cấu hình để lưu thay đổi: commit
Kiểm tra Tổng quan và Trạng thái của Feed
Mục đích: Xác minh xem thiết bị bảo mật của bạn có đang nhận danh sách địa chỉ IP dưới dạng nhóm địa chỉ động (dynamic address groups) hay không.
Thực hiện: Chạy lệnh sau:
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 |
Như vậy là chúng ta đã hoàn thành Cấu hình phát hiện thiết bị IoT và thực thi chính sách trên vSRX, chúc các bạn thực hiện thành công.Hi vọng bài viết này sẽ giúp ích cho các bạn trong công việc.
Nếu bạn có vấn đề gì thắc mắc đừng ngần ngại liên hệ với chúng tôi theo thông tin dưới đây để được hỗ trợ thêm.
Hẹn gặp lại các bạn trong các bài viết tiếp theo !
CÔNG TY CỔ PHẦN DỊCH VỤ CÔNG NGHỆ DATECH
• Địa chỉ: Số 23E4 KĐT Cầu Diễn, Tổ 7, Phú Diễn, Bắc Từ Liêm, Hà Nội
• Điện thoại: 02432012368
• Hotline: 098 115 6699
• Email: info@datech.vn
• Website: https://datech.vn