Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benhalverson/docker-microservice
ipblock list api
https://github.com/benhalverson/docker-microservice
Last synced: 7 days ago
JSON representation
ipblock list api
- Host: GitHub
- URL: https://github.com/benhalverson/docker-microservice
- Owner: benhalverson
- License: mit
- Created: 2021-04-30T06:30:16.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-22T03:28:36.000Z (7 months ago)
- Last Synced: 2024-04-23T05:42:43.623Z (7 months ago)
- Language: TypeScript
- Size: 1.06 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-microservice
The purpose of this API is to check an IP address against a known list of ip addresses in a Firehol blocklist## Getting started
You can either git clone the repo and install the repo locally or use docker-compose to start the app.
- `git clone [email protected]:benhalverson/docker-microservice.git`
- `cd docker-microservice`
- `npm i`
- `npm run dev`## With Docker
- `git clone [email protected]:benhalverson/docker-microservice.git`
- `cd docker-microservice`
- `docker-compose up`Use curl or Postman to hit the api.
Example `curl firehol-staging.us-west-2.elasticbeanstalk.com/98.207.144.98`
```json
{
"success": true,
"hostname": "firehol-staging.us-west-2.elasticbeanstalk.com",
"flagged": false,
"message": "The IP Address is 98.207.144.98 is ok.",
"location": {
"region": "CA",
"country": "US",
"timezone": "America/Los_Angeles"
},
"ipset": "",
"ipsets-count": 249
}
```Example with a ip in one of the lists `curl firehol-staging.us-west-2.elasticbeanstalk.com/5.79.79.211`
```json
{
"success": true,
"hostname": "firehol-staging.us-west-2.elasticbeanstalk.com",
"flagged": true,
"message": "The IP Address is 5.79.79.211 was found in an ipset.",
"location": {
"region": "ZH",
"country": "NL",
"timezone": "Europe/Amsterdam"
},
"ipset": "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/bambenek_c2.ipset",
"ipsets-count": 249
}
```Invalid IP example `curl firehol-staging.us-west-2.elasticbeanstalk.com/asdf
```json
{
"success": false,
"Error": "Not a valid IP address."
}
```To use docker you need Docker installed. See docker.com
## Technology used
- Node.js 14.x LTS
- express.js
- axios
- firehol ip address list
- Docker / Docker compose
- AWS Pipelines
- AWS Elasticbeanstalk## Demo links
http://firehol-staging.us-west-2.elasticbeanstalk.com/healthcheck
http://firehol-staging.us-west-2.elasticbeanstalk.com/:ipaddress