Skip to content

FlowGuard/asn-resolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASN Resolver

Asn resolver provides grpc service for translating IP address to ASN.

Usage

Pull docker image

docker pull ghcr.io/flowguard/asn-resolver:latest

Run docker image with these env variables:

  • ASN_PROVIDER - Provider of the ASN database. At this time only geolite asn database source is supported
  • ASN_DB_REFRESH_RATE - ASN database refresh period eg. 24 hours
  • GEOLITE_API_KEY - Api key used for geolite db access
docker run -p 8090:8090 -e GEOLITE_API_KEY=<api-key> -e ASN_PROVIDER="geolite" -e ASN_DB_REFRESH_RATE="24 hours" ghcr.io/flowguard/asn-resolver:latest

Test it with grpcurl tool or with arbitrary grpc client

$ grpcurl -plaintext -d '{"ip_address": "1.1.1.1"}' localhost:8090 asnservice.AsnService.GetAsnNum                                                                   
{
  "asnNum": 13335,
  "asnName": "CLOUDFLARENET"
}

$ grpcurl -plaintext -d '{"ip_address": "192.168.1.1"}' localhost:8090 asnservice.AsnService.GetAsnNum                                                              
ERROR:
  Code: NotFound
  Message: ASN not found

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages