Block by IP in LPCP

From Lunarpages Web Hosting Wiki

How can you block somebody by IP address in the LPCP?

At this time, there is no automated system for blocking by IP addresss in the LPCP control panel. However, you can do so from the .htaccess file. To create a .htaccess file in LPCP, go into your File Manager and then navigate yourself into the public_html folder.

How do you create a .htaccess file? In the File Manager, go into the public_html folder, then at the top-right of the page you should see a create a file option. Choose "File" as the file type, type .htaccess into the empty text box, and then hit the "Create" button.


Once you have located your .htaccess file, click on the V icon under actions. This will allow you to edit the file.


Now, enter the following:

order allow,deny
deny from
deny from 012.34.5.
allow from all

The above blocks access to the site from, and from any sub-domain under the IP block 012.34.5. (,,, etc.). Edit it as needed.

For more help, be sure to check out: