Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to open port using command sudo ufw allow 3306/tcp but it gives the following error:

sudo: ufw: command not found

please help me

share|improve this question

migrated from stackoverflow.com Feb 17 '10 at 11:38

This question came from our site for professional and enthusiast programmers.

    
retagged it, but newby questions are never false. May I hint you at Ubuntu community for questions like this? –  BeowulfOF Feb 17 '10 at 11:22
    
Hello, welcome to Super User. Your question has been migrated here, where it is more adapted. To regain ownership over your question, you should create an account here, and associate it with your Stack Overflow account in user options. –  Gnoupi Feb 17 '10 at 14:32
add comment

4 Answers

an open port helps you nothing, if you don't have a server listening on this port.

if you install mysql it will automatically open port 3306

share|improve this answer
    
Ihave to agree with knittle. At the moment it's sounding like you don't have ufw installed, so you may have misunderstood the purpose fo that line in the guide you're following? –  delerious010 Feb 17 '10 at 13:09
add comment

If the command ufw returns:

sudo: ufw: command not found

Than I'm almost sure that ufw is not installed yet.

Use apt-get to install ufw on you machine. Like Matthew Flaschen typed above type:

sudo apt-get install ufw
share|improve this answer
add comment
sudo apt-get install ufw

You'll find searching the web helpful on these types of questions.

share|improve this answer
1  
Who needs to search the web when you can search the trilogy sites? –  Gnoupi Feb 17 '10 at 14:35
add comment

Type whereis ufw. If you get back something like this:

ufw: /usr/sbin/ufw /usr/share/man/man1/ufw.1.gz ...

(I'm making up the details, I don't have ufw installed.) If you get back something like that, it tells you that the ufw binary is at /usr/sbin/ufw. Perhaps your $PATH doesn't recognize /usr/sbin. In that case you should call ufw with a full path: sudo /usr/sbin/ufw allow 3306/tcp.

ufw may well be somewhere inside /etc (or inside /etc/init.d), rather than in any .../bin directory.

If whereis ufw returns:

ufw:

then you probably don't have it installed, and will need to do:

sudo apt-get install ufw

as Matthew Flaschen says.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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