Current location - Quotes Website - Team slogan - How to solve the port when the port number is occupied in linux
How to solve the port when the port number is occupied in linux
How to disable ports in linux system?

1, the port generally corresponds to the corresponding network service program. To disable a port, you can first check the service corresponding to the port. Then shut down the service. netstat-antup

2. You can also disable it through iptables. Take port 8080 as an example, and execute the following commands: iptables-ainput-ptcp-dport8080-jdropiptables-ainput-ptcp-sport8080-jdropiptables-ainput-pudp-dport8080-jdropiptables-ainput.

How to open a port under linux?

Take port 3306 of mysql as an example.

1, directly open the port: iptables-i input -ptcp-dport 3306-j accept.

2. Open a port permanently. First, open the firewall configuration file with vim: vim/etc/sysconfig/iptables. Then, add the following contents to the iptables file:-arh-firewall-1-input-mstate-state new-mtcp-ptcp-dport3306-jaccept. Finally, save the configuration.

Linux can run multiple processes on a single port. For example, if I open two browsers at the same time, how many ports does it belong to?

Many processes can run on each port, and each process can call the same port, but when one process occupies the port, other processes will wait until the previous process releases the port before being called by the next process.

How to use port 0 reserved for linux?

Functions of different communication ports: Port: 0 Service: Reserved Description: Usually used to analyze the operating system.

This method works because "0" is an invalid port in some systems. When you try to connect it to a port that is usually closed, it will produce different results. What instructions does linux use to create local ports and IP?

Linux system uses command netconfig to create local port and IP address.