{"id":9288,"date":"2022-04-14T04:28:11","date_gmt":"2022-04-14T04:28:11","guid":{"rendered":"https:\/\/cpanelplesk.com\/wp62\/?p=9288"},"modified":"2022-04-14T04:28:11","modified_gmt":"2022-04-14T04:28:11","slug":"how-to-check-if-ip-is-blocked-from-iptables","status":"publish","type":"post","link":"https:\/\/cpanelplesk.com\/wp62\/how-to-check-if-ip-is-blocked-from-iptables\/","title":{"rendered":"How to Check if IP is blocked from IPtables"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Iptables is an application that uses policy chains to allow or block traffic using the IP packet filter rules of the Linux kernel firewall. For example, to secure your server workloads, you can install this firewall on your Linux Dedicated or Virtual Server. If a user tries to connect to your server using SSH, iptables will try to match the IP address and port to a rule in the input chain.<\/span><\/p>\n<h3><b>Checking if IP is blocked<\/b><\/h3>\n<div class=\"command-sh\">\n<pre>iptables -L -n \u2013line | grep [IP Address]<\/pre>\n<\/div>\n<p>If IP appears as DROP or REJECT, the IP in the IPTable has been blocked<\/p>\n<p>Therefore, you would need to unblock the IP Address:<\/p>\n<div class=\"command-sh\">\n<pre>iptables -I INPUT -s [IP Address] -j ACCEPT<\/pre>\n<\/div>\n<p>And this is how to block back an IP Address:<\/p>\n<div class=\"command-sh\">\n<pre>iptables -A INPUT -d [IP Address] -j DROP<\/pre>\n<\/div>\n<div class=\"service-sh\">\n<pre>service iptables save<\/pre>\n<\/div>\n<h3><b>\u00a0Follow the instructions below to unblock an IP from the CSF using SSH<\/b><\/h3>\n<p><b>1st of 3 steps<\/b><\/p>\n<p><span style=\"font-weight: 400;\">To begin, run the following command to see if the IP has been banned by the CSF:<\/span><\/p>\n<div class=\"command-sh\">\n<pre>csf -g IP_address<\/pre>\n<\/div>\n<p><strong>NOTE:<\/strong> <em>IP_address is the specific IP you wish to check.<\/em><\/p>\n<p><b>Step 2 of 3<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Second, if you want to remove an IP address that has been denied, run the following command:<\/span><\/p>\n<div class=\"command-sh\">\n<pre>csf -dr IP_address<\/pre>\n<\/div>\n<p><strong>Step 3 of 3<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">Finally, in order for the changes to take effect, CSF must be restarted to finish the process:<\/span><\/p>\n<div class=\"command-sh\">\n<pre>csf -r<\/pre>\n<\/div>\n<p><strong>Note:<\/strong> <em>The full path of IPTABLES is \/sbin\/iptables, but you can use \/sbin\/iptables instead of command # iptables.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Iptables is an application that uses policy chains to allow or block traffic using the IP packet filter rules of the Linux kernel firewall. For example, to secure your server workloads, you can install this firewall on your Linux Dedicated or Virtual Server. If a user tries to connect to your server using SSH, iptables [&#8230;]<\/p>\n<p><a class=\"understrap-read-more-link\" href=\"https:\/\/cpanelplesk.com\/wp62\/how-to-check-if-ip-is-blocked-from-iptables\/\">Continue Reading&#8230;<\/a><\/p>\n","protected":false},"author":19,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,14],"tags":[],"class_list":["post-9288","post","type-post","status-publish","format-standard","hentry","category-general","category-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Check if IP is blocked from IPtables - cPanel Plesk<\/title>\n<meta name=\"description\" content=\"Iptables is an application that uses policy chains to allow or block traffic using the IP packet filter rules of the Linux kernel firewall. For example, to secure your server workloads, you can install this firewall on your Linux Dedicated or Virtual Server.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cpanelplesk.com\/wp62\/how-to-check-if-ip-is-blocked-from-iptables\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Check if IP is blocked from IPtables - cPanel Plesk\" \/>\n<meta name=\"twitter:description\" content=\"Iptables is an application that uses policy chains to allow or block traffic using the IP packet filter rules of the Linux kernel firewall. For example, to secure your server workloads, you can install this firewall on your Linux Dedicated or Virtual Server.\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"samama\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/how-to-check-if-ip-is-blocked-from-iptables\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/how-to-check-if-ip-is-blocked-from-iptables\/\"},\"author\":{\"name\":\"samama\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/b5c17eff2915a029433dfd2d5a6e8465\"},\"headline\":\"How to Check if IP is blocked from IPtables\",\"datePublished\":\"2022-04-14T04:28:11+00:00\",\"dateModified\":\"2022-04-14T04:28:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/how-to-check-if-ip-is-blocked-from-iptables\/\"},\"wordCount\":220,\"publisher\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\"},\"articleSection\":[\"General\",\"Linux\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/how-to-check-if-ip-is-blocked-from-iptables\/\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/how-to-check-if-ip-is-blocked-from-iptables\/\",\"name\":\"How to Check if IP is blocked from IPtables - cPanel Plesk\",\"isPartOf\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#website\"},\"datePublished\":\"2022-04-14T04:28:11+00:00\",\"dateModified\":\"2022-04-14T04:28:11+00:00\",\"description\":\"Iptables is an application that uses policy chains to allow or block traffic using the IP packet filter rules of the Linux kernel firewall. For example, to secure your server workloads, you can install this firewall on your Linux Dedicated or Virtual Server.\",\"breadcrumb\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/how-to-check-if-ip-is-blocked-from-iptables\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cpanelplesk.com\/wp62\/how-to-check-if-ip-is-blocked-from-iptables\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/how-to-check-if-ip-is-blocked-from-iptables\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cpanelplesk.com\/wp62\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Check if IP is blocked from IPtables\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#website\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/\",\"name\":\"cPanel Plesk\",\"description\":\"Blog on famous hosting control panels\",\"publisher\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cpanelplesk.com\/wp62\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\",\"name\":\"Farooq Omer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png\",\"contentUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png\",\"width\":300,\"height\":44,\"caption\":\"Farooq Omer\"},\"logo\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/b5c17eff2915a029433dfd2d5a6e8465\",\"name\":\"samama\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5ad71c1d187b45a3c1a68698160b5f6d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5ad71c1d187b45a3c1a68698160b5f6d?s=96&d=mm&r=g\",\"caption\":\"samama\"},\"url\":\"https:\/\/cpanelplesk.com\/wp62\/author\/samama\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Check if IP is blocked from IPtables - cPanel Plesk","description":"Iptables is an application that uses policy chains to allow or block traffic using the IP packet filter rules of the Linux kernel firewall. For example, to secure your server workloads, you can install this firewall on your Linux Dedicated or Virtual Server.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cpanelplesk.com\/wp62\/how-to-check-if-ip-is-blocked-from-iptables\/","twitter_card":"summary_large_image","twitter_title":"How to Check if IP is blocked from IPtables - cPanel Plesk","twitter_description":"Iptables is an application that uses policy chains to allow or block traffic using the IP packet filter rules of the Linux kernel firewall. For example, to secure your server workloads, you can install this firewall on your Linux Dedicated or Virtual Server.","twitter_misc":{"Written by":"samama","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/cpanelplesk.com\/wp62\/how-to-check-if-ip-is-blocked-from-iptables\/#article","isPartOf":{"@id":"https:\/\/cpanelplesk.com\/wp62\/how-to-check-if-ip-is-blocked-from-iptables\/"},"author":{"name":"samama","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/b5c17eff2915a029433dfd2d5a6e8465"},"headline":"How to Check if IP is blocked from IPtables","datePublished":"2022-04-14T04:28:11+00:00","dateModified":"2022-04-14T04:28:11+00:00","mainEntityOfPage":{"@id":"https:\/\/cpanelplesk.com\/wp62\/how-to-check-if-ip-is-blocked-from-iptables\/"},"wordCount":220,"publisher":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13"},"articleSection":["General","Linux"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/cpanelplesk.com\/wp62\/how-to-check-if-ip-is-blocked-from-iptables\/","url":"https:\/\/cpanelplesk.com\/wp62\/how-to-check-if-ip-is-blocked-from-iptables\/","name":"How to Check if IP is blocked from IPtables - cPanel Plesk","isPartOf":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#website"},"datePublished":"2022-04-14T04:28:11+00:00","dateModified":"2022-04-14T04:28:11+00:00","description":"Iptables is an application that uses policy chains to allow or block traffic using the IP packet filter rules of the Linux kernel firewall. For example, to secure your server workloads, you can install this firewall on your Linux Dedicated or Virtual Server.","breadcrumb":{"@id":"https:\/\/cpanelplesk.com\/wp62\/how-to-check-if-ip-is-blocked-from-iptables\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cpanelplesk.com\/wp62\/how-to-check-if-ip-is-blocked-from-iptables\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cpanelplesk.com\/wp62\/how-to-check-if-ip-is-blocked-from-iptables\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cpanelplesk.com\/wp62\/"},{"@type":"ListItem","position":2,"name":"How to Check if IP is blocked from IPtables"}]},{"@type":"WebSite","@id":"https:\/\/cpanelplesk.com\/wp62\/#website","url":"https:\/\/cpanelplesk.com\/wp62\/","name":"cPanel Plesk","description":"Blog on famous hosting control panels","publisher":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cpanelplesk.com\/wp62\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13","name":"Farooq Omer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/","url":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png","contentUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png","width":300,"height":44,"caption":"Farooq Omer"},"logo":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/"}},{"@type":"Person","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/b5c17eff2915a029433dfd2d5a6e8465","name":"samama","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5ad71c1d187b45a3c1a68698160b5f6d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5ad71c1d187b45a3c1a68698160b5f6d?s=96&d=mm&r=g","caption":"samama"},"url":"https:\/\/cpanelplesk.com\/wp62\/author\/samama\/"}]}},"_links":{"self":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts\/9288","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/comments?post=9288"}],"version-history":[{"count":5,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts\/9288\/revisions"}],"predecessor-version":[{"id":9325,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts\/9288\/revisions\/9325"}],"wp:attachment":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/media?parent=9288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/categories?post=9288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/tags?post=9288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}