Create a fake TCP server
Open a throwaway TCP server with netcat and connect a client to it.
1 min read
Updated
netcat can stand in for a TCP server when you only need something to connect to. This snippet opens a listener on port 5000 and connects a client to it. The commands are below.
See https://www.cyberciti.biz/faq/linux-unix-open-ports/
fake-tcp-server.sh
bash
# create server
nc -l 5000
# connect to server
nc localhost 5000