By Dexilez
Hello.
I have a website on digitalocean and I just followed the tutorial down below so i got my certificate and now my website uses https protocol. https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04
Everything is good to this point.
But there is a but. :)
I’m using node.js on my website. It connects to my mongoDB cluster and it creates an api url based on my domainname or/and droplet IP address.
For example my API_URL is: 123.45.67.89:5000/items I fetch that URL and do somethings on my website based on items.
But as i followed https protocol tutorial, i just enabled my firewall and because of that i guess, firewall is blocking my API URL and i get error on fetch.
I also can’t reach that API_URL(123.45.67.89:5000/items) manually.
While firewall is closed i can fetch my api.
What should i do?
Thanks. Regards.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi, Since you followed the tutorial, I guess you configured firewall rules using ufw management tool. If I am right, list the rules and check if communication is allowed on port TCP 5000
sudo ufw status verbose
If it is not allowed, you can allow it adding a rule:
sudo ufw allow 5000/tcp
Here is the tutorial on configuring firewall with ufw management tool: https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-ubuntu-20-04
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.