Forums

[resolved] Is it possible to block access to my blog by IP? (4 posts)

  1. ellaella
    Member
    Posted 4 years ago #

    I asked this 2 days ago on Misc. but must have been in the wrong place, as I got no replies.

    I would like to block users from 2 IPs from accessing my blog or, at the very least, one particular page. Is this possible? I searched for a plug in but couldn't find one.

    Thanks in advance for any help or guidance.

  2. 4k
    Member
    Posted 4 years ago #

  3. ellaella
    Member
    Posted 4 years ago #

    Thank you so much. The first one looks ideal. I must have used too many search terms or the wrong ones.

  4. BeingofLife
    Member
    Posted 4 years ago #

    You may try including an .htaccess file in the root directory of your blog containing the following:

    <Files .htaccess>
    order allow,deny
    deny from all
    </Files>

    <Limit GET POST>
    order allow,deny
    deny from xx.xxx.xx
    deny from xx.xxx.xxx
    allow from all
    </Limit>

    The first statement <Files .htaccess> denies viewing access to the file itself.
    The second grouping of statements <Limit GET POST> is where you limit access to specific IP addresses (represented by xx). By not including the last digits (octets) of the IP address, you exclude a wider range from that IP address family. The less octets, the greater range of exclusion.
    More information on the internet can be found on formatting an .htaccess file.

    Regards,

    Steven Barrymore

    http://www.BeingofLife.com -- the Blog
    http://www.ImagesMagical.com -- website

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.