9 ms·
Show HN: IP Guide – Info on IP addresses, Networks, and ASNs
Hey all, wanted to share my recent weekend hack project. I wanted to improve upon the existing space for looking up information about IP addresses and ASNs.
The backend is written in Rust and pulls BGP data every 8 hours from the RIPE RIS project to build up a routing table and also adds geolocation information. The frontend is using React and Tailwind.
Would love any feedback or suggestions on what to improve.
- joshghent 3y agoGreat site and product! Congratulations on the launch. I actually have a use case for this in my product Loginllama. I need to grab information about the IP addresses. I’m currently using a different API but don’t really like the product. Is it rate limited or have any key authentication? My email is me at joshghent.com if you want to chat about this more.
- bswinnerton 3y agoGo for it! There's no formal rate limiting or auth, but it does start to load shed at 2k concurrent requests. It's stateless, so it's very easy to scale horizontally after that. LoginLlama looks super helpful, what else would you like to see from IP Guide to help? Would a boolean attribute on whether or not the IP is a known tor exit node be helpful?
- wantguns 3y agoVery cool project, any plans to release its source ? also s/Tailscale/Tailwind/
- bswinnerton 3y agoI do that every. single. time.
- WhackyIdeas 3y agoLove it - bookmarked!
- DougN7 3y agoHaving a simple paragraph about RIPE, BGP and ARIN would be helpful (at least for me). Is there any way at all to do this for IPv6? Additional info that would be helpful would be if this is hosted by one of the big tech companies (i.e. is it on AWS, Azure, etc), though maybe that will show up in the network info? If the IP is associated with hostnames that would be nice to know. Not sure how much of a one-stop shop you want to be :)
- LelouBil 3y ago> Having a simple paragraph about RIPE, BGP and ARIN would be helpful (at least for me). Same, I've always wondered how do websites like this get their information.
- bswinnerton 3y agoGreat feedback, I'll add a little more to the site to describe how it all works. Until then... At a 30,000ft view, the site works by building an in-memory routing table at boot time that has an entry for every route on the internet and which ASN (autonomous system number) announces it. From there, it stitches together data on the organization that the ASN belongs to, and geolocation data, and then exposes it in the API/UI. Under the hood it's using a treebitmap[1] data structure, which means that it can do _very_ fast lookups when given a particular ip address or ip address range. Zooming in a little more, the main data source is MRT dumps from the RIPE RIS project[2]. There are a number of routers that RIPE (one of the 5 regional internet registries that hand out ASNs and IPs) that rely on network operators to share their view of every route on the internet. These routers are probably some of the most well-connected routers in the world. For the purposes of this service, MRT dumps are effectively a point-in-time snapshot of the routing table of that router. IP Guide parses that file, rebuilds it in memory, and attaches other relevant data to each IP range (also known as a "prefix"). This allows the service to stay fast and stateless, which was one of the main things I was trying to optimize for when building it. [1]: https://blog.apnic.net/2021/06/04/storing-and-retrieving-ip-prefixes-efficiently/ https://blog.apnic.net/2021/06/04/storing-and-retrieving-ip-... [2]: https://ris.ripe.net/docs/10_routecollectors.html https://ris.ripe.net/docs/10_routecollectors.html
- HellsMaddy 3y agoNice! I love HTTP APIs like this with simple, user-friendly URLs like `https://${domain}/${query} https://${domain}/${query}`. Anyone know of a list of other services like this? wttr.in is one example I know of.
- Kikobeats 3y agohttps://geolocation.microlink.io/ https://geolocation.microlink.io/
- achillean 3y agoWe do it for https://internetdb.shodan.io https://internetdb.shodan.io
- miki123211 3y agoNot exactly HTTP, but dns.toys
- nadermx 3y agoI made https://api.miip.co https://api.miip.co but no where near as complex
- tobias2014 3y agohttps://ifconfig.me https://ifconfig.me
- AndrewCopeland 3y agohttps://ipdetective.io https://ipdetective.io
- seligman99 3y agoMy similar take on the idea: https://cloud-ips.s3-us-west-2.amazonaws.com/index.html https://cloud-ips.s3-us-west-2.amazonaws.com/index.html I wanted to see if I could do the lookup work client-side, and also include some more metadata about cloud provider's IPs (region, service, etc), not that it's really better, just a toy idea I had.
- deleted 3y ago[deleted]
- Kirce 3y agoAwesome, bookmarked! Would it be possible to list all announced IP ranges for an AS?
- bswinnerton 3y agoYes! Quite easily, but it requires thinking through the right API design. I'll see if I can work this in this weekend.
- sgjohnson 3y agoYou can use https://bgp.tools https://bgp.tools for that (e.g. https://bgp.tools/as/200676#prefixes https://bgp.tools/as/200676#prefixes)
- reincoder 3y agoDisclaimer I work for IPinfo. If you can download the free IPinfo IP to ASN database CSV file. You can run the following command to get the IP ranges of an ASN. ``` grep AS19551 asn.csv | ipinfo range2cidr | cut -f1 -d ',' ``` You will need to install the IPinfo CLI to convert the IP range to their CIDR equivalent. I believe the range2cidr command is also available as a standalone binary as well. After that, you might want to aggregate the IP ranges to bigger ranges. I have used this in the past for this: https://github.com/job/aggregate6 https://github.com/job/aggregate6
- bswinnerton 3y agoHere's a simpler alternative with IP Guide that doesn't require a CLI: curl -sL ip.guide/AS19551 | jq .routes
- iJohnDoe 3y agoAlso like https://wasab.is https://wasab.is Yours is very cool by pulling BGP data every 8 hours though!
- bswinnerton 3y agoOh cool! Is this a fork of ifconfig.co?
- iJohnDoe 3y agoYes, seems like it!
- xyst 3y agoFor some reason this site only sees my ipv4 addy. But ip.guide automatically returns IPv6.
- kortilla 3y agoCheck out http://bgp.tools http://bgp.tools for an alternative in the area. Not affiliated, it’s just my current preferred.
- deleted 3y ago[deleted]
- darkclouds 3y ago[dead]
- stevenicr 3y agoI go to myip.ms regularly and use the additional info it offers such as owner ip block / ranges, the cidr, and hostname is sometimes helpful.
- deleted 3y ago[deleted]
- warner25 3y agoFrom where do you get your geolocation information? I've been using the free MaxMind GeoLite2 databases and the GeoIP2 Python API for this kind of thing, but for a lot of IP addresses that I'd like to map, I can only get down to the country (and even some of those seem suspect). Is there any rate limit for queries?
- bswinnerton 3y agoIP Guide is also using MaxMind, I'm not familiar with many other data sources for that kind of data. Are you seeing discrepancies? No rate limits or auth for requests, but as mentioned below the api starts to load shed at 2k concurrent requests.
- warner25 3y agoThanks. Yeah, I was just hoping it might have access to some different data. I've seen no discrepancy. I tried one IP address that I've been trying to map, and I got the same answer.
- mmaunder 3y agoTheir city level data tends to be proprietary so maybe double check you’re ok in your use.
- ashu1461 3y agoHow big is the MaxMind database ?
- withinboredom 3y agoI have yet to see a geo-ip address for my IP that shows me even on the correct side of the country. I wouldn't trust this information as far as you can throw it ... and I've had this IP address for nearly 6 years now.
- tuga 3y agoHave you thought about offering downloadable versions of to the database through MMDB, CSV, or JSON formats? This would enable users to utilize the database offline, similar to the setup provided by IPinfo.io for their free IP database.
- bswinnerton 3y agoYeah, if you click on "bulk data" you'll see the two statically hosted CSVs for ASN and IP data. What else would you find useful in those datasets? It's quite easy to expand on them.
- byyll 3y agoCountries.
- bswinnerton 3y agoThe country code is the last portion of the networks CSV: $ curl -sL ip.guide/bulk/networks.csv | head -n 2 prefix,asn,organization,country 1.0.0.0/24,13335,"Cloudflare, Inc.",US
- byyll 3y agoI meant something like de.csv to get a list of IP ranges in Germany.
- tuga 3y agoI suppose I was overly enthusiastic about the project and overlooked the bulk part . Thank you. Personally, I prefer to use local MMDB versions as they provide faster results and do not require network usage. Having knowledge about whether an IP is a proxy, VPN, data center, etc. is valuable to me, but I understand that it may vary depending on each project's requirements.
- meeb 3y agoWithout wishing to gazump on tuga's excellent project, you can get mmdb files for IPs and ASNs free for personal use from https://ipnetdb.com/ https://ipnetdb.com/ that will probably provide the data you want. (Disclaimer: I work for the company that develops IPNetDB).
- rebelde 3y agoFeature request for any service like this: Let "me" know if it is a school, so I know that I am probably dealing with minors, a public environment and a firewall. Of course, you need to do the work (rDNS to start) to identify the schools. I love the speed of the responses!
- slig 3y agoIPINFO.io has that info, but I too would like to have this information in a free service.
- reincoder 3y agoI work for IPinfo. We have higher level IP category information on our website for free. We categorize ASN and companies/organizations based on 4 categories: ISP, Education, Hosting and Business. This ASN level categorization are done mainly from WHOIS and other public internet records. We don't sub-categorize by schools, university, public research institutions, k-12 etc. The reason is accuracy. Even though I can understand the possible methods for doing this, the issue is that it can not be done reliably at scale. As a data provider, from our end we hope to provide the highest possible accuracy and vouch for the service we provide. For this level of classification, we will generally request users to say what data they need from us, and we try to help them come to a solution that they have to build on their own. They can do whatever classification they want to do based on their personal level of tolerance for accuracy.
- avipars 3y agoSeems like schools should opt-in by submitting their IP address/range
- inemesitaffia 3y agoUniversity's and post secondary educational institutions can have k12 schools attached especially if they study education or are isolated
- bogomipz 3y agoI love the API and response times! I had a few questions: Might you open-source this in the future? Were you already comfortable in Rust or is there a reason you selected Rust for this project i.e performance and so plans to offer this as commercial product? How often are RIPE info and MaxMind data updated these days or is that the 8 hours? Thanks for sharing!
- bswinnerton 3y ago> Will this be open-sourced? I don't think there's a strong reason to keep it closed-source. > Were you already comfortable in Rust or is there a reason you selected Rust for this project? This was a big learning opportunity for me to learn Rust. I had done two small projects in Rust before this one. > How often are RIPE info and MaxMind data updated these days? The MRT dumps where it gets its BGP data are updated every 8 hours, and MaxMind appears to be updated twice a week.
- nektro 3y agolove this, nice work :) so fast.
- WarOnPrivacy 3y agoI like. I was just looking for an easy way to pull geoip in a bash script.
- ashu1461 3y agoIs there a rate limit to the API ?
- bswinnerton 3y agoNo rate limits or auth for requests, but as mentioned below the api starts to load shed at 2k concurrent requests.
- johnthescott 3y agofeature request: date of cache entry.
- bswinnerton 3y agoIt's not available from the API, but there is a "last updated" date when you view it in a browser. It's at most 8 hours old.
- alam2000 3y ago[dead]
- withinboredom 3y agoShowing the start/ending address as part of the network would be helpful when looking up the network. That would avoid having to pull out a CIDR calculator when using this tool.
- bswinnerton 3y agoGreat idea. This is rolling out right now.
- ta1243 3y agoNice, I currently do "curl ipinfo.io" which returns json, and seems to use a more accurate geo lookup (based on the hotel wifi I'm currently on). It doesn't report the network though, and the ASN is a string of asn and name, no org or country, so that's a bonus. However curl ip.guide just returns blank (there's a redirect). If you follow the redirect with -L the json isn't pretty-printed.
- reincoder 3y agoI work for IPinfo. >the ASN is a string of asn and name, no org or country Yeah detailed ASN information on the API level is available on paid tiers. However, we have a free IP to ASN Country database that is updated daily and provides full accuracy. That database provides ASN, AS organization, and AS domain information. I think the reason we don't have more ASN details on the API even though we provide more information for free in the database is because of the target audience and usability of the IP metadata. Our API allows for tokenless API access for up to 1,000 request/day. There is no compromise with data accuracy. The goal is to be generally useful and extremely fast. Detailed ASN information is still freely accessible from the website, though. So, we have to balance out free API, free website information and paid API/database. I have been reaching out to folks to adopt the free IP to Country ASN database, as it is free to use and provides full accuracy. If anyone wants to build a public API on top of the IPinfo free database that return more ASN information available there, they are more than welcome to that!
- jftuga 3y ago> Our API allows for tokenless API access for up to 1,000 request/day. Thank you for this! Much appreciated! I am sure there are tons of similar programs, but here is one I wrote: https://github.com/jftuga/ipinfo https://github.com/jftuga/ipinfo I added on a distance column. Just yesterday, I added this: brew install jftuga/tap/ipinfo
- reincoder 3y agoThe pleasure is all ours. Your tool is really awesome. I have bookmarked it. It addresses a very practical questions users have about distance calculation. Now I have the right tool to recommend to users. Would it be possible to allow access token usage in the tool, please?
- romanixromanix 3y agoVery nicely done. I like the simplicity of the page and interface.
- umen 3y agocan you pls elaborate your tech stack and where do host ? 1 .rust ( what server or hand crafted ?)
- bswinnerton 3y agoFor the backend, it's written in Rust using a few key crates: axum for the api, bgpkit-parser for parsing the MRT data, and reqwest for fetching data at boot. The site is hosted on Neptune Networks, another side project of mine for people to learn and experiment with BGP.
- DavideNL 3y agoAlternatieve, fyi; curl -sS https://am.i.mullvad.net/json | jq
- lovasoa 3y agoThis mullvad thing is just another "what is my ip" service. His site lets you download the entire database locally, for free, and without registration.
- spacecadet 3y agoThis is neat, Im currently passing some IP addresses to OpenAi for a crude version of this, but will try this out!
- AndrewCopeland 3y agoNice, I like how simple it is! I provide a similar service but with more focus on bot/data center/VPN ip addresses. https://ipdetective.io https://ipdetective.io
- tonymet 3y agoHere's a powershell command -- let's add it to the docs! > (iwr ip.guide).Content | ConvertFrom-Json | Select-Object location
- fastasucan 3y agoI really like the webpage, informative and minimalistic. Can this be used to look up ip's trying to connect to my server, and then ban according to nationality? (As its only for me to connect, however that can be from hotels etc around my country - so a filter on nationality might be the next best thing to a list of IP's).
- _8j50 3y agoHow is this better than the api at stat.ripe.net? https://stat.ripe.net/docs/ https://stat.ripe.net/docs/