Last active
July 12, 2020 12:22
-
-
Save cornflourblue/d7d1b42552287ad4afa3f579597e54d5 to your computer and use it in GitHub Desktop.
Configure UFW on Ubuntu 18.04 - http://jasonwatmore.com/post/2018/09/26/setup-nodejs-mongodb-production-server-on-ubuntu-1804
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo " | |
---------------------- | |
UFW (FIREWALL) | |
---------------------- | |
" | |
# allow ssh connections through firewall | |
sudo ufw allow OpenSSH | |
# allow http & https through firewall | |
sudo ufw allow 'Nginx Full' | |
# enable firewall | |
sudo ufw --force enable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, Jason, thank you so much for your brilliant tutorial artical and video. I followed your tutorial to depoly a demo page,(Node + local MongoDb), everything works fine except the page will not be able to get data from mongodb once I enabled ufw. I had allowed 27017 and reloaded the ufw, (ufw status as in screenshot). The page works well once disabled ufw. Any idea where is the problem?