firewall - how to block all incoming traffic except from 1 website? working example please

July 25, 2019 141 views
DigitalOcean Cloud Firewalls Ubuntu 18.04

not sure how to do this been looking for hours and I do not see 1 example ...I would think this to be a normal frequent question. I only need my website which is hosted on another place to access my digitalocean droplet. I am sure it can be done easily enough in the digitalocean fire wall but I have had zero luck with my testing?

1 Answer

Hey there @support2bd6f6efeefcc3c0033,

Our product docs have a great section on creating custom rules in our cloud firewall.
You can use these to allow traffic through a specific port or from a specific IP.

In your situation, if you wanted to permit all traffic from a single IP, simply create the custom rule as the custom type with the port range left blank and in the source simply put the IP of the server you'd like to permit through.

https://www.digitalocean.com/docs/networking/firewalls/how-to/configure-rules/#custom-rules

Hope that helps!
- Matt.

Have another answer? Share your knowledge.