Difference between revisions of "Blocking an IP from your Website"

From Acenet Knowledgebase
Jump to: navigation, search
(test)
 
(How it Works)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<html>This demo will show you how to block an IP from your Website through your cPanel. The ability to deny an IP address access to your site allows webmasters greater control over the security of their site. IP blocking could be useful for:<br />
+
This demo will show you how to block an IP from your Website through your cPanel. The ability to deny an IP address access to your site allows webmasters greater control over the security of their site. IP blocking could be useful for:
<br />
+
 
    * Blocking IPs where past security attacks have originated from<br />
+
* Blocking IPs where past security attacks have originated from
    * Banning unwanted visitors   <br />
+
* Banning unwanted visitors
    * Blocking email harvesters<br />
+
* Blocking email harvesters
<br />
+
 
Once blocked, visitors (or robots) originating from a blocked IP will not be sent any pages, images, or files from your account. <br />
+
 
<br />
+
Once blocked, visitors (or robots) originating from a blocked IP will not be sent any pages, images, or files from your account.  
<iframe src="https://esupport.acenet-inc.net/swffiles/cPanel/blockip/blockip.html" width="700" height="540"> </iframe><br />
+
 
<br />
+
 
[1] Locate and click the "IP Deny Manager" icon under the "Security" section of your cPanel <br />
+
{{video|/swffiles/cPanel/blockip/blockip.html}}
<br />
+
 
[2] Enter the IP address you wish to block in the "IP Address or Domain" field<br />
+
[1] Locate and click the "IP Deny Manager" icon under the "Security" section of your cPanel
<br />
+
 
[3] Click the "Add" button to block the IP address from accessing your website<br />
+
[2] Enter the IP address you wish to block in the "IP Address or Domain" field
<br />
+
 
==================================================<br />
+
[3] Click the "Add" button to block the IP address from accessing your website
<br />
+
 
The way this works is by adding the following line to all of the .htaccess files located within your directory:<br />
+
== How it Works ==
<br />
+
 
deny from IP<br />
+
cPanel allows you to block IP addresses by adding the following line to the .htaccess files located within your directory:
<br />
+
 
replacing IP with the actual IP you specified in the "IP Address or Domain" field. We blocked the IP 255.255.255.255 in the video demo, so the line that was added to all of the .htaccess files located in our example account's directory was:<br />
+
<syntaxhighlight lang="bash">deny from IPADDRESS</syntaxhighlight>
<br />
+
 
deny from 255.255.255.255<br />
+
replacing IPADDRESS with the actual IP address you specified in the "IP Address or Domain" field. We blocked the IP 255.255.255.255 in the video demo, so the line that was added to the .htaccess files located in our example account's directory was:
<br />
+
 
==================================================</html> [[Category:cPanel]]
+
<syntaxhighlight lang="bash">deny from 255.255.255.255</syntaxhighlight>
 +
 
 +
[[Category:cPanel]]

Latest revision as of 19:38, 3 October 2012

This demo will show you how to block an IP from your Website through your cPanel. The ability to deny an IP address access to your site allows webmasters greater control over the security of their site. IP blocking could be useful for:

  • Blocking IPs where past security attacks have originated from
  • Banning unwanted visitors
  • Blocking email harvesters


Once blocked, visitors (or robots) originating from a blocked IP will not be sent any pages, images, or files from your account.


[1] Locate and click the "IP Deny Manager" icon under the "Security" section of your cPanel

[2] Enter the IP address you wish to block in the "IP Address or Domain" field

[3] Click the "Add" button to block the IP address from accessing your website

How it Works

cPanel allows you to block IP addresses by adding the following line to the .htaccess files located within your directory:

deny from IPADDRESS

replacing IPADDRESS with the actual IP address you specified in the "IP Address or Domain" field. We blocked the IP 255.255.255.255 in the video demo, so the line that was added to the .htaccess files located in our example account's directory was:

deny from 255.255.255.255