Tutorial - How to open port in CentOS | RedHat 7 / 8 and failed to start firewalld service unit is masked | Vevioz Community

Tutorial How to open port in CentOS | RedHat 7 / 8 and failed to start firewalld service unit is masked

DevOps

Linux Systems Engineer
Joined
Oct 18, 2019
Messages
168
Reaction score
14
Points
18
Location
Indonesia
Website
addons.vevioz.com
Offline

Mask link is broken​

One of the common reasons for the error is when starting the service the masked link is broken. Thus we need to link the mask location once again to resolve the error.

But before you should install firewalld. You can use yum for that:
Code:
sudo yum install firewalld

To unmask the service we use the command.
Code:
systemctl unmask firewalld

To add port
Code:
firewall-cmd  --permanent --add-port=449/udp

To remove port
Code:
firewall-cmd  --permanent --remove-port=449/tcp

To add multiple ports at once
Code:
firewall-cmd  --permanent --add-port={80,110,3306}/tcp

Start firewalld
Code:
sudo systemctl start firewalld
sudo systemctl enable firewalld

Firewalld status
Code:
systemctl status firewalld.service

Mask again firewalld
Code:
systemctl mask --now firewalld

WDR path
Code:
cd /home/megatron/public_html/nodejs

Start app
Code:
forever start ./main.js
 
Top Bottom