Skip to content

Avoid trusting local networks #151

Description

@brightbyte

Hi! ufw-docker makes the assumption that "private networks are more trusted than public networks". I think that is not a safe assumption to make. If you are, like me, running docker on your laptop, the local network includes anyone on your train, your hotel, or at your conference.

So instead of allowing traffic to docker containers based on IP addresses, it seems much safer to do so based on interface names. Allow traffic for the docker* and br-* devices allows containers to communicate, but does not allow traffic from the local subnet, unless allowed via ufw.

I think that's what people would generally expect/want. I made a very simple proof of concept: https://github.com/brightbyte/docker-fw. Works great for me.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions