{"id":13230,"date":"2020-05-04T12:50:28","date_gmt":"2020-05-04T04:50:28","guid":{"rendered":"https:\/\/www.mondoze.com\/guide\/?post_type=kb&#038;p=6394"},"modified":"2022-10-08T18:50:36","modified_gmt":"2022-10-08T10:50:36","slug":"tips-whm-cpanel-whm-access-restriction-for-certain-ip","status":"publish","type":"kb","link":"https:\/\/www.mondoze.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<div data-elementor-type=\"wp-post\" data-elementor-id=\"13230\" class=\"elementor elementor-13230\" data-elementor-settings=\"[]\">\n\t\t\t\t\t\t<div class=\"elementor-inner\">\n\t\t\t\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-7b768520 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7b768520\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-19ea289c\" data-id=\"19ea289c\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b35143f elementor-widget elementor-widget-heading\" data-id=\"b35143f\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Tips WHM\/cPanel: WHM Access Restriction for Certain IP<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-55328371 elementor-widget elementor-widget-text-editor\" data-id=\"55328371\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<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><p>The problem is that CPHulk can&#8217;t often decide which access is normal and which aren&#8217;t. 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<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8064ba8 elementor-widget elementor-widget-image\" data-id=\"8064ba8\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-image\">\n\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" loading=\"lazy\" width=\"300\" height=\"225\" src=\"https:\/\/www.mondoze.com\/guide\/wp-content\/uploads\/2021\/03\/Lock-on-Keyboard-300x225-1.jpg\" class=\"attachment-large size-large\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1ca7846 elementor-widget elementor-widget-text-editor\" data-id=\"1ca7846\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<h6>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><p>To do so, run the following procedure :<\/p><p>1. Login to WHM login page, enter your user name and password.<br \/>2. In the <strong>Security Center<\/strong> group menu, click<strong> Host Access Control<\/strong> menu.<br \/>3. On the <strong>Daemon<\/strong>, select <strong>Whostmgrd<\/strong> daemon. It is a daemon application for WHM. We can also choose to protect SSH (<strong>SSHD<\/strong>) daemon or <strong>CPaneld<\/strong> daemon for CPanel.<br \/>4. In the <strong>Access List<\/strong>, enter the IP or IP range that allows accessing. Write down the full subnet, for example, to network segment <strong>122.201.98.70\/29<\/strong> means to enter the IP <strong>122.201.98.64\/255.255.255.248<\/strong>. Configure it as <strong>122.201.98.64\/29<\/strong> will 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 \/>5. In the <strong>Action<\/strong> section select \u201c<strong>Allow<\/strong>\u201d.<br \/>6. Do the same thing to another IP segment which will be allowed.<br \/>7. At the bottom, Select <strong>Daemon<\/strong> = <strong>Whostmgrd<\/strong>, <strong>Access List<\/strong> = <strong>ALL<\/strong> and <strong>Action<\/strong> = <strong>Deny<\/strong>. Means that other than registered IP will not be allowed.<br \/>8. When finished, click the \u201c<strong>Save Host Access List<\/strong>\u201d.<br \/>9. Perform WHM access from the allowed IP and from outside registered IP list.<\/p><p>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.<\/p>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t","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 &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.mondoze.com\/guide\/kb\/tips-whm-cpanel-whm-access-restriction-for-certain-ip\"> <span class=\"screen-reader-text\">Tips WHM\/Cpanel: WHM Access Restriction for Certain IP<\/span> Read More \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"default","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":"","ast-breadcrumbs-content":"","ast-featured-img":"","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":"","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":[44],"kbtag":[110],"mkb_version":[],"_links":{"self":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/13230"}],"collection":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/comments?post=13230"}],"version-history":[{"count":8,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/13230\/revisions"}],"predecessor-version":[{"id":21464,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/13230\/revisions\/21464"}],"wp:attachment":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/media?parent=13230"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=13230"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kbtag?post=13230"},{"taxonomy":"mkb_version","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/mkb_version?post=13230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}