Plesk

How to allow/restrict connections from an IP address to a website hosted in Plesk on Windows Server

Question

How to allow/deny connections from an IP address to a website hosted in Plesk on Windows Server?

Answer

To allow/deny connections from a specific IP address, click on the required section and follow the steps.

 

Allowing/denying connections from specific IP addresses only to a website via Plesk

 

  1. Log in to Plesk.

  2. Go to Domains > example.com > IIS Settings:

  3. Switch the Deny access to the site directive to the Enter custom value option:

  4. Specify the IP addresses which have to be blocked in the first field and add IP addresses which have to be allowed to access the website in the second field:

  5. Click OK to apply changes.

 

Allowing connections from specific IP addresses only to a website via IIS

 

  1. Connect to a Windows server via RDP.

  2. Start IIS Manager (click Windows Start > type "inetmgr" > click Run command).

  3. In IIS Manager, expand SERVERNAME > Sites > click on a required website > double-click IP Address and Domain Restrictions (under IIS group).

  4. Click Add Allow Entry... (on the right pane) to add an IP address or IP address range which will be allowed to access the website. Click OK.

    Repeat this step to add other IP addresses to the list.

  5. Once allowed IP addresses have been added, click Edit Feature Settings... and select Deny for Access for unspecified clients. Click OK.

    Note: Some Plesk features (e.g. securing a domain with a Let's Encrypt certificate) may not work when connections are allowed from specific IP addresses only.

    Now, only users with the specified IP addresses are able to access the website.

 

Denying connections from specific IP addresses to a website via IIS

 

  1. Connect to a Windows server via RDP.

  2. Start IIS Manager (click Windows Start > type "inetmgr" > click Run command).

  3. In IIS Manager, expand SERVERNAME > Sites > click on a required website > double-click IP Address and Domain Restrictions (under IIS group).

  4. Click Add Deny Entry... (on the right pane) to add an IP address or IP address range which will be allowed to access the website. Click OK.

    Repeat this step to add other IP addresses to the list.

  5. Once denied IP addresses have been added, click Edit Feature Settings... and select Allow for Access for unspecified clients. Click OK.

    Now, users with the specified IP addresses are no longer able to access the website.

 

Additional Information