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

The Linux system looks at what are the open port commands

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

Share

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

This article "Linux system View Open Port commands which" in addition to programmers most people do not quite understand, today Xiaobian in order to make you better understand the "Linux system View Open Port commands what", to sum up the following content, with a certain reference value, detailed steps clear, details handled properly, I hope you can get something through this article, let's take a look at the specific content.

Check to see if the port is accessible: telnet ip port number (such as native 35465:telnet localhost 35465)

Open ports are located in / etc/sysconfig/iptables

View through the more / etc/sysconfig/iptables command when viewing

Or through iptables-nL

If you want to open the port (e. G. 8889)

(1) enter the editor through vi / etc/sysconfig/iptables and add-An INPUT-p tcp-m tcp-dport 8889-j ACCEPT

(2) restart the iptables service by executing the / etc/init.d/iptables restart command

# (3) Save / etc/rc.d/init.d/iptables save

Note: if you do not want to modify the iptables table, you can enter the following command directly:

# iptables-I INPUT-p tcp-dport 8889-j ACCEPT

If / etc/sysconfig/iptables does not exist

Reason: in newly installed linux systems, firewalls are disabled by default, there are generally no firewall policies configured, and / etc/sysconfig/iptables files do not exist.

Resolve:

Use the iptables command to write any firewall rule in the console, such as: iptables-P OUTPUT ACCEPT

Save with service iptables save, which is saved to the iptables file in the / etc/sysconfig directory by default

What are the versions of Linux? the versions of Linux are Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu and so on. Among them, Deepin is one of the best-developed Linux distributions in China; UbuntuKylin is a derivative release based on Ubuntu; Manjaro is a Linux release based on Arch; LinuxMint's default Cinnamon desktop is similar to Windows XP's easy-to-use; Ubuntu is the Linux operating system based on desktop applications.

Thank you for your reading. I hope you have a certain understanding of the key question of "what are the open port commands in the Linux system?" the specific usage needs to be understood by everyone through hands-on experiments. Try it quickly. If you want to read more articles about related knowledge points, welcome to follow the industry information channel!

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