By rosscoundon
I have a DO load balancer in front of two droplets. I want to be able to restrict traffic using ufw on the droplets to only allow traffic from the load balancer. My app listens for HTTP on port 8001 so I’ve tried using the following: sudo ufw allow from <publicIpOfLB> to any port 8001
Where <publicIpOfLB> is the public IP address shown on the load balancer config page
However, I assume the load balancer traffic isn’t seen to be coming from the public IP address and so this rule doesn’t allow the traffic through but I can’t see any other address to use. Any ideas how to achieve this?
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!
Hello friend!
In this case you might actually block the port on the public IP and that should be the shortest path to solve it. The LB does bring traffic in through a private interface.
Kind Regards, Jarland
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.