[go: up one dir, main page]

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 support for ipv6 subnet in ipStrategy #9747

Merged
merged 3 commits into from
Sep 24, 2024

Conversation

michal-kralik
Copy link
Contributor

What does this PR do?

Adds support for grouping IPv6 address into a single IP of the defined subnet.
This is useful in RateLimit and InFlightReq middlewares where it's easy to bypass any filtering by changing to a new IPv6.

Closes #9721

Motivation

Community contribution

More

  • Added/updated tests
  • Added/updated documentation

Additional Notes

Since I'm new to Traefik, it's not clear if this is the right place to configure this setting.
It's on ipStrategy.ipv6Subnet level. It works fine with RateLimit and InFlightReq but not with IpWhitelist.
It may make more sense on the middleware level, but since it's applicable only when the sourceCriterion is IP, it's ideal either.

Happy to change the implementation according to what's preferred.

@mloiseleur
Copy link
Contributor

Thanks for this PR.
It makes totally sense on IPv6.
I even think 64 should be the default value of ipv6Subnet :).

@rtribotte
Copy link
Member

Hello @michal-kralik,

Thanks a lot for this contribution!

I have pushed some commits from review, to add docs, and also rebase the changes to be up to date with the target branch.

Copy link
Member
@rtribotte rtribotte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rtribotte rtribotte removed their assignment Aug 26, 2024
Copy link
Contributor
@youkoulayley youkoulayley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@traefiker
Copy link
Contributor

🚫 the milestone is missing

@traefiker traefiker merged commit 312ebb1 into traefik:master Sep 24, 2024
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ipStrategy should be IPv6 subnet aware
5 participants