hoatranlab.io.vn Zalo: 0917516878 Hotline: 0917516878 [email protected] LinkedIn
HoaTranLab Logo HoaTranLab
Trang chủ / Security / PAN-OS Lab 12 Tuần / Tuần 02
PAN-OS Administration Lab · Tuần 02/12

📘 Tuần 2 – Admin, Phân quyền và Password Policy

Trần Văn Hòa 2026 ~15 phút đọc Palo Alto · PAN-OS · PnetLab

📘 Tuần 2 – Admin, Phân quyền và Password Policy


🗺️ Sơ đồ – Hệ thống Admin và Phân quyền

graph TD subgraph PAN["🔥 Palo Alto Firewall – Quản trị"] subgraph Roles["👥 Admin Roles (Vai trò)"] SuperUser["👑 superuser Toàn quyền mọi thứ"] DeviceAdmin["🔧 deviceadmin Quản trị thiết bị Không xóa được admin khác"] OpAdmin["⚙️ Custom Role net-operator Chỉ vận hành mạng"] ReadOnly["👁️ Custom Role read-only-viewer Chỉ xem"] end subgraph AuthProfile["🔑 Authentication Profile"] Local["Local Database Tài khoản nội bộ"] LDAP_box["LDAP/AD Kết nối domain"] RADIUS_box["RADIUS Xác thực tập trung"] end subgraph PWPolicy["🔐 Password Policy"] PP["✅ Tối thiểu 8 ký tự ✅ Chữ hoa + thường ✅ Số + ký tự đặc biệt ✅ Hết hạn 90 ngày ✅ Lockout 3 lần sai"] end end GUI["🌐 GUI https://192.168.1.1"] SSH_box["⌨️ SSH port 22"] GUI --> SuperUser GUI --> DeviceAdmin SSH_box --> OpAdmin

📚 Lý thuyết cơ bản

🔰 Admin Roles trong Palo Alto

Palo Alto có 2 loại vai trò admin:

1. Dynamic Roles (Vai trò cố định):

RoleQuyền hạn
superuserToàn quyền, kể cả tạo/xóa admin khác
superreaderChỉ đọc toàn bộ
deviceadminQuản trị thiết bị, không thay đổi được admin superuser
devicereaderChỉ đọc cấu hình thiết bị

2. Custom Roles (Vai trò tùy chỉnh):

💡 Bạn tự định nghĩa: admin này được xem log, admin kia được thay đổi policy, admin khác chỉ xem không sửa.

🔰 Authentication Profile là gì?

Authentication Profile = "Cổng kiểm tra danh tính" – quy định cách xác thực khi đăng nhập.

💡 Giống như cổng an ninh sân bay: - Dùng CMND (Local DB) → đơn giản, phù hợp lab nhỏ. - Dùng passport có chip (LDAP/AD) → chuyên nghiệp, dùng tài khoản Windows domain. - Dùng Face ID + CMND (RADIUS + MFA) → bảo mật cao nhất.

🔰 Commit trong Palo Alto – Tại sao quan trọng?

💡 Palo Alto hoạt động theo mô hình "Running Config vs Candidate Config": - Candidate Config = Bản nháp (chỗ bạn đang thay đổi). - Running Config = Bản đang chạy thực tế. - Commit = Áp dụng bản nháp → thành bản chạy thực tế. Nếu không Commit → thiết bị reboot → mất hết thay đổi!


🛠️ Thực hành

Tạo Custom Admin Role

text# Qua GUI: Device → Admin Roles → Add
# Qua CLI:
admin@PA-LAB-01# set shared admin-role net-operator role device
admin@PA-LAB-01# set shared admin-role net-operator role device webui network read-write
admin@PA-LAB-01# set shared admin-role net-operator role device webui policies read-only

Tạo tài khoản Admin mới

text# Tạo admin vận hành mạng
admin@PA-LAB-01# set mgt-config users netadmin password
admin@PA-LAB-01# set mgt-config users netadmin permissions role-based custom profile net-operator

# Tạo admin chỉ xem
admin@PA-LAB-01# set mgt-config users ro_viewer password
admin@PA-LAB-01# set mgt-config users ro_viewer permissions role-based custom profile read-only-viewer

# Lưu lại
admin@PA-LAB-01# commit

Bật Password Policy

text# GUI: Device → Setup → Management → Password Complexity
admin@PA-LAB-01# set mgt-config password-complexity enabled yes
admin@PA-LAB-01# set mgt-config password-complexity minimum-length 12
admin@PA-LAB-01# set mgt-config password-complexity uppercase yes
admin@PA-LAB-01# set mgt-config password-complexity lowercase yes
admin@PA-LAB-01# set mgt-config password-complexity numeric yes
admin@PA-LAB-01# set mgt-config password-complexity special-char yes
admin@PA-LAB-01# set mgt-config password-complexity password-change-on-first-login yes
admin@PA-LAB-01# set mgt-config password-expiry-days 90
admin@PA-LAB-01# commit

Bật Lockout sau nhiều lần đăng nhập sai

text# GUI: Device → Setup → Management → Authentication Settings
admin@PA-LAB-01# set deviceconfig setting management failed-attempts 3
admin@PA-LAB-01# set deviceconfig setting management lockout-time 10
admin@PA-LAB-01# commit

🔒 Bảo mật cần nhớ

  • ✅ Không dùng chung tài khoản admin giữa nhiều người.
  • ✅ Dùng Custom Role – không gán superuser cho vận hành hàng ngày.
  • ✅ Bật lockout sau 3 lần đăng nhập sai → chống brute-force.
  • Commit sau mọi thay đổi!

📖 Case thực tế

Công ty có 5 kỹ thuật viên cùng dùng tài khoản admin. Một ngày security policy bị thay đổi sai → không ai nhận lỗi vì log chỉ ghi "admin đã thay đổi". 👉 Giải pháp: Tạo tài khoản named riêng + Custom Role cho từng người.


📅 Tuần 2/12 – PAN-OS Administration Lab trên PnetLab