> For the complete documentation index, see [llms.txt](https://docs.fivemstats.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fivemstats.net/tgiann-fivem-stats-script/ports-and-firewall/ddos-protected-hosts.md).

# DDoS-Protected Hosts

Hosts with a DDoS filter in front of the server (Vibegames and others) need two small changes before the panel and the media service work.

Many game hosts put a DDoS filter in front of your server. It only lets through the ports you added a filter for, and the game profile for FiveM only passes game traffic. Then:

* The panel cannot add the server: the request to the game port times out, even with the right key.
* `http://<server-ip>:6174/health` does not open from outside, pictures do not load and HTTPS cannot get a certificate.

The Windows or Linux firewall rules are not enough on these hosts; the filters below are needed too.

## What to add

| Port                | Protocol | Filter profile                                           | Why                                                                                                          |
| ------------------- | -------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| Game port (`30120`) | TCP      | Plain **TCP filter** instead of the host's FiveM profile | The panel's statistics API                                                                                   |
| Game port (`30120`) | UDP      | Keep the host's FiveM profile                            | Players                                                                                                      |
| Media port (`6174`) | TCP      | Plain **TCP filter**                                     | Screenshots, videos, uploads, backup downloads                                                               |
| `80`                | TCP      | Plain **TCP filter**                                     | The automatic HTTPS certificate, see [HTTPS](https://docs.fivemstats.net/tgiann-fivem-stats-script/https.md) |

{% hint style="info" %}
The host's FiveM profile on TCP 30120 only answers the server list (`info.json`) from its cache and drops every other request. That is why the panel's request never reaches FXServer, and why changing the TCP profile fixes it. The UDP profile, where players connect, stays as it is.
{% endhint %}

## Example: Vibegames

1. Open your server in the Vibegames dashboard and go to **DDoS protection**.
2. Under **Active filters**, delete the **FiveM** filter on port `30120` with protocol **TCP**. Leave the **FiveM** filter on `30120` **UDP**.
3. Click **Add filter**, open **Generic filters**, choose **TCP Filter**, pick your IP address and enter port `30120`. Click **Add filter**.
4. Add a **TCP Filter** the same way for port `6174` and for port `80`.
5. Open the same TCP ports in Windows Firewall, see [Ports and Firewall](https://docs.fivemstats.net/tgiann-fivem-stats-script/ports-and-firewall.md#windows).
6. Restart the resource (`ensure tgiann-fivem-stats-script`) so HTTPS asks for its certificate again.

{% hint style="warning" %}
Without the FiveM profile on TCP, the host's resource cache for that port is off: players download resources from your server directly. Game traffic on UDP keeps the FiveM protection.
{% endhint %}

## Check it

From another network (a phone on mobile data is enough):

1. `http://<server-ip>:6174/health` answers `"status":"ok"`. After a minute the `https` part shows `"state":"active"`.
2. Add the server in the panel with its IP, game port and key, see [Adding a Server](https://docs.fivemstats.net/panel/adding-a-server.md).

Other hosts name the profiles differently, but the idea is the same: a plain TCP filter on the game port (TCP), the media port and port 80.
