#!/bin/bash [ -z "$3" ] && echo "usage: $0 " && exit 1 exec socat TCP4-LISTEN:$1,fork,reuseaddr TCP4:$2:$3