#!/bin/sh set -e if [ "$EUID" -ne 0 ] then echo "Please run as root" exit fi # Add user: useradd -c "Tarpit User" -s /sbin/nologin -d /nonexistent _tarpit # Install binary: install -m 750 -o _tarpit ../../target/release/sip-tarpit /usr/local/bin/ # Install rc.d: install -m 555 -o root rc.d/sip_tarpit /etc/rc.d/ rcctl enable sip_tarpit # Install config file install -d -m 755 /etc/sip-tarpit/ install -m 644 ../../config.toml /etc/sip-tarpit/ echo ' Remember to adjust your /etc/sip-tarpit/config.toml file!!! p.ex.: log_file = "/var/log/sip_tarpit/sip_tarpit.log" ' # Log directory install -d -m 755 -o _tarpit /var/log/sip_tarpit/ # PF echo ' Remember to allow incoming traffic on sip-tarpit listening UDP port (default 5060/udp). '