> ## Documentation Index
> Fetch the complete documentation index at: https://help.freakhosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Apply Custom Cosmicguard Filtering Rules

> Master the unified Cosmicguard filtering interface. Learn how to architect advanced custom rules for TCP, UDP, and ICMP to secure your virtual infrastructure.

## Unified Filtering Interface

The Cosmicguard custom rule engine is an advanced management interface that allows you to architect sophisticated, stateful filters for any traffic type. By using high-level "Logic Blocks," you can build a bespoke security perimeter that accommodates custom game modifications, proprietary applications, or unique network requirements. Unlike traditional firewalls that require separate management for different protocols, Cosmicguard provides a unified ecosystem for all network traffic.

<CardGroup cols={2}>
  <Card title="Difficulty" icon="gauge-low">
    Advanced
  </Card>

  <Card title="Time" icon="clock">
    10 Minutes
  </Card>
</CardGroup>

***

## Strategic Rule Architecture

Cosmicguard uses a protocol-agnostic management style, allowing you to oversee your entire security posture from a single list.

* **Unified Management:** Manage TCP, UDP, and ICMP rules in a cohesive sequence.
* **Port Flexibility:** Full support for individual service ports (e.g., `25565`) or expansive numeric ranges (e.g., `10000-20000`) for dynamically assigned game instances.
* **Hierarchical Priority:** Rules are evaluated from top to bottom. This sequence is critical when combining broad restrictions with specific exceptions.

***

## Technical Logic Blocks

Rather than basic port forwarding, Cosmicguard allows you to assign specialized mitigation engines to your rules.

| Logic Block             | Technical Purpose                                                         |
| :---------------------- | :------------------------------------------------------------------------ |
| **Any TCP Application** | General stateful hardening for TCP-based services.                        |
| **SynCookies**          | Advanced SYN-flood protection for high-traffic environments.              |
| **Steam Query**         | Hardened stateful validation for Valve's A2S query protocol.              |
| **FiveM L7**            | Deep packet inspection optimized for GTA V roleplay traffic.              |
| **Cloudflare Only**     | Restricts traffic to only originated from verified Cloudflare edge nodes. |
| **RakNet v2**           | Protocol-specific validation for modern engines like Palworld and Rust.   |

***

## Configuration Workflow

Follow these steps to establish a new custom filter.

<Steps>
  <Step title="Select Your IP">
    Log in to the [Firewall Panel](https://firewall.freakhosting.com) and navigate to the **[IP Addresses](https://firewall.freakhosting.com/dashboard/ip-addresses)** tab. Select your Cosmicguard-protected address.
  </Step>

  <Step title="Initialize New Rule">
    Open the **Filtering Rules** section and click **Create New Rule**.
  </Step>

  <Step title="Define Protocol & Range">
    Specify the protocol (TCP, UDP, or ICMP) and the destination port range you wish to safeguard.
  </Step>

  <Step title="Assign Mitigation Logic">
    Select the **Logic Block** that best corresponds to your application's traffic pattern.
  </Step>

  <Step title="Establish Action">
    Set the rule action to **Allow** (to whitelist specific validated traffic) or **Deny** (to drop all matching packets).
  </Step>
</Steps>

<Warning>
  ### Rule Sequencing

  Always ensure your specific "Allow" rules for active services are positioned **above** any broad "Deny All" rules. If a general restriction is evaluated first, it will drop legitimate traffic before the system reaches your specific whitelist entry.
</Warning>

***

<Note>
  ### Need Extra Help?

  If you encounter any issues, our support team is ready to assist:

  * **Live Chat:** Quick assistance via our website.
  * **Support Ticket:** [Open a Ticket](https://freakhosting.com/clientarea/submitticket.php)
  * **Discord:** [Join our Community](https://discord.gg/freakhosting)
  * **Email:** [support@freakhosting.com](mailto:support@freakhosting.com)
</Note>

<Tip>
  ### Save on Your Hosting

  Ready to get a new server? Use code **KB20** at checkout for **20% off** your first month!
</Tip>

***

<div align="center">
  **Last Updated:** January 2026 | **Cosmicguard:** Advanced network architecture.
</div>
