https://github.com/czerwonk/asn_lookup
Webservice providing prefixes announced by a specific ASN based on routing daemon information
https://github.com/czerwonk/asn_lookup
asn autonomous-systems bird golang prefix routing
Last synced: 5 months ago
JSON representation
Webservice providing prefixes announced by a specific ASN based on routing daemon information
- Host: GitHub
- URL: https://github.com/czerwonk/asn_lookup
- Owner: czerwonk
- License: mit
- Created: 2017-06-30T15:30:48.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-04-09T09:06:57.000Z (about 8 years ago)
- Last Synced: 2024-06-20T08:16:26.755Z (almost 2 years ago)
- Topics: asn, autonomous-systems, bird, golang, prefix, routing
- Language: Go
- Homepage:
- Size: 52.7 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# asn_lookup
[](https://travis-ci.org/czerwonk/asn_lookup)
[](https://goreportcard.com/report/github.com/czerwonk/asn_lookup)
Webservice providing prefixes announced by a specific ASN based on routing daemon information
## Default port
By default the service listens on port 10179 for incoming requests
## Installation
```bash
go get -u github.com/czerwonk/asn_lookup
```
## Running
In this exaple the socket is located at /usr/local/var/run/. This can vary in different setups:
```bash
asn_lookup -bird.socket=/usr/local/var/run/bird.ctl -bird6.socket=/usr/local/var/run/bird6.ctl
```
## Usage (Example)
### Request by ASN
```
curl http://[::]:10179/asn/15169
```
Response:
```xml
15169
2404:6800:4008::/48
2404:6800:4009::/48
2404:6800:400a::/48
2620:15c::/36
2404:6800:4001::/48
2404:6800:4002::/48
2404:6800:4003::/48
2404:6800:4004::/48
2605:ef80:c0::/42
2404:6800:4005::/48
2404:6800:4006::/48
2404:6800:4007::/48
2620:0:1000::/40
2800:3f0::/32
2a00:1450::/32
2600:1900::/28
2404:6800::/32
2605:ef80:80::/42
2a00:79e0::/32
2a00:1450:401c::/48
2a00:1450:401a::/48
2a00:1450:401b::/48
2a00:1450:4018::/48
2a00:1450:4019::/48
2a00:1450:4016::/48
2800:3f0:4003::/48
2001:4860::/32
2a00:1450:4017::/48
2800:3f0:4002::/48
2a00:1450:4014::/48
2800:3f0:4001::/48
2a00:1450:4015::/48
2a00:1450:4012::/48
2a00:1450:4013::/48
2a00:1450:4010::/48
2800:3f0:4005::/48
2a00:1450:4011::/48
2800:3f0:4004::/48
2a00:1450:400e::/48
2a00:1450:400f::/48
2a00:1450:400c::/48
2a00:1450:400d::/48
2a00:1450:400a::/48
2a00:1450:400b::/48
2a00:1450:4008::/48
2a00:1450:4009::/48
2a00:1450:4006::/48
2a00:1450:4007::/48
2a00:1450:4004::/48
2a00:1450:4005::/48
2a00:1450:4002::/48
2a00:1450:4003::/48
2a00:1450:4001::/48
2a03:ace0:100::/40
2a03:ace0::/32
2607:f8b0:4011::/48
2607:f8b0:4010::/48
2607:f8b0:4013::/48
2607:f8b0:4012::/48
2605:ef80:40::/42
2607:f8b0:4015::/48
2605:ef80:140::/42
2607:f8b0:4014::/48
2607:f8b0:4016::/48
2607:f8b0:4009::/48
2607:f8b0:4008::/48
2607:f8b0:400b::/48
2607:f8b0:400a::/48
2607:f8b0:400d::/48
2607:f8b0:400c::/48
2607:f8b0:400f::/48
2607:f8b0:400e::/48
2607:f8b0:4001::/48
2607:f8b0:4000::/48
2607:f8b0:4003::/48
2c0f:fb50:4002::/48
2607:f8b0:4002::/48
2c0f:fb50:4003::/48
2607:f8b0:4005::/48
2607:f8b0:4004::/48
2607:f8b0:4007::/48
2607:f8b0:4006::/48
2605:ef80::/32
2605:ef80:200::/42
2c0f:fb50::/32
2607:f8b0::/32
2401:fa00::/32
2620:120:e000::/40
```
### Request by IP
```bash
curl http://[::]:10179/asn?ip=2001:4860:4860:0:0:0:0:8888
```
Response:
```xml
15169
2404:6800:4008::/48
2404:6800:4009::/48
2404:6800:400a::/48
2620:15c::/36
2404:6800:4001::/48
2404:6800:4002::/48
2404:6800:4003::/48
2404:6800:4004::/48
2605:ef80:c0::/42
2404:6800:4005::/48
2404:6800:4006::/48
2404:6800:4007::/48
2620:0:1000::/40
2800:3f0::/32
2a00:1450::/32
2600:1900::/28
2404:6800::/32
2605:ef80:80::/42
2a00:79e0::/32
2a00:1450:401c::/48
2a00:1450:401a::/48
2a00:1450:401b::/48
2a00:1450:4018::/48
2a00:1450:4019::/48
2a00:1450:4016::/48
2800:3f0:4003::/48
2001:4860::/32
2a00:1450:4017::/48
2800:3f0:4002::/48
2a00:1450:4014::/48
2800:3f0:4001::/48
2a00:1450:4015::/48
2a00:1450:4012::/48
2a00:1450:4013::/48
2a00:1450:4010::/48
2800:3f0:4005::/48
2a00:1450:4011::/48
2800:3f0:4004::/48
2a00:1450:400e::/48
2a00:1450:400f::/48
2a00:1450:400c::/48
2a00:1450:400d::/48
2a00:1450:400a::/48
2a00:1450:400b::/48
2a00:1450:4008::/48
2a00:1450:4009::/48
2a00:1450:4006::/48
2a00:1450:4007::/48
2a00:1450:4004::/48
2a00:1450:4005::/48
2a00:1450:4002::/48
2a00:1450:4003::/48
2a00:1450:4001::/48
2a03:ace0:100::/40
2a03:ace0::/32
2607:f8b0:4011::/48
2607:f8b0:4010::/48
2607:f8b0:4013::/48
2607:f8b0:4012::/48
2605:ef80:40::/42
2607:f8b0:4015::/48
2605:ef80:140::/42
2607:f8b0:4014::/48
2607:f8b0:4016::/48
2607:f8b0:4009::/48
2607:f8b0:4008::/48
2607:f8b0:400b::/48
2607:f8b0:400a::/48
2607:f8b0:400d::/48
2607:f8b0:400c::/48
2607:f8b0:400f::/48
2607:f8b0:400e::/48
2607:f8b0:4001::/48
2607:f8b0:4000::/48
2607:f8b0:4003::/48
2c0f:fb50:4002::/48
2607:f8b0:4002::/48
2c0f:fb50:4003::/48
2607:f8b0:4005::/48
2607:f8b0:4004::/48
2607:f8b0:4007::/48
2607:f8b0:4006::/48
2605:ef80::/32
2605:ef80:200::/42
2c0f:fb50::/32
2607:f8b0::/32
2401:fa00::/32
2620:120:e000::/40
```
## Supported routing daemons
* [Bird](http://bird.network.cz/)
## License
(c) Daniel Czerwonk, 2017. Licensed under [MIT](LICENSE) license.