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
>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