[Solved] sudo ufw allow ‘Nginx HTTP’ ERROR: Need 'to' or 'from' clause

Error: sudo ufw allow ‘Nginx HTTP’ ERROR: Need 'to' or 'from' clause

Answer: You need to execute that command as root/super user. change your privilages as root by: sudo su You will be prompted to enter the password and then after that you will notices root in front of your shell commands. Carry on with adding rules to ufw like so; ufw allow 'Nginx HTTP', and ufw allow 'Nginx HTTPS' then ufw allow 'Nginx Full'.
- After the command make sure you check the status of the Firewall by; ufw status and make sure all ports intended to open are really open.

[Bonus]: If you want to delete the existing rules in ufw do so; ufw delete allow TypePortNumberHere and you will notice the rule has been successfully deleted.

[Bonus]: Sometimes you just copy and paste commands from a website, it does not work. Try to type in the command by yourself.

- This information is for Software Developers who work to secure servers, remember do good to people and good will come to you.

Edit this Article
Was this page helpful?
Yes Yes! this solution to the problem was helpful. No No! this solution to the problem was not helpful.. Leave ErnesTech Feedback.Feedback
If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.

Your Session is Ending
Login to Continue

© 2021 - ErnesTech - Privacy