5.13 Bind incoming container traffic to a specific host interface

Information

https://docs.docker.com/articles/networking/#binding-container-ports-to-the-host

Solution

Bind the container port to a specific host interface on the desired host port.
For example,
docker run --detach --publish 10.2.3.4-49153-80 nginx
In the example above, the container port 80 is bound to the host port on 49153 and would accept incoming connection only from 10.2.3.4 external interface.
Impact-
None.
Default Value-
By default,Docker exposes the container ports on 0.0.0.0, the wildcard IP address that will match any possible incoming network interface on the host machine.

See Also

https://workbench.cisecurity.org/files/516

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-7b.

Plugin: Unix

Control ID: 45985c1dcd4d57afd8d668ee2c283c114b35d4712484016b25f5f41455c779fe