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

add CAP_NET_ADMIN to bootstrap containers #2266

Merged
merged 1 commit into from
Jul 6, 2022

Conversation

bcressey
Copy link
Contributor

@bcressey bcressey commented Jul 5, 2022

Issue number:
N/A

Description of changes:
iptables needs CAP_NET_ADMIN along with the default capabilities granted to containers.

This allows bootstrap containers to use iptables to configure the packet filter rules and policies, e.g. to drop incoming connections by default.

Testing done:
Ran a bootstrap container with iptables commands. Without this change, the commands failed with a "Permission denied (you must be root)" error. With this change, the commands ran successfully.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

`iptables` needs CAP_NET_ADMIN along with the default capabilities
granted to containers.

This allows bootstrap containers to use `iptables` to configure the
packet filter rules and policies, e.g. to drop incoming connections
by default.

Signed-off-by: Ben Cressey <[email protected]>
@bcressey bcressey merged commit cb88f16 into bottlerocket-os:develop Jul 6, 2022
@bcressey bcressey deleted the bootstrap-caps branch July 6, 2022 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants