Report this

What is the reason for this report?

Whitelist IP's from cms to iptables or any firewall

Posted on May 17, 2016

I have members that only should have access to a server and i want to auth by IP. So i need to write from a webinterface to my firewall /iptables.

Is there an easy way to write to the firewall? (Running ubuntu)

  • Thanks


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.

Youtube tutorial of how to whitelist IP address with Digital Ocean’s firewall: https://snipp.ly/l/OjLdg

Hi @gr44bli,

There are a few options for you to be able to do what you’re asking. The first option is of course as you’ve listed, to use an iptables configuration to limit who can connect to your server on port 80. Here’re two tutorials we have on the subject:

An alternative would be to setup permissions within your apache configuration using a .htaccess file. You can see how to do this in one of our other tutorials:

Let us know how it goes, and if you have any further questions!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.