Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)35k · #7780

deploying-cloudflare-access-for-zero-trust

Skill này làm gì

Công cụ này giúp thiết lập hệ thống bảo mật có tên Cloudflare Access. Nó cho phép bạn kiểm soát ai được truy cập ứng dụng nội bộ (như website hoặc hệ thống tệp) một cách an toàn, mà không cần VPN truyền thống.

Khi nào nên dùng

  • ✓Khi bạn muốn thay VPN bằng truy cập an toàn hơn, dựa trên danh tính.
  • ✓Khi bạn muốn đưa ứng dụng nội bộ ra bên ngoài mà không phải mở cổng trên router.
  • ✓Khi bạn cần cấp quyền truy cập an toàn cho nhà thầu hoặc đối tác đối với các ứng dụng cụ thể.

Liên kết skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/deploying-cloudflare-access-for-zero-trust/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/deploying-cloudflare-access-for-zero-trust/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

“Thiết lập truy cập an toàn cho hệ thống wiki nội bộ của tôi bằng Cloudflare.”

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

Cách hoạt động

Trước tiên, bạn cài chương trình tên “cloudflared” để tạo đường hầm an toàn đến ứng dụng của bạn. Sau đó, bạn kết nối với nhà cung cấp danh tính (như Google hoặc Microsoft) và đặt quy tắc về ai được truy cập gì.

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.

Deploying Cloudflare Access for Zero Trust

When to Use

  • When replacing VPN infrastructure with identity-aware application access using Cloudflare One
  • When exposing self-hosted internal applications through Cloudflare Tunnel without opening inbound ports
  • When implementing ZTNA for a distributed workforce accessing web applications, SSH, and RDP services
  • When needing a cost-effective zero trust solution with integrated DLP, CASB, and SWG capabilities
  • When securing contractor and third-party access to specific applications without full network access

Do not use for applications requiring persistent UDP connections not supported by Cloudflare Tunnel, for environments requiring air-gapped or fully on-premises access control, or when regulatory requirements prohibit routing traffic through third-party cloud infrastructure.

Prerequisites

  • Cloudflare account with Zero Trust subscription (Free for up to 50 users, paid plans for larger teams)
  • Domain name managed by Cloudflare DNS (or ability to add CNAME records)
  • Linux, Windows, or macOS server to run cloudflared tunnel daemon
  • Identity provider: Okta, Microsoft Entra ID, Google Workspace, GitHub, or any SAML/OIDC provider
  • Cloudflare WARP client for device-level enrollment (optional but recommended)

Workflow

Step 1: Create a Cloudflare Tunnel to Internal Applications

Install cloudflared and create a persistent tunnel to expose internal services.

# Install cloudflared on Ubuntu/Debian
curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb \
  -o cloudflared.deb
sudo dpkg -i cloudflared.deb

# Authenticate cloudflared with your Cloudflare account
cloudflared tunnel login

# Create a named tunnel
cloudflared tunnel create internal-apps
# Output: Created tunnel internal-apps with id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

# Configure tunnel routes to internal applications
cat > ~/.cloudflared/config.yml << 'EOF'
tunnel: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
credentials-file: /home/admin/.cloudflared/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.json

ingress:
  - hostname: wiki.company.com
    service: http://localhost:8080
  - hostname: git.company.com
    service: http://10.1.1.50:3000
  - hostname: grafana.company.com
    service: http://10.1.1.60:3000
  - hostname: ssh.company.com
    service: ssh://localhost:22
  - hostname: rdp.company.com
    service: rdp://10.1.1.100:3389
  # Catch-all rule (required)
  - service: http_status:404
EOF

# Route DNS to the tunnel
cloudflared tunnel route dns internal-apps wiki.company.com
cloudflared tunnel route dns internal-apps git.company.com
cloudflared tunnel route dns internal-apps grafana.company.com

# Run tunnel as a systemd service
sudo cloudflared service install
sudo systemctl enable cloudflared
sudo systemctl start cloudflared

# Verify tunnel status
cloudflared tunnel info internal-apps

Step 2: Configure Identity Provider Integration

Set up authentication with your organization's identity provider.

# Using Cloudflare API to configure Okta as IdP
curl -X PUT "https://api.cloudflare.com/client/v4/accounts/{account_id}/access/identity_providers" \
  -H "Authorization: Bearer ${CF_API_TOKEN}" \
  -H "Content-Type: application/json" \
  --data '{
    "name": "Corporate Okta",
    "type": "okta",
    "config": {
      "client_id": "OKTA_CLIENT_ID",
      "client_secret": "OKTA_CLIENT_SECRET",
      "okta_account": "company.okta.com",
      "api_token": "OKTA_API_TOKEN",
      "claims": ["email", "groups", "name"],
      "email_claim_name": "email"
    }
  }'

# Configure Microsoft Entra ID as additional IdP
curl -X POST "https://api.cloudflare.com/client/v4/accounts/{account_id}/access/identity_providers" \
  -H "Authorization: Bearer ${CF_API_TOKEN}" \
  -H "Content-Type: application/json" \
  --data '{
    "name": "Microsoft Entra ID",
    "type": "azureAD",
    "config": {
      "client_id": "AZURE_APP_CLIENT_ID",
      "client_secret": "AZURE_APP_CLIENT_SECRET",
      "directory_id": "AZURE_TENANT_ID",
      "support_groups": true,
      "claims": ["email", "groups", "name"]
    }
  }'

Step 3: Create Access Applications and Policies

Define Access applications with identity-aware policies for each internal service.

# Create Access application for internal wiki
curl -X POST "https://api.cloudflare.com/client/v4/accounts/{account_id}/access/apps" \
  -H "Authorization: Bearer ${CF_API_TOKEN}" \

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

“Zero Trust” là gì?

Đây là cách tiếp cận bảo mật coi mọi người và thiết bị đều không đáng tin theo mặc định. Mọi thứ phải được xác minh trước khi được cấp quyền truy cập.

Tôi có phải trả tiền cho Cloudflare Access không?

Không, gói miễn phí của Cloudflare cho phép truy cập tối đa 50 người dùng, rất phù hợp để bắt đầu.

Cloudflare WARP là gì?

Đây là ứng dụng bạn cài trên máy của người dùng để kết nối an toàn với các ứng dụng nội bộ, hoạt động giống một VPN hiện đại.

Chi tiết

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

Deploys Cloudflare Access with Cloudflare Tunnel for zero trust access to self-hosted apps, configuring identity-aware policies, device posture checks, and WARP client enrollment as a VPN replacement. Use when replacing VPN with Cloudflare One, exposing internal apps without open inbound ports, or securing contractor/third-party access to specific applications.

repo: mukul975/Anthropic-Cybersecurity-Skills

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#7780
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ự