Whitelist IP's from cms to iptables or any firewall

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

Submit an answer

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!

Sign In or Sign Up to Answer

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:

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!