To run specialized software on the server, you need to open a port, how do I do this?
If you are using CentOS 6 or Debian OS, type the following commands in the console:
iptables -I INPUT -p tcp --dport XX -m state --state NEW -j ACCEPT
service iptables save
service iptables restart
If you are using CentOS 7, then use the following commands:
sudo firewall-cmd --zone=public --add-port=XX/tcp --permanent
sudo firewall-cmd --reload
If you are using Ubuntu, then use the following commands:
sudo iptables -A INPUT -p tcp --dport XX -j ACCEPT
sudo iptables-save
sudo iptables restart
For Ubuntu 20.04, the command will look like this:
ufw allow XX/tcp
Instead of XX, specify the port you need.