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

Added ip2asn service #83

Closed
wants to merge 1 commit into from
Closed

Added ip2asn service #83

wants to merge 1 commit into from

Conversation

ShervilG
Copy link

@ShervilG ShervilG commented Dec 29, 2024

Summary

Added an ip2asn service that uses this package for fetching asn info (which uses Team Cymru's IP to ASN mapping service).

Based on the discussion on the issue.

Demo

Screenshot 2024-12-30 at 1 33 35 AM

@knadh
Copy link
Owner

knadh commented Dec 30, 2024

Thanks for the PR @ShervilG. Unfortunately, making an outbound API request on every DNS query isn't ideal. Trivial to DoS the service. This is why the weather API is cached for a whole region. ip2asn should ideally have a data source that's cached and periodically updated.

@ShervilG
Copy link
Author

Thanks for the PR @ShervilG. Unfortunately, making an outbound API request on every DNS query isn't ideal. Trivial to DoS the service. This is why the weather API is cached for a whole region. ip2asn should ideally have a data source that's cached and periodically updated.

Oh I see, yeah makes sense. We can probably cache the ASNumber to Name data -> https://www.cidr-report.org/as2.0/autnums.html but not sure how to get the data for IP addresses -> ASN mapping 🤔

@ShervilG ShervilG closed this by deleting the head repository Jan 4, 2025
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.

2 participants