Home > Articles > Details

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

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


Please Login to see the rest of the answer
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.


If you log in, you will be notified when someone leaves a comment.

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


© 2022 - ErnesTech - Privacy