i would like secure a droplet with the DO firewall to only allow https requests from a specific domain as its ip changes often so cant set a static ip
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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
The DigitalOcean firewalls are layer 4 firewalls, meaning that you can only filter TCP and UDP traffic. To be able to filter based on the domain name, you could do that via your web server, for example if you are using Nginx, then you could create a catch all Nginx server block and block all of the traffic, eg:
Then you could have your standard Nginx server block for your domain name as normal.
If the IP address changes it’s going to be a little harder. Having said that, what you can do is if you know the range of the said IP to allow the range. That way if the IP changes with another from that range, you’ll still have it allowed.
Is that something you would consider?
Want to learn more? Join the DigitalOcean Community!
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Sign up now