Docker Network Hardening
Harden Docker networking for Cortex XSOAR 6.13.
Docker creates a networking stack for container communication. By default, containers can communicate with all IP addresses. Use iptables rules to restrict this access.
The default Docker network is bridge and its default interface is docker0. List Docker networks with sudo docker network ls. Inspect a network with sudo docker network inspect <network name>.
js.http.restricted
169.254.169.254,localhost,127.0.0.1
Block network access to the host machine
Integrations and automations usually do not need host-network access. Block access from containers to host services, including Cortex XSOAR Server.
Add an iptables rule for each private host IP address:
sudo iptables -I INPUT -s <IP address range> -d <host private ip address> -j DROPFor Docker’s default
172.16.0.0/12range, use:sudo iptables -I INPUT -s 172.16.0.0/12 -d 10.18.18.246 -j DROPIf you configured another range in Docker’s
daemon.json, use that range. You can also limit a specific source interface, such asdocker0.Block access to the Docker gateway IP:
iptables -I INPUT -i docker0 -d 172.17.0.1/32 -j DROPOptionally, list private host IP addresses:
sudo ifconfig -a
Block cloud instance metadata access
Block containers from accessing the instance metadata service on 169.254.169.254.
On GCP, allow DNS queries to the metadata server when required:
For metadata service details, see the AWS documentation and GCP documentation.
Assign a Docker network for an image
Create a separate network for integrations that require metadata access. Most AWS integrations use the demisto/boto3py3 image.
Create the network:
Add the following server configuration:
KeyValuepython.pass.extra.keys.demisto/boto3py3--network=aws-metadataReset running containers with
/reset_containers.Verify the network:
Block internal network access
Block selected integrations from internal resources. This is recommended for the Rasterize integration when processing untrusted URLs or HTML.
Create an external Docker network:
Block host access:
Block metadata access:
Block internal address ranges:
Add the following server configuration:
KeyValuepython.pass.extra.keys.demisto/chromium--network=externalReset running containers with
/reset_containers.Verify the network:
Persist iptables rules
iptables rules do not persist after a reboot. Save them using your operating system’s recommended configuration:
Last updated
Was this helpful?
