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

What is the specific method for Linux to open designated ports?

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

Share

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

This article mainly analyzes the relevant knowledge of what is the specific method of Linux open designated port, the content is detailed and easy to understand, the operation details are reasonable, and has a certain reference value. If you are interested, you might as well follow the editor to have a look, and follow the editor to learn more about "what is the specific method of opening designated ports in Linux".

Linux system is famous for its security. By default, there are only 22, 80 and other ports open by default, so we need to manually open the ports we need to use. Let's share the specific methods of opening designated ports for Linux.

Method one

CentOS:

1. Open firewall systemctl start firewalld 2 and open designated port firewall-cmd-- zone=public-- add-port=1935/tcp-- permanent command meaning:-- zone # scope-- add-port=1935/tcp # add port, format: Port / communication protocol-- permanent # takes effect permanently Fails after restart without this parameter 3, restart firewall firewall-cmd-reload 4, view port number netstat-ntlp / / view all current tcp ports netstat-ntulp | grep 1935 / / View all port usage mode 2 # Open port: 8080

/ sbin/iptables-I INPUT-p tcp-dport 8080-j ACCEPT

Mode 3-An INPUT-m state-state NEW-m tcp-p tcp-dport 8080-j ACCEPT

Service iptables restart

About "what is the specific method of Linux opening designated port" is introduced here, more related content can search previous articles, hope to help you answer questions, please support the website!

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

Development

Wechat

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

12
Report