How to disable Docker’s iptables on Systemd Linux systems


In some cases, it is necessary to disable Docker’s IPtables rules to avoid overwriting any existing firewall rules. The following article describes a simple to follow procedure on how to disable disable Docker’s IPtables rules on Systemd Linux systems.


Privileged access to your Systemd Linux is required.




  • # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ – requires given linux commands to be executed as a regular non-privileged user


Create new Systemd Service

First, create a new directory:

# mkdir /etc/systemd/system/docker.service.d

Create a new service configuration file iptables-disabled.conf inside the previously created directory /etc/systemd/system/docker.service.d/ with a following content:

ExecStart=/usr/bin/docker daemon -H fd:// --iptables=false

Reload Systemd Daemon

# systemctl daemon-reload

Restart Services

At this stage restart your firewall and docker. Alternatively, reboot your system.

Comments and Discussions
Linux Forum