Chuyển đến nội dung
Skillpedia
Bảo mật35k · #8079

implementing-network-access-control

Skill này làm gì

Hệ thống này bảo đảm chỉ những thiết bị được ủy quyền và an toàn mới kết nối được với mạng của bạn. Nó kiểm tra danh tính và mức độ an toàn của thiết bị trước khi cho phép truy cập, rồi đưa thiết bị vào các “mạng ảo” (VLAN) khác nhau tùy theo người dùng hoặc thiết bị đó là ai.

Khi nào nên dùng

  • ✓Khi bạn muốn bảo đảm chỉ người dùng và thiết bị đáng tin cậy mới truy cập được mạng.
  • ✓Khi bạn cần cách ly các thiết bị không an toàn, ví dụ thiết bị chưa cập nhật phần mềm diệt virus.
  • ✓Khi cần tuân thủ quy định bảo mật dữ liệu, chẳng hạn PCI-DSS hoặc HIPAA.

Liên kết skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-network-access-control/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-network-access-control/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy thiết lập kiểm soát truy cập mạng để chỉ thiết bị của đội IT mới vào được mạng chính.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Hệ thống dùng một máy chủ trung tâm (RADIUS) để xác minh thông tin đăng nhập của bất kỳ ai cố gắng kết nối. Nếu được chấp thuận, hệ thống kiểm tra thiết bị có an toàn không rồi đưa nó vào đúng mạng ảo.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Implementing Network Access Control

When to Use

  • Enforcing identity-based network access where only authenticated and compliant devices connect to the network
  • Implementing zero-trust networking at the access layer with dynamic VLAN assignment based on user role
  • Quarantining non-compliant devices that fail endpoint posture checks (missing patches, disabled AV)
  • Meeting compliance requirements (PCI-DSS, HIPAA, SOC 2) for network access controls
  • Onboarding BYOD devices with automated provisioning and limited network access

Do not use as a standalone security solution without complementary controls, for networks with devices that do not support 802.1X supplicants, or without proper fallback mechanisms for critical infrastructure.

Prerequisites

  • RADIUS server (FreeRADIUS, Microsoft NPS, or Cisco ISE) configured with user/device authentication
  • Managed switches supporting 802.1X port-based authentication
  • Certificate Authority for EAP-TLS certificate distribution (optional but recommended)
  • PacketFence or similar NAC platform for posture assessment and remediation
  • Active Directory or LDAP directory for centralized user authentication
  • DHCP server integration for dynamic IP assignment per VLAN

Workflow

Step 1: Install and Configure FreeRADIUS

# Install FreeRADIUS
sudo apt install -y freeradius freeradius-utils freeradius-ldap

# Configure RADIUS clients (switches that authenticate against RADIUS)
sudo tee /etc/freeradius/3.0/clients.conf << 'EOF'
client switch-core-01 {
    ipaddr = 10.10.100.1
    secret = R4d1u5_S3cr3t_K3y!
    shortname = core-switch
    nastype = cisco
}

client switch-access-01 {
    ipaddr = 10.10.100.10
    secret = R4d1u5_S3cr3t_K3y!
    shortname = access-switch-01
    nastype = cisco
}

client switch-access-02 {
    ipaddr = 10.10.100.11
    secret = R4d1u5_S3cr3t_K3y!
    shortname = access-switch-02
    nastype = cisco
}
EOF

# Configure LDAP module for Active Directory integration
sudo tee /etc/freeradius/3.0/mods-available/ldap << 'EOF'
ldap {
    server = 'ldap://dc01.corp.example.com'
    identity = 'CN=radius-svc,OU=Service Accounts,DC=corp,DC=example,DC=com'
    password = 'ServiceAccountPassword123!'
    base_dn = 'DC=corp,DC=example,DC=com'

    user {
        base_dn = "${..base_dn}"
        filter = "(sAMAccountName=%{%{Stripped-User-Name}:-%{User-Name}})"
    }

    group {
        base_dn = "${..base_dn}"
        filter = "(objectClass=group)"
        membership_attribute = 'memberOf'
    }
}
EOF

sudo ln -s /etc/freeradius/3.0/mods-available/ldap /etc/freeradius/3.0/mods-enabled/ldap

Step 2: Configure VLAN Assignment Policies

# Configure authorization policies for dynamic VLAN assignment
sudo tee /etc/freeradius/3.0/policy.d/vlan-assignment << 'EOF'
# VLAN assignment based on group membership
vlan_assignment {
    if (&LDAP-Group[*] == "CN=IT-Staff,OU=Groups,DC=corp,DC=example,DC=com") {
        update reply {
            Tunnel-Type = VLAN
            Tunnel-Medium-Type = IEEE-802
            Tunnel-Private-Group-ID = "10"
        }
    }
    elsif (&LDAP-Group[*] == "CN=Developers,OU=Groups,DC=corp,DC=example,DC=com") {
        update reply {
            Tunnel-Type = VLAN
            Tunnel-Medium-Type = IEEE-802
            Tunnel-Private-Group-ID = "15"
        }
    }
    elsif (&LDAP-Group[*] == "CN=Finance,OU=Groups,DC=corp,DC=example,DC=com") {
        update reply {
            Tunnel-Type = VLAN
            Tunnel-Medium-Type = IEEE-802
            Tunnel-Private-Group-ID = "20"
        }
    }
    else {
        # Default: Guest VLAN for unknown users
        update reply {
            Tunnel-Type = VLAN
            Tunnel-Medium-Type = IEEE-802
            Tunnel-Private-Group-ID = "40"
        }
    }
}
EOF

# Add vlan_assignment to the authorize section
# Edit /etc/freeradius/3.0/sites-enabled/default
# In the authorize section, add: vlan_assignment

# Configure EAP for 802.1X authentication
sudo tee /etc/freeradius/3.0/mods-available/eap << 'EAPEOF'
eap {
    default_eap_type = peap
    timer_expire = 60
    max_sessions = 4096

    tls-config tls-common {
        private_key_file = /etc/freeradius/3.0/certs/server.key
        certificate_file = /etc/freeradius/3.0/certs/server.pem
        ca_file = /etc/freeradius/3.0/certs/ca.pem
        dh_file = /etc/freeradius/3.0/certs/dh
        cipher_list = "HIGH:!aNULL:!MD5"
        tls_min_version = "1.2"
    }

    peap {
        tls = tls-common

…
Câu hỏi thường gặp

RADIUS là gì?

Đây là giao thức mạng cho phép một máy chủ trung tâm xác thực người dùng và thiết bị khi họ cố truy cập mạng.

VLAN là gì?

Đó là mạng ảo cho phép nhóm các thiết bị như thể chúng nằm trên một mạng vật lý riêng, ngay cả khi chúng được kết nối với các switch khác nhau.

“Posture assessment” là gì?

Đó là quá trình kiểm tra mức độ an toàn của thiết bị, ví dụ xem có phần mềm diệt virus đã cài và cập nhật chưa, hoặc hệ điều hành đã có các bản vá bảo mật mới nhất chưa.

Chi tiết

Mô tả gốc của tác giả

Implements 802.1X port-based network access control using RADIUS authentication, PacketFence NAC, and switch configuration to enforce identity-based access policies, posture assessment, and automatic VLAN assignment for authorized devices. Use when enforcing zero-trust access at the network edge, quarantining non-compliant endpoints, meeting PCI-DSS/HIPAA/SOC 2 access requirements, or onboarding B

repo: mukul975/Anthropic-Cybersecurity-Skills

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#8079
Giấy phép
Apache-2.0
Cập nhật
31/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự