ConfigServer Security & Firewall allow port to specific ip

Login to WHM and navigate to the "ConfigServer Security & Firewall" page.

On this page, press the “Firewall Allow IPs” button. 

  • From this we can see that the format we will be using is tcp/udp|in/out|s/d=port|s/d=ip
  • Create your desired rule. For example, if we want to create a rule to allow inbound MySQL connections from IP 192.168.1.1 it would look like this
  tcp|in|d=3306|s=192.168.1.1
  • Lets look at what we’ve defined above:
    • tcp defines the protocol we’re using. MySQL uses TCP sockets.
    • in defines that this rule pertains to inbound traffic or traffic coming into your system from an external one.
    • d=3306 is the port number which MySQL uses by default.
    • s=192.168.1.1 is the IP address we want to allow into our system on the port and protocol specified above.

IP ranges in CIDR format are accepted. Port ranges are not accepted and you must have one rule per line per port per protocol.

  • To apply this rule, on the next page click “Restart csf+lfd”.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Run OPTIMIZE TABLE to defragment tables for better performance

For this suggestion:Run OPTIMIZE TABLE to defragment tables for better performanceRun this...

How to clear Error Log of a cPanel Account.

User the below code to clear Error Log:Replace User with Username:Code:for i in `find...

What is php.ini ?

The php.ini file and changing PHP Settings The php.ini file is a special file for PHP and...

How to fix ini_set() has been disabled for security reasons

1. Create php.ini file inside your public_html folder, OR the folder in which you have...

How to fix Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone:

1: Create .htaccess file inside your public_html folder, OR the folder in which you have...