Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to Enable firewall for apache2 in Linux?

While i’m trying to enable firewall for Apache2 in Linux Operting system using following command sudo ufw allow in "Apache" After I checked whether the firewall in enable or not using the command sudo ufw status But it still in inactive and How can I enable . I’m facing like this.

I want to enable firewall and the status as active like Firewall is active and enabled on system startup

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Enable ufw:

sudo ufw enable

By default, ufw provides pre-configured application profiles, including one for Apache. You can enable the Apache profile to allow HTTP and HTTPS traffic:

sudo ufw allow ‘Apache’

ufw should automatically start on system boot by default. However, if you want to ensure it starts on system startup, you can use the following command:

sudo systemctl enable ufw

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading