- Organized 252 files across project - Root directory: 187 → 2 files (98.9% reduction) - Moved configuration guides to docs/04-configuration/ - Moved troubleshooting guides to docs/09-troubleshooting/ - Moved quick start guides to docs/01-getting-started/ - Moved reports to reports/ directory - Archived temporary files - Generated comprehensive reports and documentation - Created maintenance scripts and guides All files organized according to established standards.
8.4 KiB
Cloudflare Access Setup Guide
This guide walks you through setting up Cloudflare Access (Zero Trust) to protect your Proxmox UI endpoints with SSO/MFA.
Overview
Cloudflare Access provides:
- ✅ Single Sign-On (SSO) - Use your existing identity provider
- ✅ Multi-Factor Authentication (MFA) - Additional security layer
- ✅ Device Posture Checks - Require managed devices
- ✅ Audit Logs - Track all access attempts
- ✅ Session Management - Control session duration
Prerequisites
- ✅ Cloudflare account with Zero Trust enabled
- ✅ Domain
d-bis.orgmanaged by Cloudflare - ✅ Tunnels created and configured (see main README)
- ✅ DNS records created (CNAME pointing to tunnels)
Step 1: Enable Cloudflare Zero Trust
-
Navigate to Cloudflare Zero Trust:
- Go to: https://one.dash.cloudflare.com
- Sign in with your Cloudflare account
-
Verify Zero Trust is enabled:
- If not enabled, you'll be prompted to enable it
- This is free for up to 50 users
Step 2: Create Tunnels in Cloudflare Dashboard
For each Proxmox host, create a separate tunnel:
2.1 Create Tunnel for ml110-01
- Go to Zero Trust → Networks → Tunnels
- Click "Create a tunnel"
- Select "Cloudflared"
- Enter tunnel name:
tunnel-ml110 - Click "Save tunnel"
- Copy the tunnel token (starts with
eyJ...)- Save this securely - you'll need it for VMID 102
2.2 Create Tunnel for r630-01
Repeat the same process:
- Tunnel name:
tunnel-r630-01 - Copy tunnel token
2.3 Create Tunnel for r630-02
Repeat the same process:
- Tunnel name:
tunnel-r630-02 - Copy tunnel token
Step 3: Configure Tunnel Public Hostnames
For each tunnel, configure the public hostname:
3.1 Configure ml110-01 Tunnel
- Click on tunnel
tunnel-ml110 - Click "Configure"
- Go to "Public Hostnames" tab
- Click "Add a public hostname"
- Configure:
- Subdomain:
ml110-01 - Domain:
d-bis.org - Service:
https://192.168.11.10:8006 - Type: HTTP
- Subdomain:
- Click "Save hostname"
3.2 Configure r630-01 Tunnel
Repeat for r630-01:
- Subdomain:
r630-01 - Domain:
d-bis.org - Service:
https://192.168.11.11:8006
3.3 Configure r630-02 Tunnel
Repeat for r630-02:
- Subdomain:
r630-02 - Domain:
d-bis.org - Service:
https://192.168.11.12:8006
Step 4: Create DNS Records
Create CNAME records in Cloudflare DNS:
- Go to Cloudflare Dashboard → DNS → Records
- Add records:
| Type | Name | Target | Proxy | TTL |
|---|---|---|---|---|
| CNAME | ml110-01 |
<tunnel-id-ml110>.cfargotunnel.com |
🟠 Proxied | Auto |
| CNAME | r630-01 |
<tunnel-id-r630-01>.cfargotunnel.com |
🟠 Proxied | Auto |
| CNAME | r630-02 |
<tunnel-id-r630-02>.cfargotunnel.com |
🟠 Proxied | Auto |
Important:
- ✅ Use CNAME (not A records)
- ✅ Enable proxy (orange cloud)
- ✅ Replace
<tunnel-id-*>with actual tunnel IDs from Step 2
Step 5: Configure Cloudflare Access Applications
For each Proxmox host, create an Access application:
5.1 Create Application for ml110-01
- Go to Zero Trust → Access → Applications
- Click "Add an application"
- Select "Self-hosted"
- Configure Application:
- Application name:
Proxmox ml110-01 - Application domain:
ml110-01.d-bis.org - Session duration:
8 hours(or your preference)
- Application name:
- Click "Next"
5.2 Configure Access Policy
- Click "Add a policy"
- Policy name:
Allow Team Access - Action:
Allow - Include:
- Select:
Emails - Value:
@yourdomain.com(or specific emails) - OR select
Countryand choose your country
- Select:
- Require:
- ✅ Multi-factor authentication (MFA)
- ✅ Email verification (optional but recommended)
- Click "Next"
5.3 Configure Additional Settings
- CORS settings: Leave default (not needed for Proxmox UI)
- Cookie settings: Leave default
- Click "Add application"
5.4 Repeat for Other Hosts
Repeat Steps 5.1-5.3 for:
- r630-01 →
r630-01.d-bis.org - r630-02 →
r630-02.d-bis.org
Step 6: Configure Identity Providers (Optional but Recommended)
If you want to use SSO instead of email-based auth:
6.1 Add Identity Provider
-
Go to Zero Trust → Access → Authentication
-
Click "Add new" under Identity Providers
-
Select your provider:
- Google Workspace
- Microsoft Azure AD
- Okta
- Generic OIDC
- Generic SAML
- etc.
-
Follow provider-specific setup instructions
6.2 Update Access Policies
- Go back to Applications
- Edit each application policy
- Change "Include" to use your identity provider
- Save changes
Step 7: Advanced Security Settings (Recommended)
7.1 Device Posture Checks
Require managed devices:
- Go to Zero Trust → Settings → WARP
- Enable WARP for your organization
- Go to Zero Trust → Access → Applications
- Edit application policy
- Add "Require" condition:
- Select:
Device Posture - Require:
Managed deviceorWARP client
- Select:
7.2 Country Blocking
Block access from specific countries:
- Edit application policy
- Add "Exclude" condition:
- Select:
Country - Value: Select countries to block
- Select:
7.3 IP Allowlisting
Restrict to specific IPs:
- Edit application policy
- Add "Include" condition:
- Select:
IP Address - Value: Your office/home IP ranges
- Select:
Step 8: Test Access
8.1 Test DNS Resolution
dig ml110-01.d-bis.org
dig r630-01.d-bis.org
dig r630-02.d-bis.org
Should resolve to Cloudflare IPs.
8.2 Test HTTPS Access
# Should redirect to Cloudflare Access login
curl -I https://ml110-01.d-bis.org
8.3 Test Browser Access
- Open browser
- Navigate to:
https://ml110-01.d-bis.org - Should see Cloudflare Access login page
- Login with your credentials
- Complete MFA if required
- Should redirect to Proxmox UI
Step 9: Monitor Access
9.1 View Access Logs
- Go to Zero Trust → Access → Logs
- View authentication attempts
- Check for failed login attempts
9.2 Set Up Alerts
- Go to Zero Trust → Settings → Notifications
- Configure email alerts for:
- Failed authentication attempts
- Suspicious activity
- Policy violations
Troubleshooting
Access Page Not Showing
Problem: Direct access to Proxmox UI, no Cloudflare Access page
Solutions:
- Verify DNS record has proxy enabled (orange cloud)
- Check tunnel is running:
systemctl status cloudflared-ml110 - Verify application is configured correctly
- Check Cloudflare dashboard for tunnel status
MFA Not Working
Problem: MFA prompt not appearing
Solutions:
- Verify MFA is enabled in policy
- Check identity provider settings
- Verify user has MFA configured
Can't Access After Login
Problem: Login successful but can't reach Proxmox UI
Solutions:
- Check tunnel is running
- Verify tunnel configuration points to correct IP:port
- Check Proxmox UI is accessible internally
- Review tunnel logs:
journalctl -u cloudflared-ml110 -f
Security Best Practices
- ✅ Always enable MFA - Required for admin interfaces
- ✅ Use short session durations - 4-8 hours for admin access
- ✅ Enable device posture checks - Require managed devices
- ✅ Monitor access logs - Review regularly for suspicious activity
- ✅ Use IP allowlisting - If you have static IPs
- ✅ Enable email verification - Additional security layer
- ✅ Set up alerts - Get notified of failed attempts
Quick Reference
Application URLs
- ml110-01:
https://ml110-01.d-bis.org - r630-01:
https://r630-01.d-bis.org - r630-02:
https://r630-02.d-bis.org
Tunnel Names
tunnel-ml110tunnel-r630-01tunnel-r630-02
Service Names
cloudflared-ml110.servicecloudflared-r630-01.servicecloudflared-r630-02.service
Next Steps
After completing this setup:
- ✅ Test access to all three Proxmox hosts
- ✅ Configure monitoring (see
MONITORING_GUIDE.md) - ✅ Set up alerting (see
MONITORING_GUIDE.md) - ✅ Review access logs regularly
- ✅ Update policies as needed
Support
For issues:
- Check Troubleshooting Guide
- Review Cloudflare Zero Trust documentation
- Check tunnel logs:
journalctl -u cloudflared-*