> For the complete documentation index, see [llms.txt](https://certified.cryptobounty.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://certified.cryptobounty.org/guides/firewall-configurations.md).

# Firewall Configurations

The UFW firewall can be used to control the network access to your node With any new installation, UFW is disabled by default. You will have to enable it with the following steps:

Deny any incoming and outgoing traffit

```
 sudo ufw default deny incoming 
 sudo ufw default allow outgoing
```

Allow ssh access

```
 sudo ufw allow ssh (port 22 or your ssh port number) /tcp
```

Allow cardano-node p2p port

```
 sudo ufw allow (your port #) /tcp
```

Allow chrony ntp

```
 sudo ufw allow 123/udp
```

Enable Firewall

```
 sudo ufw enable
```

Verify status

```
 sudo ufw status numbered
```

Only open these following ports on nodes behind a network firewall Allow grafana web server port

```
 sudo ufw allow 3000/tcp
```

Allow prometheus endpoint port

```
 sudo ufw allow 9100/tcp
```

Allow prometheus cardano-node metric data port

```
 sudo ufw allow 12798/tcp
```

This next step is optional but recomended to follow Permitting connections from a specific IP can be set up by following these next commands

```
 sudo ufw allow (your laptop)
```

Example

* sudo ufw allow from (182.382.84.22)


---

# 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://certified.cryptobounty.org/guides/firewall-configurations.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.
