Recently, we came across a
CentOS 7 that was executing
MySQL) server. The Database Administrators needed a way to open to the port and allow connections to the SQL server from outside the machine.
As they did not have a specific
IP from which they would connect, we provided the following solution.
To temporarily open port 3306
To close the port 3306 (method A)
firewalld which will cause it to loose all changes that are not permanent (method B)
firewalld(Dynamic Firewall Manager) tool provides a dynamically managed firewall. The tool enables network/firewall zones to define the trust level of network connections and/or interfaces. It has support both for
IPv6firewall settings. Also, it supports Ethernet bridges and allow you to separate between runtime and permanent configuration options. Finally, it supports an interface for services or applications to add firewall rules directly.