I have a ubuntu server
How can i open a port ?
I have flushed the iptables and off'ed ufw
Provide me steps how to open a tcp port
Your question is overly vague and probably insufficient to help you do what you're actually trying to do, but if you just want to open a port you can do it like so:
nc -l -p PORT_NUMBER
You can then pass data received on that port to a script by doing:
nc -l -p PORT_NUMBER | SCRIPT