by this script you can block all torrent and p2p traffic on your server or vps
install :
wget https://github.com/LantosBro/block-torrent-on-server/raw/main/btorrent.sh
chmod +x btorrent.sh
Without hosts change:
bash btorrent.sh --no-hosts
With hosts:
bash btorrent.sh