{"id":16690,"date":"2024-05-21T12:36:11","date_gmt":"2024-05-21T12:36:11","guid":{"rendered":"https:\/\/hostvento.com\/kb\/web-hosting\/how-to-open-a-port-in-csf-firewall-via-whm-cpanel\/"},"modified":"2024-06-17T03:19:23","modified_gmt":"2024-06-17T03:19:23","slug":"how-to-open-a-port-in-csf-firewall-via-whm-cpanel","status":"publish","type":"docs","link":"https:\/\/www.hostvento.com\/kb\/docs\/hosting-faqs\/how-to-open-a-port-in-csf-firewall-via-whm-cpanel\/","title":{"rendered":"How to Open a Port in CSF Firewall via WHM\/cPanel?"},"content":{"rendered":"\n<p>IP addresses and Internet Protocols with the origination or destination address initiate communication sessions across ports. Ports are identified by a 16-digit number and are a component of the client-server architecture. It goes without saying that in order to open a port, the CSF firewall must be configured with the server&#8217;s security in mind.<\/p>\n\n\n\n<p>WHM allows you to change the CSF firewall&#8217;s port settings if you are a user with a cPanel server. Please see How to Install CSF Firewall via WHM\/cPanel? if you would want to install and further customize the CSF firewall.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">To Open a Port in CSF Firewall<\/h2>\n\n\n\n<p>1. Log into WHM with your root account.<\/p>\n\n\n\n<p>2. Select the&nbsp;<strong>Plugins<\/strong>&nbsp;option from the navigation menu.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2019\/10\/whm_plugins.png\" alt=\"\" class=\"wp-image-12290\"\/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2021\/08\/whm_configserver_security_firewall.png\" alt=\"\" class=\"wp-image-12536\"\/><\/figure>\n<\/div>\n\n\n<p>3. Click on&nbsp;<strong>ConfigServer Security &amp; Firewall<\/strong>.<\/p>\n\n\n\n<p>The ConfigServer Security &amp; Firewall&nbsp;panel will appear.<\/p>\n\n\n\n<p>4. Go to the&nbsp;<strong>csf<\/strong>&nbsp;tab and click on the&nbsp;<strong>Firewall Configuration<\/strong>&nbsp;button in the&nbsp;<strong>csf-ConfigServer Firewall<\/strong>&nbsp;section.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2021\/08\/whm_configserverwhm_configserver_security_firewall_csf-min.png\" alt=\"\" class=\"wp-image-12539\"\/><\/figure>\n<\/div>\n\n\n<p>Various customization options for the firewall will appear.<\/p>\n\n\n\n<p>5. Select the&nbsp;<strong>IPV4 port Settings<\/strong>&nbsp;section from the dropdown list.<\/p>\n\n\n\n<p>6. Copy\/enter the following port numbers in the&nbsp;<strong>Allow incoming TCP ports<\/strong>&nbsp;and&nbsp;<strong>Allow outgoing TCP ports<\/strong>&nbsp;fields.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Allow incoming TCP ports:\n\n20,21,22,25,53,80,110,143,443,465,587,993,995,2077,2078,2082,2083,2086,2087,2095,2096,26<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">Allow outgoing TCP ports:\n\n20,21,22,25,37,43,53,80,110,113,443,587,873,2086,2087,2089,2703<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2021\/09\/whm_csfirewall_ipv4settings_ports.png\" alt=\"\" class=\"wp-image-13097\"\/><\/figure>\n<\/div>\n\n\n<p>Although we recommend these port numbers, you can enter other port numbers as per the requirement.<\/p>\n\n\n\n<p>7. Click the&nbsp;<strong>Change<\/strong>&nbsp;button at the end.<\/p>\n\n\n\n<p>It will save the changes you made to the firewall configuration.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2021\/08\/whm_restart_csf_ifd.png\" alt=\"\" class=\"wp-image-12555\"\/><\/figure>\n<\/div>\n\n\n<p>8. Click on\u00a0<strong>Restart csf+lfd<\/strong>.\u00a0It will restart the csf firewall and apply the changes.<\/p>\n\n\n\n<p><a href=\"https:\/\/hostvento.com\/kb\/web-hosting\/how-to-open-a-port-in-csf-firewall-via-whm-cpanel\/\" target=\"_blank\" rel=\"noopener\"><strong><span style=\"text-decoration: underline;\">How to Open a Port in CSF Firewall via WHM\/cPanel?<\/span><\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>IP addresses and Internet Protocols with the origination or destination address initiate communication sessions across ports. Ports are identified by a 16-digit number and are a component of the client-server architecture. It goes without saying that in order to open a port, the CSF firewall must be configured with the server&#8217;s security in mind. WHM [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":23377,"menu_order":388,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-16690","docs","type-docs","status-publish","hentry","no-post-thumbnail"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/16690","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/comments?post=16690"}],"version-history":[{"count":2,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/16690\/revisions"}],"predecessor-version":[{"id":21238,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/16690\/revisions\/21238"}],"up":[{"embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/23377"}],"wp:attachment":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/media?parent=16690"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/doc_tag?post=16690"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}