Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

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!
Something I find myself doing often is allowing certain traffic on private interfaces but not on public. Might be worth an example:
ufw allow in on eth1 to any port 22 proto tcp
If you had a droplet with private networking this would allow ssh only to the private interface.
ufw allow in on eth0 to any port 80 proto tcp
This would allow HTTP to the external interface
Does it matter if it was recently updated or not? The latest ufw release was version 0.33 on 2012-08-17. Would it be safe to use ufw?
I will add in that if you choose to do a deny all, and then allow exceptions, make sure you put the deny rule after (or below, or higher numbered rule) the rules that allow. For instance, below would still not allow connections from 15.15.15.0/24, you will have to reverse the order, and don’t forget to reload once you change the rules, else it won’t take effect yet until you do: ufw reload
this would deny everyone, even those on the subnet (due to the order) [ 1] 80 DENY IN Anywhere [ 2] 80 ALLOW IN 15.15.15.0/24
this would work better, denying everyone, but an IP on that subnet: [ 1] 80 ALLOW IN 15.15.15.0/24 [ 2]80 DENY IN Anywhere
How could i get ip’s from a list (from a CMS) and only allow these ip’s and also to always update the ip’s from the list, is this possible?
Thanks
I am having trouble accessing my machine via local IP. I set up an openvpn server along with ufw. I am able to access the openvpn server machine via private IP just fine but not able to access any other machine via private IP in the same network. Is there a rule I can add that will solve my problem or is this unrelated?? Appreciate the help and great article btw
Thanks! this was great. i followed all the steps and the https works perfectly, when I run the test though, I only get a B. This server supports weak Diffie-Hellman (DH) key exchange parameters. Grade capped to B.
Any thoughts on how to improve it?
This script will help. https://github.com/diveyez/ufw-dnsbl-rules-set/blob/master/dofw.sh