{"id":1283,"date":"2020-06-05T00:25:33","date_gmt":"2020-06-04T16:25:33","guid":{"rendered":"https:\/\/www.wesbytes.com\/guide\/?post_type=kb&#038;p=1283"},"modified":"2026-01-12T11:59:13","modified_gmt":"2026-01-12T03:59:13","slug":"how-to-open-ports-in-whm-ssh-firewall","status":"publish","type":"kb","link":"https:\/\/www.servergigabit.com\/guide\/kb\/how-to-open-ports-in-whm-ssh-firewall","title":{"rendered":"How to open ports in WHM\/SSH firewall?"},"content":{"rendered":"<h5><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/www.crucial.com.au\/blog\/wp-content\/uploads\/2012\/06\/CSF.png\" alt=\"OPEN PORTS , Secure your Linux VPS using CSF Firewall\" width=\"492\" height=\"197\" \/><\/h5>\n<h5><strong>Open Ports in CSF Firewall through SSH<\/strong><\/h5>\n<ol>\n<li>Login to your<a href=\"https:\/\/www.servergigabit.com\/linux-vps-hosting\/\"> Linux Server<\/a> through <a href=\"https:\/\/www.cloudflare.com\/learning\/access-management\/what-is-ssh\/\" rel=\"nofollow noopener\" target=\"_blank\">SSH<\/a>. Open csf.conf file using any text editor.\/etc\/csf\/csf.conf<\/li>\n<li>Add the port you wish to open and restart CSF firewall for the changes to take into effect.# Allow incoming TCP ports<br \/>\nTCP_IN = \u201c20,443,465,21,22,587,993,25,53,80,110,143,995\u201d<br \/>\n# Allow outgoing TCP ports<br \/>\nTCP_OUT = \u201c20,21,443,587,22,25,80,110,43,53\u201d<\/li>\n<li>csf -r \u00a0\/\/ This is to restart CSF firewall<\/li>\n<\/ol>\n<h5><strong>Open Ports in CSF Firewall through WHM<\/strong><\/h5>\n<ol>\n<li>Login to\u00a0<em><strong>WHM<\/strong><\/em>.<\/li>\n<li>Type\u00a0<strong>firewall<\/strong>\u00a0in Find bar and click on\u00a0<em><strong>ConfigServer Security&amp;Firewall<\/strong><\/em> link.<\/li>\n<li>\u00a0Click on the\u00a0<em><strong>Firewall Configuration<\/strong><\/em> button.<\/li>\n<li>Scroll down and locate\u00a0<em><strong>Allow incoming TCP ports<\/strong><\/em>\u00a0section. Enter the port you wish to open and click on the\u00a0<em><strong>Change<\/strong><\/em> button at the bottom to save your changes.<\/li>\n<li>Lastly, you will need to restart csf by clicking on\u00a0<em><strong>Restart csf+lfd<\/strong><\/em>\u00a0button.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Open Ports in CSF Firewall through SSH Login to your Linux Server through SSH. Open csf.conf file using any text editor.\/etc\/csf\/csf.conf Add the port you wish to open and restart CSF firewall for the changes to take into effect.# Allow incoming TCP ports TCP_IN = \u201c20,443,465,21,22,587,993,25,53,80,110,143,995\u201d # Allow outgoing TCP ports TCP_OUT = \u201c20,21,443,587,22,25,80,110,43,53\u201d csf -r \u00a0\/\/ This is to&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"kbtopic":[37],"kbtag":[1517,1272,1515],"class_list":["post-1283","kb","type-kb","status-publish","hentry","kbtopic-web-host-manager-whm","kbtag-open-ports","kbtag-ssh","kbtag-whm"],"_links":{"self":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/1283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/comments?post=1283"}],"version-history":[{"count":4,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/1283\/revisions"}],"predecessor-version":[{"id":5894,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/1283\/revisions\/5894"}],"wp:attachment":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/media?parent=1283"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=1283"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kbtag?post=1283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}