Is Your IP Blacklisted? Don't Get Blocked! Stay Ahead of Threats
1.1K
Instructions:
This project provides a service that checks if IP addresses are blacklisted. It's containerized with Docker and designed to integrate with other services like RabbitMQ and PostgreSQL, while storing data in MongoDB.
Prerequisites:
Setup:
docker pull f4sx/blacklist-checker:tagname (Replace tagname with the appropriate tag if needed)config.env file: Use the following example as a template and fill in your actual settings for MongoDB, RabbitMQ, and PostgreSQL. Do not include any sensitive information like passwords or IP addresses in this file.# MongoDB Ayarları
MONGO_URL="mongodb+srv://<username>:<password>@<cluster-address>/<database-name>"
MONGO_DB_NAME="<database-name>"
# RabbitMQ Ayarları
RABBITMQ_HOST="<rabbitmq-host>"
RABBITMQ_PORT=<rabbitmq-port>
RABBITMQ_USERNAME="<rabbitmq-username>"
RABBITMQ_WEB_UI_PORT=<rabbitmq-web-ui-port>
RABBITMQ_AMQP_PORT=<rabbitmq-amqp-port>
RABBITMQ_DEFAULT_QUEUE="<rabbitmq-queue-name>"
RABBITMQ_CONCURRENCY_LIMIT=<rabbitmq-concurrency-limit>
# PostgreSQL Ayarları
POSTGRES_USERNAME="<postgres-username>"
POSTGRES_DB="<postgres-database-name>"
POSTGRES_HOST="<postgres-host>"
POSTGRES_PORT=<postgres-port>
# Log Dosyaları
APP_LOG_PATH=logs/application.log
ERROR_LOG_PATH=logs/error.log
docker-compose.yml file:version: "3.7"
services:
spdnet_ip_tracker:
image: f4sx/blacklist-checker
secrets:
- rabbitmq_password
- rabbitmq_erlang_cookie
- postgres_password
env_file:
- config.env
environment:
RUN_ENV: "docker"
RABBITMQ_PASSWORD_FILE: /run/secrets/rabbitmq_password
RABBITMQ_ERLANG_COOKIE_FILE: /run/secrets/rabbitmq_erlang_cookie
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
MONGO_URL: "mongodb+srv://<username>:<password>@<cluster-address>/<database-name>"
ports:
- "127.0.0.1:8000:8000" # Sadece localhost erişimi
deploy:
replicas: 1
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
placement:
constraints: [node.role == manager] # Sadece manager node'larda çalıştır
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
secrets:
rabbitmq_password:
external: true
rabbitmq_erlang_cookie:
external: true
postgres_password:
external: true
Create Docker secrets for sensitive information:
echo "<your_rabbitmq_password>" | docker secret create rabbitmq_password -
echo "<your_rabbitmq_erlang_cookie>" | docker secret create rabbitmq_erlang_cookie -
echo "<your_postgres_password>" | docker secret create postgres_password -
Start the containers: docker-compose up -d
Docker Swarm:
If you want to deploy the service on a Docker Swarm cluster, follow these steps:
docker swarm initecho "<your_rabbitmq_password>" | docker secret create rabbitmq_password -
echo "<your_rabbitmq_erlang_cookie>" | docker secret create rabbitmq_erlang_cookie -
echo "<your_postgres_password>" | docker secret create postgres_password -
docker stack deploy -c docker-compose.yml spdnet_ip_trackerNotes:
<your_rabbitmq_password>, <username>, <cluster-address>) with your actual credentials.config.env file and Docker secrets contain sensitive information, so keep them secure.deploy section from the docker-compose.yml file.Content type
Image
Digest
sha256:5070f5fd4…
Size
3.2 GB
Last updated
almost 2 years ago
docker pull f4sx/blacklist-checker