- Introduction
- Features
- Prerequisites
- Installation
- Usage
- Output
- Logging
- File Structure
- Contributing
- License
The IP Range Extractor is a Python-based tool designed to download, parse, and extract IP address ranges from RIPE's alloclist.txt
file for a specified country. It generates MikroTik .rsc
configuration files suitable for firewall address lists and a corresponding JSON file for further processing or integrations.
- Single
.rsc
File: Generates a unified MikroTik.rsc
file containing both IPv4 and IPv6 address lists under their respective sections. - JSON Output: Produces a JSON file with all extracted IP entries, including details like allocation date and organization.
- Command-Line Interface: Accepts country codes as named arguments (e.g.,
--country=ir
). - Docker Support: Provides a
Dockerfile
for containerizing the application, ensuring consistent environments. - Comprehensive Logging: Maintains detailed logs of the extraction and file generation processes for debugging and auditing.
- Python 3.6+
- pip
- Docker (optional, for containerization)
git clone https://github.com/vaheed/ip_country_extraction.git
cd ip_country_extraction
docker build -t ip_country_extraction .
docker run --rm -v $(pwd)/output:/app/output ip_country_extraction --country=ir