---
title: 'firewall:docker'
url: 'https://docs.danami.com/juggernaut/command-line-interface/firewall/firewall-docker'
markdown: 'https://docs.danami.com/juggernaut/command-line-interface/firewall/firewall-docker.md'
date: '2026-10-07'
description: 'Configure iptables rules to allow Docker containers to communicate through the host. juggernaut --task=firewall:docker Option Value Default Description --DOCKER <1|0> 0 Enable the configuration of iptables rules to allow Docker containers to communicate through the host. If the ge…'
taxonomy:
  category:
    - docs
  tag:
    - docker
---

[](#)  [ Basics ](https://docs.danami.com/juggernaut/)     [ Command Line Interface ](https://docs.danami.com/juggernaut/command-line-interface)      Firewall       firewall:docker    

# firewall:docker

Configure iptables rules to allow Docker containers to communicate through the host.

```
juggernaut --task=firewall:docker
```

| Option | Value | Default | Description |
|---|---|---|---|
| `--DOCKER` | <1\|0> | 0 | Enable the configuration of iptables rules to allow Docker containers to communicate through the host. If the generated rules do not work with your setup you will have to use a /etc/csf/csfpost.sh file and add your own iptables configuration instead. |
| `--DOCKER_DEVICE` | <string> | docker0 | The Docker network device on the host. |
| `--DOCKER_NETWORK4` | <string> | 172.17.0.0/16 | Docker container IPv4 range. |
| `--DOCKER_NETWORK6` | <string> | 2001:db8:1::/64 | Docker container IPv6 range. IPV6 must be enabled and the IPv6 nat table available. Leave blank to disable. |
| `--default` | <yes> |  | Reset all settings to their default values. |
| `--default_option` | <option> |  | Reset a specific setting to its default value. |
| `--restart` | <yes> |  | Restart the service after saving settings. |

## Examples

```
// enable DOCKER
juggernaut --task=firewall:docker --DOCKER=1

// reset DOCKER back to default
juggernaut --task=firewall:docker --default_option=DOCKER --restart=yes

// reset all settings back to default
juggernaut --task=firewall:docker --default=yes --restart=yes

// enable Docker support with a custom bridge device and container network
juggernaut --task=firewall:docker --DOCKER=1 --DOCKER_DEVICE=br0 --DOCKER_NETWORK4=172.30.0.0/16 --restart=yes
```

## Related Pages

- [Docker Settings](https://docs.danami.com/juggernaut/settings/firewall/docker-settings "Docker Settings")

 [](https://docs.danami.com/juggernaut/settings/firewall/docker-settings)

---

## Navigation

- Previous: [firewall:disableserverips](https://docs.danami.com/juggernaut/command-line-interface/firewall/firewall-disableserverips.md)
- Next: [firewall:general](https://docs.danami.com/juggernaut/command-line-interface/firewall/firewall-general.md)
