How to open ephemeral ports in linux


In the Linux operating system, you can use the firewall-cmd command line tool to temporarily open the specified port for other server access

This tutorial will teach you How to open ephemeral ports in linux

Command Line

Open port 3307

firewall-cmd --zone=public --add-port=3307/tcp

Parameter Description

--zoneUse this zone to set or query options, else default zone Usable for options marked with.
--add-portAdd the port.

operation result


Important reminder

Open ports will be automatically closed after restart


If you have any questions in use, you can leave a message below, or submit issuse on github ♥