In CentOS system usage, we will encounter many problems. For example, if the CentOS system is installed, only port 22 is enabled by default. if you want to open other ports, you need to open the required ports. For example, how do I enable http's default port 80? Next, we will introduce a method for you and hope you will have a good experience. First, we need to use the CentOS system, and we will encounter many problems. For example, if the CentOS system is installed, only port 22 is enabled by default. if you want to open other ports, you need to open the required ports. For example, how do I enable http's default port 80? Next, we will introduce a method for you and hope you will have a good experience.
Then add
-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport3001-j ACCEPT
-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport3001-j ACCEPT
Finally, the CentOS system needs to restart the service.
/Sbin/service iptables restart
/Sbin/service iptables restart
Check whether the port is open
/Sbin/iptables-L-n
In this way, we can open the port under the CentOS system. I hope you will have some gains.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.