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.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
Hi there,
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.
Hi @edwardshark,
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?