-
Notifications
You must be signed in to change notification settings - Fork 409
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
Not allow whole private subnet access to containers #124
Comments
Bump |
@chaifeng Any update on this? |
|
Adding a block rule above and then allow rules below, doesn't that make the allow rules ineffective? |
Yes, without the first deny rule, both allow rules are ineffective. The original rules already include 192.168.0.0/16. The first deny rule still works as expected, allowing all IPs from 192.168.0.0/16 except 192.168.1.0/24 to access the containers. Based on this precondition, the following two allow rules permit certain IPs from 192.168.1.0/16 to access the containers. |
I have tested the above solution and it works, but one thing to keep in mind is that: You will first need to add the route allow rules then block route of whole subnet, else it will not work and will block everything. Example
I'll mark this as solved now. |
Hello,
I have added your rules at the bottom of
after.rules
, and everything works. Now I don't want everyone on my private subnet192.168.1.0/24
to access my containers on192.168.1.21
.How can this be implemented, so I can create rules to allow incoming from certain IPs, e.g,
allow from 192.168.1.2 to 192.168.1.21 port 8989/tcp
.Regards
The text was updated successfully, but these errors were encountered: