How to open firewall port in linux

In this article let’s discuss about How to open firewall port in linux. Let’s go through the following methods without any delay.

Method 1:

Debian: 

sudo ufw allow PORT. 

CentOS: 

sudo firewall-cmd --zone=public --permanent --add-port=PORT/tcp 
sudo firewall-cmd --reload

Hope the above solution works.

Realted Posts : Bash how to generate md5 checksums on all files in a directory