-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
Support for ACLs for bridge NIC device when using nftables driver. #1225
base: main
Are you sure you want to change the base?
Conversation
Support for ACLs for bridge NIC device when using nftables driver. Signed-off-by: Mike Robski <[email protected]>
Support for security.acls* fields for bridge NIC device when using nftables driver. Signed-off-by: Mike Robski <[email protected]>
Support for ACLs for bridge NIC device when using nftables driver. Modified nftable template to allow combining fitering and ACL rules. Updated ACL processing to detect bridge NIC devices with ACL applied and re-generate nftable if the instance is running. Signed-off-by: Mike Robski <[email protected]>
Support for ACLs for bridge NIC device when using nftables driver. Signed-off-by: Mike Robski <[email protected]>
I'm confused by that comment, nftables does have a |
@mikerobski any chance that you can open PRs from a personal fork? That would then let me push rebases and tweaks on top of your change to tweak it until it's in shape for merging, avoiding needless back and forth for tiny changes to your PR. |
@mikerobski And sorry for the delay on this one. It's been a bit of a crazy time on my end what between getting married and a whole bunch of travel. I somehow remembered this PR being more complex than it is now, possibly because of a previous version of it. As it stands, this is well structured and pretty minimal so we should be able to get this into shape and merged pretty quick. It looks like I'll want to do a few small edits to the doc, add an API extension string and some other minor changes, but outside of the |
The ACL rules we add are L2 and reject nft rule is not being accepted for the bridge family. |
Ah, right, makes sense when processed at the L2 level. |
I will look into it, but it may take me some time to figure out. |
This works perfectly fine here and results in the expected:
|
While indeed it works for input, it does not work for forward:
It will be confusing to allow the reject rule when it is not supported for the forward chain, right? |
When is the forward table being hit in the bridge case? Btw, I just noticed a bit of a problem when testing this branch locally here.
Then both containers can interact with the internet just fine, the container with no ACL applied can interact with all other containers except for the one with the ACL applied. So far that's normal. What's not normal is that the container with the ACL applied is completely unable to interact with the container which doesn't have the ACL applied even though the restricted container has an rule allowing all egress. Trying to ping from the container with the ACL to the one without only shows ARP going out and being responded to, no actual ICMP packet, so that'd suggest that the ARP response isn't making it back to the container with the ACL. |
Allows "security.acls*" fields to be used to apply ACLs to bridge NIC device when the firewall driver is nftables.
Since the nftables do not support "reject" rules, the implementation converts the default rules from "reject" to "drop" when needed.
The ACL rules are applied together with the filtering rules, if specified. The filtering rules are applied before the ACL rules and are enforced even if the ACL definition contains allow rule that permits the traffic.