Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to open the port under CentOS system

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces you how to open the port under the CentOS system, the content is very detailed, interested friends can refer to, hope to be helpful to you.

We will encounter a lot of problems in the use of CentOS system. For example, when the CentOS system is installed, only port 22 is opened by default. If you want to open other ports, you need to open the required ports. For example, if you open the default port 80 of http, how should you open it? Next, we will introduce a method to you, I hope you have a good experience.

First, we need to edit the iptables Java code in the CentOS system

Vi / etc/sysconfig/iptables

Vi / etc/sysconfig/iptables

Then add the Java code to the CentOS system

-A RH-Firewall-1-INPUT-m state-- state NEW-m tcp-p tcp-- dport 3001-j ACCEPT

-A RH-Firewall-1-INPUT-m state-- state NEW-m tcp-p tcp-- dport 3001-j ACCEPT

* the CentOS system needs to restart the service Java code

/ sbin/service iptables restart

/ sbin/service iptables restart

Check to see if the port opens the Java code

/ sbin/iptables-L-n

In this way, we can open the port under the CentOS system. I hope you all get something.

About how to open the port under the CentOS system to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report