Proxima Gateway
Firewall

Recommended Settings

Production-ready firewall defaults for IPTV proxy deployments

Copy-paste ready configuration that balances bot protection with zero false positives for real MAG/STB users. These values are the defaults when you enable firewall features in the dashboard.

Quick reference

IP Rate Limiting

ScopeReq/sBurstWhy
Global default50100Covers all paths — generous for normal browsing
/c2060Multiple MAG boxes behind NAT (~6 devices surfing). Burst covers multi-device boot storms
/player_api.php2040Auth + channel list. Burst on app launch, then idle
/get.php25M3U playlist download — 50MB+ payload. Real apps fetch 1-2x/day, bots hammer it
/xmltv.php13EPG XML download — even larger than playlist, fetched once per day
/panel_api.php510Admin/reseller API — high-privilege, lock it down

MAC Protection

SettingValueWhy
Requests/sec3One device channel-surfing peaks at 2-3/s
Burst20Portal boot fires 8-15 requests in ~2s
Max MACs per IP25Covers CGNAT/hotels. Bots blow past this in seconds
Window600s (10 min)Catches slow-drip MAC cycling bots
Ban duration15 minShort enough to self-heal false positives
Require MACoffThird-party players (TiviMate, Smarters) don't send it

Auto-Ban

SettingValueWhy
Threshold100Violations in window before ban
Window60s1 minute sliding window
Ban duration30 minLonger than MAC ban — catches heavier abuse

How the layers work together

Each layer catches a different type of attack. A request passes through them in order — the first match blocks it:

Attack patternWhat catches it
100 req/s from 1 IPIP rate limit (20/s cap on /c)
15 req/s, 1 IP, 1 MACMAC rate limit (3/s per MAC)
2 req/s, 1 IP, cycling 100 MACsMAC-per-IP tracking (>25 unique = ban)
2 req/s, many IPs, reusing same MACPer-MAC rate limit (3/s total across all IPs)
Repeated rate limit violationsAuto-ban (100 hits in 60s = 30 min ban)
VPN / datacenter IPVPN detection (blocked instantly)
Real user, 1 MAC, 1-2 req/sPasses everything

Full JSON config

{
  "firewall": {
    "enabled": true,
    "block_vpn_proxy": true,
    "whitelist": [],
    "rate_limits": {
      "requests_per_second": 50,
      "burst": 100,
      "paths": [
        { "pattern": "/c", "requests_per_second": 20, "burst": 60 },
        { "pattern": "/player_api.php", "requests_per_second": 20, "burst": 40 },
        { "pattern": "/get.php", "requests_per_second": 2, "burst": 5 },
        { "pattern": "/xmltv.php", "requests_per_second": 1, "burst": 3 },
        { "pattern": "/panel_api.php", "requests_per_second": 5, "burst": 10 }
      ]
    },
    "auto_ban": {
      "enabled": true,
      "threshold": 100,
      "window_seconds": 60,
      "ban_duration_minutes": 30
    },
    "mac_protection": {
      "enabled": true,
      "paths": ["/c"],
      "requests_per_second": 3,
      "burst": 20,
      "max_macs_per_ip": 25,
      "mac_window_seconds": 600,
      "ban_duration_minutes": 15,
      "require_mac": false
    }
  }
}

Paths you should NOT rate limit

Some endpoints look like they need protection but actually break if you throttle them — they don't behave like normal request/response traffic.

PathWhy not
/play, /live/, /movie/, /series/, /timeshift/Streaming endpoints. One stream = one long-lived connection. Rate limits do nothing — a user makes 1 request and holds it for hours.
/hls/, *.m3u8, *.tsHLS segments. Bursty by design (4-10 segments/minute per stream). The global 50/s default handles this fine.
/logo/, /picons/, /channel_logos/High volume but each file is tiny. Global default is enough.
/images/Already redirected to your CDN via image_url.
/health, /status, /metricsInternal endpoints — should be whitelisted, not rate limited.

What rate limiting cannot fix

Rate limits are one tool. Some abuse patterns look identical to legitimate traffic from the proxy's perspective and need different defenses:

ProblemWhy rate limits miss itReal solution
Account sharing50 viewers of one paid account each make 1 request and hold it. Each looks like a normal user.Per-username concurrent stream counter — needs session tracking, separate feature.
HLS segment scrapingBots pulling .ts segments to re-encode/mirror look identical to a real player.Token/referer validation on stream URLs — separate feature.
EPG / catalog scrapingEven at 1 req/s, a patient bot still gets the full EPG eventually.User-Agent filtering, returning smaller catalogs to suspicious clients, or watermarking the data.
Network-layer DDoSThe proxy rate limiter only runs after the request reaches it. SYN floods exhaust upstream resources first.Cloudflare / upstream DDoS protection — handled outside this app.
Bandwidth exhaustion via /get.phpEven at 2 req/s, a 50MB playlist × 2 = 100MB/s out of your bandwidth.Smaller catalogs, CDN caching, or returning 304 Not Modified more aggressively.

These are real features worth building if abuse on those vectors becomes a problem. For most deployments, the rate limit + MAC protection + VPN detection combo above blocks 95% of bot traffic.

When to adjust

See the tuning sections in each feature's docs: