Questions and Answers — VDSina

How do I open a specific port?

To run specialized software on the server, you need to open a port, how do I do this?

30.11.2017 16:50 Employee Михаил Озорович Updated 21.12.2017 18:14 no comments yet
30.11.2017 16:50
Answers to the question — 1
Employee Михаил Озорович

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.

Updated 11.05.2022 15:15 30.11.2017 16:58

To answer you need to register or log in.
Close the window
Authentication
2FA verification
Close the window
Sign up
A password will be sent to the specified email address
Close the window
Password Reminder
Close the window
Password Reminder
Close the window
Password Reminder
Exit