I want to have a message to anyone that tries to telnet (port 23) to my server that they are connecting to the wrong port, then disconnects them.
Basically something like socat would be ideal, but I couldn't get it working. Needs to be a persistent service (forks), so it goes back to wait on port 23 after executing.
I thought something like:
sudo socat -u tcp-l:23,fork gopen:/home/ajross/message.txt
...but this doesn't display anything.