how to open specified port in linux
Introduction
In the Linux operating system, you can use the firewall-cmd
command line tool to open the specified port. After opening, other servers can connect to the port application specified by the device.
This tutorial will teach you how to delete all containers at once
Command Line
Open port 3306
firewall-cmd --zone=public --add-port=3306/tcp --permanent
Parameter Description
parameter | Introduction |
---|---|
--zone | Use this zone to set or query options, else default zone,Usable for options marked with |
--add-port | Add the port. |
--permanent | Set an option permanently. |
operation result
success
safety warning
If your service is on a public network, you should increase the security protection applied to the specified port after opening the specified port.
Notice
If you have any questions in use, you can leave a message below, or submit issuse on github ♥