Block by IP in LPCP

From Lunarpages Web Hosting Wiki
Jump to: navigation, search

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.

Create-htaccess-lpcp.png

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

Edit-lpcp-htaccess.png

Now, enter the following:

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

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

For more help, be sure to check out:

Share |
Want to read this in another language?