Browse - Computer Tips - How can I open an arbitrary port using the command line?

Date: 2016mar23
OS: RedHat/Fedora/CentOS
Keywords: iptables

Q.  How can I open an arbitrary port using the command line?

A.  For example to open TCP port 5000

firewall-cmd --list-ports Check first firewall-cmd --add-port=5000/tcp --permanent Let it thru firewall-cmd --reload Reboot firewall firewall-cmd --list-ports Check to make sure