Currently looking for the best way to limit network access via ip to angular frontend using kubernetes nginx-ingress for ip addresses outside of the USA. I can see firewalls created with no rules for public access, but it seems like I have limited options for including logic to filter based on region. It would be painful to maintain a whitelist for obvious reasons from this view.
I am also aware of MaxMind’s GeoIP2 and using lua logic on the ingress, but I would prefer to use an easier option and was hoping DigitalOcean has something implemented for this use case that I am not seeing yet.
Thanks for the ideas/help!
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.
Hello there,
You can also use a third-party providers like CloudFlare that have Firewall features where you can block access from certain IP addresses or whole country IP ranges. They also regularly update their IP lists which means you’re likely to bypass some requests coming from proxies.
Just enter an IP address, an IP range, or a two-letter country code you wish to block
https://serverpilot.io/docs/how-to-block-ips-with-cloudflare/
Hope that helps!