{"id":31011,"date":"2021-02-05T11:19:49","date_gmt":"2021-02-05T03:19:49","guid":{"rendered":"https:\/\/web.mwwsb.com.my\/pjci\/?post_type=kb&p=31011"},"modified":"2022-09-08T21:35:18","modified_gmt":"2022-09-08T13:35:18","slug":"tips-whm-cpanel-whm-access-restriction-for-certain-ip","status":"publish","type":"kb","link":"https:\/\/www.casbay.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":"\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t

Tips WHM\/Cpanel: WHM Access Restriction for Certain IP<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

One of the common problems while managing WHM\/CPanel based hosting is blacklist access<\/strong> into WHM\/CPanel due to CPHulk<\/strong> 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<\/strong> from spammers\/crackers.<\/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>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t

Modify WHM Access Limit<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

In addition to closing the recommended port, there is easier way to anticipate this kind of problem, by modifying the WHM access limit\/WHM login page access protection.

To do so, run the following procedure :<\/p>

  1. Firstly, login to WHM login page<\/strong>, enter your user name and password.

    <\/li>
  2. In the Security Center<\/strong>\u00a0group menu, click\u00a0Host Access Control<\/strong>\u00a0menu.

    <\/li>
  3. On the Daemon<\/strong>, select\u00a0Whostmgrd<\/strong>\u00a0daemon. It is a daemon application for WHM. We can also choose to protect SSH (SSHD<\/strong>) daemon or\u00a0CPaneld<\/strong>\u00a0daemon for CPanel.

    <\/li>
  4. In the Access List<\/strong>, enter the IP or IP range that allows accessing. Write down the full subnet.

    For example, to network segment 122.201.98.70\/29<\/strong>\u00a0means to enter the IP\u00a0122.201.98.64\/255.255.255.248<\/strong>. Configure it as\u00a0122.201.98.64\/29<\/strong>\u00a0will not work because WHM will only accept full network subnet. If you asked, why using 122.201.98.64<\/strong>\/255.255.255.248 and not 122.201.98.70<\/strong>\/255.255.255.248 instead, then you should take the IP subnet course.

    <\/li>
  5. In the Action<\/strong>\u00a0section select \u201cAllow<\/strong>\u201d.

    <\/li>
  6. Then, do the same thing to another IP segment which will be allowed.

    <\/li>
  7. At the bottom, Select Daemon<\/strong>\u00a0=\u00a0Whostmgrd<\/strong>,\u00a0Access List<\/strong>\u00a0=\u00a0ALL<\/strong>\u00a0and\u00a0Action<\/strong>\u00a0=\u00a0Deny<\/strong>. Means that other than registered IP will not be allowed.

    <\/li>
  8. Lastly, click the \u201cSave Host Access List<\/strong>\u201d when finished.

    <\/li>
  9. Now you can perform WHM access from the allowed IP and from outside registered IP list.<\/li><\/ol>

    For those who are accustomed to dealing with Linux servers, the above process basically does limit access by adding a rule in the file \/etc\/hosts.allow<\/em><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t\t\t\t\t

    We hope this article helped you to learn about WHM Access Restriction. For more articles, kindly visit our Knowledge Base<\/a>.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"

    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 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"no-sidebar","site-content-layout":"page-builder","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}}},"kbtopic":[117],"kbtag":[106],"mkb_version":[],"_links":{"self":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/31011"}],"collection":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/comments?post=31011"}],"version-history":[{"count":1,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/31011\/revisions"}],"predecessor-version":[{"id":31839,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/31011\/revisions\/31839"}],"wp:attachment":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/media?parent=31011"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=31011"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtag?post=31011"},{"taxonomy":"mkb_version","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/mkb_version?post=31011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}