{"id":651,"date":"2017-09-20T13:00:30","date_gmt":"2017-09-20T12:00:30","guid":{"rendered":"http:\/\/chewett.co.uk\/blog\/?p=651"},"modified":"2017-09-18T22:05:31","modified_gmt":"2017-09-18T21:05:31","slug":"removing-ip-block-whm-cphulk","status":"publish","type":"post","link":"https:\/\/chewett.co.uk\/blog\/651\/removing-ip-block-whm-cphulk\/","title":{"rendered":"Removing IP Block from WHM cPHulk"},"content":{"rendered":"<p>If you are locked out of your website due to the cPHulk blocking your IP address there is an easy way to unblock yourself.<\/p>\n<p>This post describes how you can do this from your servers command line.<\/p>\n<p><!--more--><\/p>\n<h2>Getting ready to reset the block<\/h2>\n<p>This post uses a method to remove the IP block by using the command line. If you are blocked from accessing your server you will either need to get a new IP or use your hosts rescue console. \u00a0This will let you access the command line either way.<\/p>\n<p>To access your server from another IP address you can use public wifi, a friends house, or log in via another server. All of these will have a different public IP which shouldn&#8217;t be blocked. This will let you log into the server and reset your IP block.<\/p>\n<h2>What If I can&#8217;t get on the server<\/h2>\n<p>If you are unable to get onto the server and reset your block another option available is waiting. By default, the cPHulk blocks only last 24 hours so if waiting is an option you can wait.<\/p>\n<p>During this period it is recommended to try and not log onto the server again in case your block is extended.<\/p>\n<p>If after 24 hours of the last access time you still cannot access the server your ban you may want to consider contacting your hosting company. If they manage your server they may be able to help you reset the block or give further suggestions.<\/p>\n<h2>Resetting the cPHulk block<\/h2>\n<p>First you will need to check if you have definitely been blocked by cPHulk. This can be done by checking the iptables rules for the cPHulk\u00a0ruleset. This can be checked by running the following command.<\/p>\n<pre>iptables -L cphulk -n --line-numbers<\/pre>\n<p>This lists all the iptable\u00a0rules for the cPHulk ruleset. If there are a lot of addresses here you can filter it down to just the address you believe has been blocked by using grep. The first number on each line shows the rule number that each row belongs to. This number is important later if you want to delete the rule.<\/p>\n<pre>iptables -L cphulk -n --line-numbers | grep 192.168.0.1<\/pre>\n<p>Here I am looking to see if my IP address 192.168.0.1 is being blocked by cPHulk. If you see the IP you are looking for then this will confirm you are being blocked. This line will have the details of when the block will end.<\/p>\n<p>If you want to go ahead and remove the block immediately you can run the following command.<\/p>\n<pre>iptables -D cphulk &lt;line number&gt;<\/pre>\n<p>Above <code>&lt;line number&gt;<\/code>\u00a0needs to be replaced with the line number you obtained running the first command.<\/p>\n<p>As soon as the iptable rule has been deleted you should be able to access the server. If this doesn&#8217;t work then you may want to see if your IP address appears multiple times.<\/p>\n<p>Hopefully this has helped you unblock your IP address, if this doesn&#8217;t\u00a0work I suggest contact your hosting company or posting a comment below.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are locked out of your website due to the cPHulk blocking your IP address there is an easy way to unblock yourself. This post describes how you can do this from your servers command line.<\/p>\n","protected":false},"author":1,"featured_media":655,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5],"tags":[108,171,172,39,109],"class_list":["post-651","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-informational","tag-cpanel","tag-cphulk","tag-iptables","tag-linux","tag-web-host-management"],"wppr_data":{"cwp_meta_box_check":"No"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/09\/removing_ipblock_from_whm.jpg?fit=800%2C800&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p2toWX-av","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1481,"url":"https:\/\/chewett.co.uk\/blog\/1481\/blocking-a-user-or-ip-from-a-server-using-iptables\/","url_meta":{"origin":651,"position":0},"title":"Blocking a user or IP from a server using iptables","author":"Chewett","date":"August 29, 2018","format":false,"excerpt":"This post describes how you can block a user from your webserver using iptables. What blocking via iptables achieves If a user is being destructive on your server or you wish to ensure they are not able to access it you can block them using iptables. This allows you to\u2026","rel":"","context":"In &quot;Informational&quot;","block_context":{"text":"Informational","link":"https:\/\/chewett.co.uk\/blog\/category\/informational\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/08\/blocking_user_with_iptables.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/08\/blocking_user_with_iptables.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/08\/blocking_user_with_iptables.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/08\/blocking_user_with_iptables.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1713,"url":"https:\/\/chewett.co.uk\/blog\/1713\/running-two-mysql-databases-on-windows\/","url_meta":{"origin":651,"position":1},"title":"Running two MySQL databases on Windows","author":"Chewett","date":"November 10, 2018","format":false,"excerpt":"This post describes the process you need to follow to set up a second MySQL database on Windows. Preparation\u00a0for configuring a secondary database The base of this guide assumes that you have installed MySQL server for windows already and it is running as normally. It is assumed that the location\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/chewett.co.uk\/blog\/category\/software\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/11\/running_multiple_databases.fw_.png?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/11\/running_multiple_databases.fw_.png?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/11\/running_multiple_databases.fw_.png?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/11\/running_multiple_databases.fw_.png?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":831,"url":"https:\/\/chewett.co.uk\/blog\/831\/enabling-ssh-ubuntu-16-04\/","url_meta":{"origin":651,"position":2},"title":"Enabling SSH on Ubuntu 16.04","author":"Chewett","date":"November 8, 2017","format":false,"excerpt":"By default you are not able to SSH into an Ubuntu 16.04\u00a0 machine and this blog post describes the steps needed to install SSH server. Installing OpenSSH Server To enable logging in from another computer via SSH you need to install a SSH\u00a0server. To do this you\u00a0can run the following\u2026","rel":"","context":"In &quot;Informational&quot;","block_context":{"text":"Informational","link":"https:\/\/chewett.co.uk\/blog\/category\/informational\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/11\/enable_ssh_on_ubuntu.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/11\/enable_ssh_on_ubuntu.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/11\/enable_ssh_on_ubuntu.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/11\/enable_ssh_on_ubuntu.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2783,"url":"https:\/\/chewett.co.uk\/blog\/2783\/how-to-install-a-mysql-server-on-a-raspberry-pi\/","url_meta":{"origin":651,"position":3},"title":"How to install a MySQL Server on a Raspberry Pi","author":"Chewett","date":"January 30, 2021","format":false,"excerpt":"This blog post explains the steps you need to perform to install a MySQL server on a Raspberry Pi. Ensuring the Raspberry Pi is up to date Before installing any programs it is recommended to make sure your Raspberry Pi is up to date. This reduces the change of a\u2026","rel":"","context":"In &quot;Informational&quot;","block_context":{"text":"Informational","link":"https:\/\/chewett.co.uk\/blog\/category\/informational\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/01\/install_mysql_raspi_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/01\/install_mysql_raspi_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/01\/install_mysql_raspi_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/01\/install_mysql_raspi_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/01\/install_mysql_raspi_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":1321,"url":"https:\/\/chewett.co.uk\/blog\/1321\/how-to-install-the-official-mysql-community-server-on-fedora-28\/","url_meta":{"origin":651,"position":4},"title":"How to Install the official MySQL community server on Fedora 28","author":"Chewett","date":"July 25, 2018","format":false,"excerpt":"Today I talk about how you can install the official\u00a0MySQL community server on Fedora 28. Why you cant just use DNF to install mysql-server In the last couple versions of Fedora the default MySQL\u00a0distribution was changed to mariadb. While this is, for the most part, a drop in replacement this\u2026","rel":"","context":"In &quot;Informational&quot;","block_context":{"text":"Informational","link":"https:\/\/chewett.co.uk\/blog\/category\/informational\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/07\/installing_offical_mysql.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/07\/installing_offical_mysql.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/07\/installing_offical_mysql.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/07\/installing_offical_mysql.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":103,"url":"https:\/\/chewett.co.uk\/blog\/103\/irc-client-on-raspberry-pi-screen-and-irssi\/","url_meta":{"origin":651,"position":5},"title":"IRC client on Raspberry Pi &#8211; Screen and irssi","author":"Chewett","date":"February 20, 2013","format":false,"excerpt":"A IRC client lets you connect to\u00a0a IRC server enabling you to join chatrooms on that server. IRC servers do not by default store logs while you are not logged in. This can be annoying if you wish to keep informed of whats going in on the chatroom. One solution\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/chewett.co.uk\/blog\/category\/software\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/651","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=651"}],"version-history":[{"count":4,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/651\/revisions"}],"predecessor-version":[{"id":656,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/651\/revisions\/656"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media\/655"}],"wp:attachment":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}