7.2 Tarpit False Login loop - Tomato6966/Debian-Cheat-Sheet-Setup GitHub Wiki
Requirements:
-
SSH on a different port than default (22)
- e.g: on Port 5050 | [here is a tutorial for that incl. a firewall]
-
Also for that the port 22 (default ssh port) shall be allowed by your firewall
-
and couple libs and packages:
sudo apt install python3-pip
# tarpit
pip3 install ssh-tarpit
Start tarpit with logs: (so you see which ips login, so you can ban them if they spam and try to "hack" you / steal data from you)
ssh-tarpit -i 4 -a <your connection ipv4> -p 22 -f /path/to/log/tarpit.log
Start tarpit without logs:
ssh-tarpit -i 4 -a <your connection ipv4> -p 22
Start it with pm2:
echo "ssh-tarpit -i 4 -a <your connection ipv4> -p 22 -f /path/to/log/tarpit.log" > /home/startTarpit.sh
chmod +rwx /home/startTarpit.sh
pm2 start /home/startTarpit.sh --name Tarpit
My startTarpit.sh File:
# /bin/bash
echo "" > ~/tarpit.log
ssh-tarpit -i 4 -a 45.142.104.172 -p 22 -f ~/tarpit.log