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

link|improve this question
1  
Is there a service already listening in that port? – hmontoliu Aug 3 '11 at 21:43
Please provide (as an edit to your question) the output of iptables -L INPUT -v -n and the port you want opening – Iain Aug 3 '11 at 21:51
feedback

1 Answer

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.