Path Panel DDoS Protection Management Panel User Guide
Complete REXE Path Panel user guide: Dashboard, My IPs, TR protection status, rule management, attack history, abuse filtered, password change and API access.
Complete guide to Cloudflare setup, DNS configuration, WAF rules, Page Rules, Under Attack mode, and origin IP hiding to protect your server from DDoS attacks.
Cloudflare is a powerful platform that protects your website from DDoS attacks, provides a content delivery network (CDN), and improves performance. This guide covers integrating Cloudflare with your server, DNS configuration, creating WAF rules, and advanced protection features.
On REXE servers, Cloudflare integration can be used alongside Path Panel DDoS protection to provide multi-layered security.
To get started with Cloudflare, you need to create an account and add your site.
example.com)For Cloudflare to work, you need to point your domain's nameservers to Cloudflare.
Cloudflare provides two nameserver addresses:
ns1.cloudflare.com
ns2.cloudflare.com
Update these addresses from your domain registrar's panel.
Manage your records in the Cloudflare DNS panel:
Type Name Content Proxy
A example.com 185.x.x.x Proxied (orange cloud)
A www 185.x.x.x Proxied
A api 185.x.x.x Proxied
MX example.com mail.example.com DNS only (gray cloud)
TXT example.com v=spf1 ... DNS only
Keep email records like MX, SPF, and DKIM in "DNS only" (gray cloud) mode. Email services won't work in proxy mode.
| Status | Description |
|---|---|
| Proxied (Orange) | Traffic passes through Cloudflare, DDoS protection active |
| DNS Only (Gray) | DNS resolution only, no protection |
# DNS resolution check
dig +short example.com
# If Cloudflare proxy is active, Cloudflare IPs will appear
# Real IP check
curl -s https://www.cloudflare.com/ips-v4
One of Cloudflare's most important advantages is hiding your server's real IP address. However, you need to watch out for certain leak points.
# 1. IP leak from mail server headers
# Solution: Use a different IP/server for email
# 2. Old DNS records (SecurityTrails, Shodan)
# Solution: Change IP after Cloudflare setup
# 3. Direct IP access
# Solution: Only allow traffic from Cloudflare IPs on the server
# Allow only Cloudflare IPs with iptables
#!/bin/bash
# Cloudflare IPv4 ranges
CF_IPS=$(curl -s https://www.cloudflare.com/ips-v4)
# Clear existing HTTP/HTTPS rules
iptables -D INPUT -p tcp --dport 80 -j ACCEPT 2>/dev/null
iptables -D INPUT -p tcp --dport 443 -j ACCEPT 2>/dev/null
# Allow only Cloudflare IPs
for ip in $CF_IPS; do
iptables -A INPUT -p tcp --dport 80 -s $ip -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -s $ip -j ACCEPT
done
# Block other HTTP/HTTPS traffic
iptables -A INPUT -p tcp --dport 80 -j DROP
iptables -A INPUT -p tcp --dport 443 -j DROP
echo "Cloudflare IP restriction applied."
When using Cloudflare proxy, your server sees all requests as coming from Cloudflare IPs. To get the real visitor IP:
# /etc/nginx/conf.d/cloudflare.conf
# Cloudflare IPv4
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 190.93.240.0/20;
set_real_ip_from 188.114.96.0/20;
set_real_ip_from 197.234.240.0/22;
set_real_ip_from 198.41.128.0/17;
set_real_ip_from 162.158.0.0/15;
set_real_ip_from 104.16.0.0/13;
set_real_ip_from 104.24.0.0/14;
set_real_ip_from 172.64.0.0/13;
set_real_ip_from 131.0.72.0/22;
real_ip_header CF-Connecting-IP;
# Test and reload Nginx configuration
sudo nginx -t
sudo systemctl reload nginx
Cloudflare WAF protects your web application from SQL injection, XSS, and other attacks.
From Cloudflare Dashboard > Security > WAF:
# Block traffic from specific countries
(ip.geoip.country eq "XX") -> Block
# Block specific User-Agents
(http.user_agent contains "BadBot") -> Block
# Allow wp-admin access only from specific IP
(http.request.uri.path contains "/wp-admin" and not ip.src eq 1.2.3.4) -> Block
# Rate limiting: More than 100 requests per minute
(http.request.uri.path eq "/api/*") -> Rate Limit (100 req/min)
Page Rules allow you to define custom behaviors for specific URL patterns.
# 1. Always use HTTPS
URL: http://*example.com/*
Setting: Always Use HTTPS
# 2. Disable cache for API
URL: *example.com/api/*
Setting: Cache Level = Bypass
# 3. Aggressive cache for static files
URL: *example.com/static/*
Setting: Cache Level = Cache Everything
Edge Cache TTL = 1 month
# 4. Increase security for admin panel
URL: *example.com/admin/*
Setting: Security Level = High
Browser Integrity Check = On
Enable Under Attack mode during an active DDoS attack.
# Enable Under Attack mode
curl -X PATCH "https://api.cloudflare.com/client/v4/zones/ZONE_ID/settings/security_level" \
-H "Authorization: Bearer API_TOKEN" \
-H "Content-Type: application/json" \
--data '{"value":"under_attack"}'
# Return to normal mode
curl -X PATCH "https://api.cloudflare.com/client/v4/zones/ZONE_ID/settings/security_level" \
-H "Authorization: Bearer API_TOKEN" \
-H "Content-Type: application/json" \
--data '{"value":"medium"}'
SSL/TLS configuration through Cloudflare:
# Dashboard > SSL/TLS > Overview
Encryption Mode:
- Off: No SSL (not recommended)
- Flexible: SSL between Cloudflare and visitor (origin HTTP)
- Full: Self-signed certificate on origin
- Full (Strict): Valid certificate on origin (recommended)
You can automate with the Cloudflare API:
# Get zone information
curl -s "https://api.cloudflare.com/client/v4/zones" \
-H "Authorization: Bearer API_TOKEN" | jq '.result[] | {name, id}'
# List DNS records
curl -s "https://api.cloudflare.com/client/v4/zones/ZONE_ID/dns_records" \
-H "Authorization: Bearer API_TOKEN" | jq '.result[] | {name, type, content}'
# Purge cache
curl -X POST "https://api.cloudflare.com/client/v4/zones/ZONE_ID/purge_cache" \
-H "Authorization: Bearer API_TOKEN" \
-H "Content-Type: application/json" \
--data '{"purge_everything":true}'
# Cloudflare connection check
curl -sI https://example.com | grep -i 'cf-ray\|server\|cf-cache'
# DNS propagation check
dig +trace example.com
# SSL certificate check
openssl s_client -connect example.com:443 -servername example.com 2>/dev/null | openssl x509 -noout -issuer -dates
# Cloudflare error codes
# 520: Web server returns unknown error
# 521: Web server is down
# 522: Connection timed out
# 523: Origin unreachable
# 524: Timeout occurred
Cloudflare integration provides a powerful DDoS protection layer, CDN performance, and WAF security for your REXE server. By properly configuring DNS, origin IP hiding, and WAF rules, you can comprehensively protect your server.
Yes, the Cloudflare Free plan offers unlimited DDoS protection. It provides automatic protection against Layer 3, 4, and 7 attacks. Pro and Business plans offer additional WAF rules and advanced analytics.
Yes, it can leak through email headers, old DNS records (services like SecurityTrails), direct IP access, and subdomains. It's recommended to change IP after Cloudflare setup, use a separate server for email, and apply iptables Cloudflare IP restrictions.
Enable Under Attack mode when you detect an active DDoS attack. This mode applies a JavaScript challenge to all visitors and filters bot traffic. Remember to return to normal mode after the attack ends, otherwise legitimate users will experience delays.
Full (Strict) mode is recommended. This mode applies SSL encryption between Cloudflare and the visitor, and between Cloudflare and the origin server. You need to install a Cloudflare Origin CA certificate on your origin server.
Yes, Cloudflare and Path Panel can be used together for dual-layer protection. Cloudflare provides Layer 7 (HTTP/HTTPS) protection and CDN, while Path Panel performs network-level (Layer 3/4) filtering. This combination offers the most comprehensive protection.
Complete REXE Path Panel user guide: Dashboard, My IPs, TR protection status, rule management, attack history, abuse filtered, password change and API access.
Path.net DDoS protection game filters guide: Arma/DayZ, Source Engine, CS:GO, CS2, FiveM, Minecraft, Rust and more — how to apply each filter.
Path.net DDoS protection application filters guide: OpenVPN, Wireguard, DTLS, RTP, QUIC, SIP, TCP Symmetric and more — how to choose the right filter.