Docs/Configuration

Configuration

Customize TarPit.pro to match your security needs.

Configuration File

TarPit.pro stores its configuration in a YAML file:

PlatformLocation
Linux / macOS~/.tarpit-pro/config.yaml
Windows%APPDATA%\tarpit-pro\config.yaml

Full Configuration Example

# TarPit.pro Configuration
# ~/.tarpit-pro/config.yaml

# Honeypot ports to listen on
ports:
  - 21    # FTP
  - 22    # SSH (remove if you have real SSH)
  - 23    # Telnet
  - 3306  # MySQL
  - 5432  # PostgreSQL
  - 6379  # Redis
  - 8080  # HTTP Alt
  - 9200  # Elasticsearch

# Tarpit behavior
tarpit:
  enabled: true           # Enable tarpitting (slow responses)
  delay: 3s               # Delay before each response
  max_response_bytes: 1024  # Max bytes per response
  jitter: true            # Randomize delays slightly

# Storage settings (paid tiers only)
storage:
  max_attacks: 10000      # Max attacks to store locally
  # db_path: /custom/path/attacks.db  # Custom SQLite path

# License (paid tiers)
license:
  key: ""                 # Your license key
  tier: "free"            # free, basic, or pro

# API settings
api:
  port: 9999              # Local API port for CLI
  cloud_url: https://api.tarpit.pro

# Logging
logging:
  level: info             # debug, info, warn, error
  file: ""                # Log to file (empty = stdout only)

Port Management

Manage honeypot ports using the CLI:

List Current Ports

tarpit-pro port list

Add a Port

tarpit-pro port add 8443      # Add HTTPS alt
tarpit-pro port add 27017     # Add MongoDB
tarpit-pro port add 11211     # Add Memcached

Remove a Port

tarpit-pro port remove 22    # Don't honeypot real SSH port

Add Common Ports

tarpit-pro port add-defaults  # Add all common attack ports

Tarpit Settings

The tarpit is what makes attackers waste their time. Configure it carefully:

SettingDefaultDescription
tarpit.enabledtrueEnable slow response mode
tarpit.delay3sDelay between response bytes
tarpit.max_response_bytes1024Maximum response size
tarpit.jittertrueAdd randomness to delays

Change Tarpit Delay

tarpit-pro config set tarpit.delay 5s    # Slower = more wasted time
tarpit-pro config set tarpit.delay 1s    # Faster = less obvious

Config CLI Commands

View Current Config

tarpit-pro config show

Set a Value

tarpit-pro config set <key> <value>

# Examples:
tarpit-pro config set tarpit.delay 5s
tarpit-pro config set logging.level debug
tarpit-pro config set storage.max_attacks 50000

Reset to Defaults

tarpit-pro config reset

Environment Variables

All config values can be overridden via environment variables:

# Format: TARPIT_<SECTION>_<KEY>
export TARPIT_LICENSE_KEY="your-license-key"
export TARPIT_TARPIT_DELAY="5s"
export TARPIT_LOGGING_LEVEL="debug"
export TARPIT_API_CLOUD_URL="https://api.tarpit.pro"

Environment variables take precedence over the config file.

Firewall Integration

TarPit.pro automatically integrates with your system firewall for IP banning:

  • Linux: iptables (auto-detects iptables-legacy on nftables systems)
  • macOS: pfctl (packet filter)
  • Windows: Windows Firewall (netsh)

View banned IPs:

tarpit-pro bans list