# UFW and Antias firewall rules

**URL:** <https://forums.screenly.io/t/ufw-and-antias-firewall-rules/1462>\
**Category:** Anthias\
**Created:** [July 1, 2024, 5:43pm UTC](https://forums.screenly.io/t/ufw-and-antias-firewall-rules/1462 "2024-07-01T17:43:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhe](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@Dhe](https://forums.screenly.io/u/Dhe)\
**Post date:** [July 1, 2024, 5:43pm UTC](https://forums.screenly.io/t/ufw-and-antias-firewall-rules/1462/1 "2024-07-01T17:43:21Z")

</div>

I need to implement some particular firewall rules.

I’ve configured the rules I want in UFW, but docker seems to play by its own rules.

What is the best, or approved method to have the anthias docker defer to UFW’s firewall rules?

---

<div class="post-metadata">

**Author:** ![nicomiguelino](https://avatars.discourse-cdn.com/v4/letter/n/e56c9b/32.png) [@nicomiguelino](https://forums.screenly.io/u/nicomiguelino)\
**Post date:** [July 1, 2024, 7:03pm UTC](https://forums.screenly.io/t/ufw-and-antias-firewall-rules/1462/2 "2024-07-01T19:03:22Z")

</div>

@Dhe, I haven’t tried those yet, but you can try the methods in [https://www.howtogeek.com/devops/how-to-use-docker-with-a-ufw-firewall/](https://www.howtogeek.com/devops/how-to-use-docker-with-a-ufw-firewall/). Have you tried modifying `/etc/ufw/after.rules`?

---

<div class="post-metadata">

**Author:** ![Dhe](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@Dhe](https://forums.screenly.io/u/Dhe)\
**Post date:** [July 1, 2024, 7:18pm UTC](https://forums.screenly.io/t/ufw-and-antias-firewall-rules/1462/3 "2024-07-01T19:18:58Z")

</div>

Yes, I tried that, perhaps I did it wrong, but no soup for me.

---

<div class="post-metadata">

**Author:** ![nicomiguelino](https://avatars.discourse-cdn.com/v4/letter/n/e56c9b/32.png) [@nicomiguelino](https://forums.screenly.io/u/nicomiguelino)\
**Post date:** [July 1, 2024, 7:59pm UTC](https://forums.screenly.io/t/ufw-and-antias-firewall-rules/1462/4 "2024-07-01T19:59:05Z")

</div>

I did some basic research, and the official Docker docs says that [“Docker and ufw use iptables in ways that make them incompatible with each other.”](https://docs.docker.com/network/packet-filtering-firewalls/#docker-and-ufw)

Have you tried [firewalld](https://docs.docker.com/network/packet-filtering-firewalls/#integration-with-firewalld)?
