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

Have GeoIP work on EDNS CSUBNET addresses #776

Closed
PenelopeFudd opened this issue Jul 29, 2024 · 2 comments · Fixed by #830
Closed

Have GeoIP work on EDNS CSUBNET addresses #776

PenelopeFudd opened this issue Jul 29, 2024 · 2 comments · Fixed by #830
Labels
enhancement New feature or request feature request
Milestone

Comments

@PenelopeFudd
Copy link

Is your feature request related to a problem? Please describe.
When a packet comes in, I want to know the GeoIP information about the original client, not their resolver.

Describe the solution you'd like
If a packet has an ECS subnet, use that for GeoIP lookups, otherwise use the source ip as it is now.

Describe alternatives you've considered
Record the GeoIP lookups for both ECS subnet and source ip?

Additional context
Using the ECS with a fallback of the source ip is what NSOne and PowerDNS use.

@dmachard dmachard added enhancement New feature or request feature request labels Aug 1, 2024
@dmachard
Copy link
Owner

dmachard commented Aug 1, 2024

The GoeIP transform could be updated to also perform ECS lookups.

My proposal is to add a new setting, lookup-ecs. When lookup-ecs is enabled and the packet contains an ECS subnet, the GeoIP lookup will use that subnet. Otherwise, it will default to using the source IP, as it currently does.

Example configuration:

transforms:
  geoip:
    ....
    lookup-ecs: true

@PenelopeFudd
Copy link
Author

Sounds good, although if someone cares about geoip information, I can't foresee a situation where they'd want to look up the source ip's location instead of the ecs location. For completeness they might want to log both.

@dmachard dmachard added this to the v1.1.0 milestone Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants