# How to allow and deny IPs and subnets

**URL:** <https://forums.screenly.io/t/how-to-allow-and-deny-ips-and-subnets/1566>\
**Category:** Anthias\
**Created:** [September 4, 2024, 5:39pm UTC](https://forums.screenly.io/t/how-to-allow-and-deny-ips-and-subnets/1566 "2024-09-04T17:39:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sul](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@sul](https://forums.screenly.io/u/sul)\
**Post date:** [September 4, 2024, 5:39pm UTC](https://forums.screenly.io/t/how-to-allow-and-deny-ips-and-subnets/1566/1 "2024-09-04T17:39:19Z")

</div>

Hi Folks,

I’m still a bit new to Anthias (and docker for that matter). Is there a simple way to allow and/or deny specific IPs and subnets from accessing port 80 on a Raspberry Pi running Anthias? I prefer not to install ufw, if it can be avoided.

I tried by adding the following directives into the `default` file for nginx under the **anthias-nginx** container, but that didn’t seem to help.

```auto
server {
        listen 80 default_server;
        listen [::]:80 default_server;

        #Allow access from a specific IP
        allow 123.45.678.90;

        # Deny access from all other IPs
        deny all;
...

```

Appreciate any tips. Thanks!

-sul.
