Installation
This guide covers all installation methods for CloakProbe.
Automated Installation
Section titled “Automated Installation”The recommended way to install CloakProbe on a Linux server:
curl -fsSL https://raw.githubusercontent.com/drmckay/cloakprobe/main/install.sh | sudo bashThe script automatically:
- Detects your architecture (x86_64 or aarch64)
- Downloads the latest release
- Creates
/opt/cloakprobedirectory structure - Creates
/etc/cloakprobeconfiguration directory - Installs
cloakprobe.tomlconfiguration file - Creates a
cloakprobesystem user - Installs systemd services (single and multi-instance)
- Sets correct permissions
After installation, download the databases:
# IP-to-ASN database (required)sudo /opt/cloakprobe/scripts/update_asn_db.sh
# Multi-RIR organization database (optional, for company names)sudo /opt/cloakprobe/scripts/update_org_db.shBuilding from Source
Section titled “Building from Source”-
Install Rust
Terminal window curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shsource $HOME/.cargo/env -
Clone the repository
Terminal window git clone https://github.com/drmckay/cloakprobe.gitcd cloakprobe -
Build the release binary
Terminal window cargo build --releaseThe binary will be at
target/release/cloakprobe. -
Build database tools
Terminal window cargo build --release --bin asn_buildercargo build --release --bin org_buildercargo build --release --bin org_builder_rpslcargo build --release --bin org_builder_arin
Manual Installation
Section titled “Manual Installation”If you prefer to install manually without the script:
-
Create directory structure
Terminal window sudo mkdir -p /opt/cloakprobe/{data,scripts,systemd,templates,docs}sudo mkdir -p /etc/cloakprobe -
Copy binaries
Terminal window sudo cp target/release/cloakprobe /opt/cloakprobe/sudo cp target/release/asn_builder /opt/cloakprobe/sudo cp target/release/org_builder /opt/cloakprobe/sudo cp target/release/org_builder_rpsl /opt/cloakprobe/sudo cp target/release/org_builder_arin /opt/cloakprobe/sudo chmod +x /opt/cloakprobe/* -
Copy configuration
Terminal window sudo cp cloakprobe.example.toml /etc/cloakprobe/cloakprobe.tomlEdit the configuration:
Terminal window sudo nano /etc/cloakprobe/cloakprobe.tomlUpdate database paths:
[database]asn_db_path = "/opt/cloakprobe/data/asn_db.bin"org_db_path = "/opt/cloakprobe/data/orgs_db.bin" -
Create system user
Terminal window sudo useradd -r -s /bin/false -d /opt/cloakprobe cloakprobe -
Copy scripts and templates
Terminal window sudo cp scripts/update_asn_db.sh /opt/cloakprobe/scripts/sudo cp scripts/update_org_db.sh /opt/cloakprobe/scripts/sudo cp scripts/download_rir_orgs.sh /opt/cloakprobe/scripts/sudo cp -r templates/* /opt/cloakprobe/templates/sudo chmod +x /opt/cloakprobe/scripts/*.sh -
Set ownership
Terminal window sudo chown -R cloakprobe:cloakprobe /opt/cloakprobesudo chown -R cloakprobe:cloakprobe /etc/cloakprobe -
Install systemd services
Terminal window # Single instance servicesudo cp systemd/cloakprobe.service /etc/systemd/system/# Multi-instance template (optional)sudo cp systemd/cloakprobe@.service /etc/systemd/system/sudo systemctl daemon-reloadsudo systemctl enable cloakprobe
Directory Structure
Section titled “Directory Structure”After installation, the directory structure looks like:
/opt/cloakprobe/├── cloakprobe # Main binary├── asn_builder # ASN database builder├── org_builder # Multi-RIR org database builder├── org_builder_rpsl # RPSL format parser (RIPE, APNIC, LACNIC, AFRINIC)├── org_builder_arin # ARIN XML parser├── cloakprobe.example.toml # Example configuration├── data/│ ├── asn_db.bin # IP-to-ASN database│ └── orgs_db.bin # Multi-RIR organization database├── templates/│ ├── index.html.tera│ └── privacy.html.tera├── scripts/│ ├── update_asn_db.sh│ ├── update_org_db.sh # Multi-RIR update orchestrator│ └── download_rir_orgs.sh # RIR data downloader├── systemd/│ ├── cloakprobe.service│ └── cloakprobe@.service└── docs/ └── nginx-deployment.md
/etc/cloakprobe/└── cloakprobe.toml # Active configurationDatabase Sources
Section titled “Database Sources”CloakProbe uses two local databases:
IP-to-ASN Database
Section titled “IP-to-ASN Database”- Source: iptoasn.com (Public Domain)
- Contains: IP ranges → ASN mappings for IPv4 and IPv6
- Update script:
update_asn_db.sh - Output:
data/asn_db.bin
Multi-RIR Organization Database
Section titled “Multi-RIR Organization Database”- Sources: All 5 Regional Internet Registries
- Contains: ASN → Organization details (name, ID, country, type, abuse contact)
- Update script:
update_org_db.sh - Output:
data/orgs_db.bin
Updating
Section titled “Updating”To update to a newer version:
# Stop the servicesudo systemctl stop cloakprobe
# Run the installer againcurl -fsSL https://raw.githubusercontent.com/drmckay/cloakprobe/main/install.sh | sudo bash
# Start the servicesudo systemctl start cloakprobeYour configuration in /etc/cloakprobe/cloakprobe.toml will be preserved.
Uninstallation
Section titled “Uninstallation”# Stop and disable servicesudo systemctl stop cloakprobesudo systemctl disable cloakprobe
# Remove service filessudo rm /etc/systemd/system/cloakprobe.servicesudo rm /etc/systemd/system/cloakprobe@.servicesudo systemctl daemon-reload
# Remove installationsudo rm -rf /opt/cloakprobe
# Remove configurationsudo rm -rf /etc/cloakprobe
# Remove user (optional)sudo userdel cloakprobeTroubleshooting
Section titled “Troubleshooting”Service won’t start
Section titled “Service won’t start”Check the logs:
sudo journalctl -u cloakprobe -n 50Common issues:
- ASN database missing: Run
update_asn_db.sh - Config file missing: Check
/etc/cloakprobe/cloakprobe.tomlexists - Permission issues: Check ownership is
cloakprobe:cloakprobe - Port in use: Change
portin config file
Binary not found
Section titled “Binary not found”ls -la /opt/cloakprobe/cloakprobesudo chmod +x /opt/cloakprobe/cloakprobeDatabase download fails
Section titled “Database download fails”Check connectivity:
curl -I https://iptoasn.com/data/ip2asn-combined.tsv.gzcurl -I https://ftp.ripe.net/ripe/dbase/split/ripe.db.aut-num.gzcurl -I https://ftp.apnic.net/apnic/whois/apnic.db.aut-num.gz