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 a
cloakprobesystem user - Installs the systemd service
- Sets correct permissions
After installation, download the databases:
# IP-to-ASN database (required)sudo /opt/cloakprobe/scripts/update_asn_db.sh
# RIPE organization database (optional, for company names)sudo /opt/cloakprobe/scripts/update_ripe_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 ripe_builder
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} -
Copy binaries
Terminal window sudo cp target/release/cloakprobe /opt/cloakprobe/sudo cp target/release/asn_builder /opt/cloakprobe/sudo cp target/release/ripe_builder /opt/cloakprobe/sudo chmod +x /opt/cloakprobe/* -
Create system user
Terminal window sudo useradd -r -s /bin/false -d /opt/cloakprobe cloakprobe -
Copy scripts
Terminal window sudo cp scripts/update_asn_db.sh /opt/cloakprobe/scripts/sudo cp scripts/update_ripe_db.sh /opt/cloakprobe/scripts/sudo chmod +x /opt/cloakprobe/scripts/*.sh -
Set ownership
Terminal window sudo chown -R cloakprobe:cloakprobe /opt/cloakprobe -
Install systemd service
Terminal window 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├── ripe_builder # RIPE database builder├── data/│ ├── asn_db.bin # IP-to-ASN database│ └── ripe_db.bin # RIPE organization database├── scripts/│ ├── update_asn_db.sh│ └── update_ripe_db.sh└── systemd/ └── cloakprobe.serviceDatabase 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
RIPE Organization Database
Section titled “RIPE Organization Database”- Source: RIPE NCC database dumps
- Contains: ASN → Organization name mappings
- Update script:
update_ripe_db.sh - Output:
data/ripe_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 cloakprobeUninstallation
Section titled “Uninstallation”# Stop and disable servicesudo systemctl stop cloakprobesudo systemctl disable cloakprobe
# Remove service filesudo rm /etc/systemd/system/cloakprobe.servicesudo systemctl daemon-reload
# Remove installationsudo rm -rf /opt/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 - Permission issues: Check ownership is
cloakprobe:cloakprobe - Port in use: Change
PORTin environment
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 ftp://ftp.ripe.net/ripe/dbase/split/ripe.db.aut-num.gz