> For the complete documentation index, see [llms.txt](https://docs.stepsecurity.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stepsecurity.io/start-here/guides/how-to-restrict-network-connections-to-explicitly-allowed-endpoints.md).

# How to restrict network connections to explicitly allowed endpoints

You can restrict network connections to explicitly allowed endpoints using two approaches:

* Job-Level Restrictions
* Cluster-Level Restrictions

### Job-Level Block Policy

There are two ways to enforce network restrictions at the job level:

1. Manual Workflow File Updates
2. Using Policy Store

**1. Manual Workflow File Updates**

This approach does not require access to the StepSecurity backend. All configurations live within the workflow file itself, allowing you to maintain your existing change management processes and developer workflows.

Follow this interactive demo to see how to restrict network connections using job level block policy:

{% embed url="<https://app.storylane.io/share/itwirsqapkra>" %}

**2. Using Policy Store**

Use the Policy Store if:

* You don’t want endpoint definitions cluttering your workflow files
* When you want to apply the same policy across multiple workflows, repositories, or your entire organization

This method centralizes policy management and promotes reuse, consistency, and maintainability across your organization.

Follow this interactive demo to see how to restrict network connections using policy store:

{% embed url="<https://app.storylane.io/share/wj2cxwsetfjx>" %}

### Cluster-Level Block Policy

When deploying ARC Harden-Runner, you can enforce network restrictions at the cluster level using the reserve Helm parameter.

By specifying a list of allowed endpoints:

* An egress policy is applied automatically
* The policy is enforced for all GitHub Actions runs on the cluster
* No changes are required in your workflow files

{% hint style="info" %}
**Note: Even if a cluster-level block policy is in place, it can be overridden by job-level block policies.**
{% endhint %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.stepsecurity.io/start-here/guides/how-to-restrict-network-connections-to-explicitly-allowed-endpoints.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
