Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure containerVM firewall to enforce intent #692

Closed
4 tasks
hickeng opened this issue May 16, 2016 · 12 comments
Closed
4 tasks

Configure containerVM firewall to enforce intent #692

hickeng opened this issue May 16, 2016 · 12 comments
Labels
area/security Management of security functionality and other issues that impact security component/portlayer/network component/tether Epic Represents a ZenHub Epic priority/p2

Comments

@hickeng
Copy link
Member

hickeng commented May 16, 2016

Story
As a VCH user I expect containers using container networks to have the same degree of network security and isolation as they would when using NAT & port forwarding.

Detail
Two primary scenarios for attaching a container directly to a container-network:

  1. exposing a service, e.g. tomcat
    a. configure firewall to permit incoming only, and then only on exposed ports, e.g. 8080
    b. configure firewall to support port forwarding directly, e.g. 80 -> 8080
  2. consumption a resource on that network, e.g. NFS server
    a. configure firewall to reject all incoming on that network, and only permit outbound to the target resource (protect network against containers as well as container against network)
    b. the general "container needs internet access" case - permit outbound only,

There is the additional case when (1) and (2) apply for the same network.

Undecided whether the firewall should drop or reject.

Acceptance

  • examples of docker commands that express each of the intents, variants and combinations
  • detail of the configuration data needed in the container to apply appropriate iptables rules for enforcement
    • preferably not just direct iptables config as it's tether's responsibility to map config to implementation in the OS environment it's built for
  • tests that run a port scan against containers configured with the variations to confirm non-exposed ports are not reachable
  • tests that confirm that permitted outbound traffic is successful, and that restricted outbound traffic is not

#microsegmentation #nsx #firewall #iptables

@hickeng hickeng added area/security Management of security functionality and other issues that impact security area/docker Support for the Docker operations component/portlayer/network labels May 16, 2016
@stuclem stuclem added the impact/doc/user Requires changes to official user documentation label May 17, 2016
@hickeng
Copy link
Member Author

hickeng commented May 23, 2016

#648 is related on the appliance side.

@mlh78750
Copy link
Contributor

We should drop all inbound packets by default in the container VM's firewall configuration.

When a port is "expose"d through the docker configuration then the firewall should allow the port to accept inbound packets on that port from other containers in the bridge.

When a port is "publish"ed through the docker configuration then the firewall should allow the port to accept inbound connections from all.

When containers are linked then they allow inbound connections from each other.

More advanced firewall features from vSphere networking including networking and networking security features from NSX will be mapped to externally scoped networks and the configuration of those features will remain on the vSphere management plane. see: https://github.com/vmware/vic/tree/master/doc/design/networking

Docker port/publish/expose commands will affect the firewall on the container VM.

@stuclem stuclem removed the impact/doc/user Requires changes to official user documentation label May 31, 2016
@mdubya66 mdubya66 added this to the GA milestone May 31, 2016
@hickeng
Copy link
Member Author

hickeng commented Jun 20, 2016

@hmahmood this is the issue relating to container firewall config - the implication of this is that the ports to expose need to be present in the tether extraconfig.

@mdubya66
Copy link
Contributor

GA feature from SSOD. @hickeng assigned in SSOD.

@hickeng
Copy link
Member Author

hickeng commented Jul 26, 2016

@hmahmood I don't recall - does this require the iptables binary or not?

@hmahmood
Copy link
Contributor

This would require the iptables binary. Any other way to allow only certain ports through?

@mdubya66 mdubya66 removed this from the VIC GA Release milestone Aug 3, 2016
@hmahmood hmahmood removed their assignment Jan 17, 2017
@hickeng hickeng changed the title Configure vNIC firewall rules to enforce port forwarding intent Configure containerVM firewall to enforce intent Feb 1, 2017
@hickeng hickeng removed the area/docker Support for the Docker operations label Feb 1, 2017
@hickeng
Copy link
Member Author

hickeng commented Mar 15, 2017

Changing this to high to elicit conversation specifically about firewall rule being applied when a container makes use of NFS volumes.

Setting to 8 as we'll either need to inject iptables into the containers, or implement libiptc in Go.
IPTC examples: http://wiki.tldp.org/iptc%20library%20HOWTO

@hickeng hickeng self-assigned this Mar 15, 2017
@hickeng
Copy link
Member Author

hickeng commented Mar 15, 2017

Short term alternatives to iptc based impl:

  1. inject iptables & libiptc into containers and invoke via tether
  2. document/provide scripts that:
    a. add iptables via Dockerfile
    b. add script that configures iptables rules inside the container
    c. add wrapper script that launches both iptables config and the container binary

@hickeng hickeng removed their assignment Mar 15, 2017
@fdawg4l fdawg4l added the Epic Represents a ZenHub Epic label Mar 29, 2017
@hickeng
Copy link
Member Author

hickeng commented Apr 27, 2017

@fdawg4l I think you'll have addressed all of this once you're done with you're current work. If that's correct can you add this to the Release (release column and Release field) so that we make sure to doc and close it.

@hmahmood
Copy link
Contributor

@stuclem need to document this.

@stuclem
Copy link
Contributor

stuclem commented Aug 30, 2018

@hickeng I think that I need more information about #692 (comment) before I can document this.

@zjs
Copy link
Member

zjs commented Jan 7, 2019

Resolving as all children have been resolved.

@zjs zjs closed this as completed Jan 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/security Management of security functionality and other issues that impact security component/portlayer/network component/tether Epic Represents a ZenHub Epic priority/p2
Projects
None yet
Development

No branches or pull requests

7 participants