# Unblock ports in the firewall on NixOS

<p class="callout info">This article was originally published at [https://gist.github.com/joepie91/ce9267788fdcb37f5941be5a04fcdd0f](https://gist.github.com/joepie91/ce9267788fdcb37f5941be5a04fcdd0f). </p>

The firewall is enabled by default. This is how you open a port:

```
{
  # ...
  networking = {
    # ...
    
    firewall = {
      allowedTCPPorts = [ 24800 ];
    };
  };
  # ...
}
```