> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/gateway/guides/devolutions-cloud/rulesets.md). Agents can also search and read this documentation through its [MCP server](https://docs.devolutions.net/~gitbook/mcp).

# Gateway rulesets in Devolutions Cloud

Create Gateway rulesets in Devolutions Cloud to allow or deny hosts by IP, subnet, range or DNS name on top of a Devolutions Gateway.

A Gateway Ruleset restricts what users can reach through an existing Devolutions Gateway or farm, without installing another gateway. It adds allow and deny rules (IP address, subnet, IP range, DNS name) and its own users, groups and vaults on top of a "physical" gateway. Entries select the ruleset like any gateway; sessions still go through the physical gateway, but only to the hosts the rules allow.

## Create a Gateway ruleset

1. In the Devolutions Cloud web interface, go to ***Administration*** – ***Devolutions Gateway***.
2. Click ***Add*** – ***Gateway Ruleset***.
3. In ***General***, select the ***Physical Gateway*** (any gateway or farm that is not a Gateway Ruleset), enter a ***Name*** and, optionally, a ***Description***. Select ***Set as default*** to make it the default gateway.
4. In ***Allow rules*** and ***Deny Rules***, add the rules.
5. In ***Vaults***, ***Groups*** and ***Users***, choose where and by whom the ruleset can be used. A new ruleset starts with the vaults, groups and users of its physical gateway.
6. Click ***Add***.

The ruleset appears in the gateway list and in the ***Devolutions Gateway*** picker of entries. It has no ***More*** menu: its logs, sessions and updates are those of the physical gateway. In Remote Desktop Manager, the same dialog opens from ***Administration*** – ***Privileged access*** – ***Devolutions Gateway*** – ***Add*** – ***Gateway Ruleset***, including on Linux.

## Rules

<table><thead><tr><th width="150">TYPE</th><th width="250">EXAMPLE</th><th>MATCHES</th></tr></thead><tbody><tr><td><strong>IP</strong></td><td><code>10.0.0.15</code></td><td>One IP address.</td></tr><tr><td><strong>Subnet</strong></td><td><code>10.0.0.0/24</code></td><td>Every address in the subnet (CIDR notation).</td></tr><tr><td><strong>Range</strong></td><td><code>192.168.1.100-200</code> or <code>192.168.1.50-192.168.1.60</code></td><td>Every address from the first to the last, included.</td></tr><tr><td><strong>DNS</strong></td><td><code>server01.example.com</code> or <code>*.example.com</code></td><td>The host name of the entry. <code>*</code> matches any characters. Not case-sensitive.</td></tr></tbody></table>

When a session opens, the PAM Service checks the rules. It resolves the host of the entry through the physical gateway, and every IPv4 address of the host must pass the rules:

1. If the host matches a deny rule, the session is refused.
2. If the ruleset has at least one allow rule, the host must match one of them.
3. A ruleset without any rule allows every host the physical gateway can reach.

In Remote Desktop Manager, a refused session shows "The connection was blocked because it did not comply with the network access rules configured on the Devolutions Gateway ruleset."

## Force users through rulesets

Edit the physical gateway or farm and select ***Force Gateway rulesets*** in ***General***. The gateway can then be used only through its rulesets and disappears from the gateway pickers of entries. Devolutions Cloud refuses a session from an entry that still points to it directly; Remote Desktop Manager then shows "Cannot use physical Gateway while Force Virtual option is enabled".

## Good to know

* Proxy-based credential injection, available on Gateway rulesets in Devolutions Server, is not available in Devolutions Cloud.
* ***Check health*** in entries is not available for rulesets: check the physical gateway instead.
* Deleting the physical gateway deletes its rulesets.

Gateway rulesets in Devolutions Server work the same way, with more security options: see [Gateway rulesets in Devolutions Server](https://docs.devolutions.net/gateway/guides/devolutions-server/rulesets.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/gateway/guides/devolutions-cloud/rulesets.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
