How Do I Deny IP Address Access in Plesk?

Unfortunately, there is not a method for blocking traffic per IP address in Plesk. The following methods will assist you with blocking IP addresses when using Plesk depending on your server type.

Windows

If you have Windows shared hosting, please contact us via phone or Live Chat for assistance.

If you have administrator access on Windows dedicated server hosting, you can block an IP address with Windows Firewall 2008 or 2012 using the following directions:

  1. Log into your server via Remote Desktop.
  2. Click on Start > All Programs > Administrative Tools > Windows Firewall with Advanced Security.
  3. On the left side of the firewall window click on the Inbound Rules option.
  4. On the right side of the screen click on New Rule.
  5. Click on the Custom radio button and then click the Next button:

  6. Make sure the All programs radio button is selected then click Next.
  7. On the Protocol and Ports options leave everything at its defaults and click Next.
  8. On the Scope tab there will be two boxes; the top box is for local IP addresses and the bottom box is for remote IP addresses. In this scenario we are blocking an outside (remote) IP from accessing anything on the server, so we will need to add the IP address to the bottom box only as it will not be a local IP address.
  9. Click on the radio button that says These IP addresses in the remote section as illustrated below:

  10. Click the Add button.
  11. In the next window we will be adding a single IP address to the rule, but you can also add an entire range if necessary:

  12. Click OK, then click Next.
  13. Select the Block the connection radio button on the next screen and then click Next:

  14. Leave all of the options on the next screen checked as this will block the IP address regardless of which connection type they are trying to use. Click Next:

  15. Enter a name for the rule and click Finish.

Linux (VPS with Plesk)

If you have Linux hosting, you can simply create the IP deny rules in your .htaccess file.

allow from all
deny from 70.24.291.52 #ex-employee
deny from 216.130.49.223 #visitor spamming comments

or

deny from all
allow from 70.46.21.152 #my office
allow from 72.30.29.113 #my house

Color coding of code is added for readability and is not actually part of the code.

See the article on How to Edit Your .htaccess File for generic instructions that apply to all .htaccess changes.