Skip to main content

Firewall rules reset after reboot

A
Written by Adine
Updated today

If firewall rules change or reset after reboot, they may be managed by your OS or other services.

Common causes

  1. Default OS firewall policies

  2. Docker modifying firewall rules

  3. Firewall services overriding manual changes

Check your firewall system

Depending on your system, rules may be managed by:

  1. iptables

  2. ufw (Ubuntu)

  3. firewalld (CentOS/RHEL)

Docker related issues

Docker can modify firewall rules automatically.

To disable Docker’s iptables management:

--iptables=false

Note:

  • This may affect container networking

  • Use only if you understand the impact


Recommendation

  • Make firewall rules persistent using your OS firewall tool

  • Avoid manual changes that get overridden after reboot

Did this answer your question?