{"id":767,"date":"2020-06-04T14:49:10","date_gmt":"2020-06-04T06:49:10","guid":{"rendered":"https:\/\/www.wesbytes.com\/guide\/?post_type=kb&#038;p=767"},"modified":"2026-01-07T17:27:42","modified_gmt":"2026-01-07T09:27:42","slug":"tips-whm-cpanel-whm-access-restriction-for-certain-ip","status":"publish","type":"kb","link":"https:\/\/www.servergigabit.com\/guide\/kb\/tips-whm-cpanel-whm-access-restriction-for-certain-ip","title":{"rendered":"Tips WHM\/Cpanel: WHM Access Restriction for Certain IP"},"content":{"rendered":"<h4>Tips WHM\/Cpanel: WHM Access Restriction for Certain IP<\/h4>\n<p>One of the common problems while managing WHM\/CPanel based hosting is blacklist access into WHM\/CPanel due to CPHulk plugins. CPHulk activated by default on WHM (if you choose Yes while initial setup) and serves as a blacklisted software just like Fail2ban or Denyhost to prevent logon services from spammers\/crackers.<\/p>\n<p>The problem is that CPHulk can\u2019t often decide which access is normal and which aren\u2019t. Consequently, due to so many failures, even our valid IP could be blacklisted or could not be logged in as root. Why? Because cracker will try to select a random password, and after a few logins attempt CPHulk will automatically reject root login.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/blog.macally.com\/wp-content\/uploads\/2023\/03\/Untitled-design-2023-03-31T205854.909.png\" alt=\"WHM\/Cpanel\" width=\"487\" height=\"274\" \/><\/p>\n<div class=\"mkb-anchor mkb-clearfix mkb-back-to-top-inline\">\n<h6 class=\"mkb-anchor__title\">In addition to closing the recommended port, there is also the easiest way to anticipate this kind of problem, by doing WHM access limit\/WHM login page access protection.<\/h6>\n<p><a class=\"mkb-back-to-top\" title=\"To top\" href=\"https:\/\/www.mondoze.com\/guide\/kb\/tips-whm-cpanel-whm-access-restriction-for-certain-ip\/#\" target=\"_blank\" rel=\"noopener\">To top<i class=\"mkb-back-to-top-icon fa fa-long-arrow-up\"><\/i><\/a><\/p>\n<\/div>\n<p>To do so, run the following procedure :<\/p>\n<p>1. Login to WHM login page, enter your user name and password.<br \/>\n2. In the\u00a0<strong>Security Center<\/strong>\u00a0group menu, click<strong>\u00a0Host Access Control<\/strong>\u00a0menu.<br \/>\n3. On the\u00a0<strong>Daemon<\/strong>, select\u00a0<strong>Whostmgrd<\/strong>\u00a0daemon. It is a daemon application for WHM. We can also choose to protect SSH (<strong>SSHD<\/strong>) daemon or\u00a0<strong>CPaneld<\/strong>\u00a0daemon for CPanel.<br \/>\n4. In the\u00a0<strong>Access List<\/strong>, enter the IP or IP range that allows accessing. Write down the full subnet, for example, to network segment\u00a0<strong>122.201.98.70\/29<\/strong>\u00a0means to enter the IP\u00a0<strong>122.201.98.64\/255.255.255.248<\/strong>. Configure it as\u00a0<strong>122.201.98.64\/29<\/strong>\u00a0will not work because WHM will only accept full network subnet. If you asked, why using 122.201.98.<strong>64<\/strong>\/255.255.255.248 and not 122.201.98.<strong>70<\/strong>\/255.255.255.248 instead, then you should take the IP subnet course.<br \/>\n5. In the\u00a0<strong>Action<\/strong>\u00a0section select \u201c<strong>Allow<\/strong>\u201d.<br \/>\n6. Do the same thing to another IP segment which will be allowed.<br \/>\n7. At the bottom, Select\u00a0<strong>Daemon<\/strong>\u00a0=\u00a0<strong>Whostmgrd<\/strong>,\u00a0<strong>Access List<\/strong>\u00a0=\u00a0<strong>ALL<\/strong>\u00a0and\u00a0<strong>Action<\/strong>\u00a0=\u00a0<strong>Deny<\/strong>. Means that other than registered IP will not be allowed.<br \/>\n8. When finished, click the \u201c<strong>Save Host Access List<\/strong>\u201d.<br \/>\n9. Perform WHM access from the allowed IP and from outside registered IP list.<\/p>\n<p>For those who are accustomed to dealing with <a href=\"https:\/\/www.servergigabit.com\/linux-vps-hosting\/\">Linux servers<\/a>, the above process basically does limit access by adding a rule in the file \/etc\/hosts.allow<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tips WHM\/Cpanel: WHM Access Restriction for Certain IP One of the common problems while managing WHM\/CPanel based hosting is blacklist access into WHM\/CPanel due to CPHulk plugins. CPHulk activated by default on WHM (if you choose Yes while initial setup) and serves as a blacklisted software just like Fail2ban or Denyhost to prevent logon services from spammers\/crackers. The problem is&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"kbtopic":[32],"kbtag":[1604],"class_list":["post-767","kb","type-kb","status-publish","hentry","kbtopic-whm","kbtag-whm-cpanel"],"_links":{"self":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/767","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=767"}],"version-history":[{"count":3,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/767\/revisions"}],"predecessor-version":[{"id":5236,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/767\/revisions\/5236"}],"wp:attachment":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/media?parent=767"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=767"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kbtag?post=767"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}