Results 1 to 4 of 4

Thread: Deny IP addresses using .htaccess

  1. #1
    ghadeer is offline Net Builder
    Join Date
    Oct 2009
    Posts
    108
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Deny IP addresses using .htaccess

    we can ban an ip address by cpanel but if some on havnt cpanel
    he can denay any ip by htaccess
    1-Block everyone but yourself

    # Begin IP blocking #
    Order Deny,Allow
    Deny from all
    Allow from xx.xxx.xxx.xx
    # End IP blocking #

    2-Allow everyone, but block Certain IPS
    # Begin IP blocking #
    Order Allow,Deny
    Deny from xxx.xxx.xx.xxx
    Deny from xxx.xx.x.xx
    Allow from all
    # End IP blocking #

    3-another way would be to block the REQUEST, HTTP REQUEST., POST, GET ect
    #Begin limit #
    <Limit GET POST>
    order allow,deny
    deny from xx.xxx.xxx.xxx
    deny from xx.xxx.xxx.xxx
    allow from all
    </Limit>
    #End limit #

  2. #2
    thesyndicate is offline Newbie Net Builder
    Join Date
    Jul 2009
    Location
    NET<>DP
    Posts
    138
    Thanks
    14
    Thanked 5 Times in 4 Posts
    This works even with no cpanel? Can i block all IP but my own on certain url like /admin

  3. #3
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,034
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    Quote Originally Posted by thesyndicate View Post
    This works even with no cpanel? Can i block all IP but my own on certain url like /admin
    To restrict access to phpMyAdmin, we're using something like this:
    Code:
    Alias /phpmyadmin/ "/usr/local/www/phpMyAdmin/"
    
    <Directory "/usr/local/www/phpMyAdmin/">
        Options none
        AllowOverride Limit
    
        Order Deny,Allow
        Deny from all
        Allow from 127.0.0.1 203.136.14.246 68.126.135.195
    
    </Directory>
    In most instances though, it's more convenient to use basic http authentication to secure URL's.
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  4. #4
    thesyndicate is offline Newbie Net Builder
    Join Date
    Jul 2009
    Location
    NET<>DP
    Posts
    138
    Thanks
    14
    Thanked 5 Times in 4 Posts

Similar Threads

  1. Replies: 10
    Last Post: 27 October, 2010, 21:10 PM
  2. MSN addresses
    By Sbfc_ in forum Community Building
    Replies: 15
    Last Post: 24 April, 2010, 23:39 PM
  3. Internet will run out of addresses in two years.
    By rome9t9 in forum Domaining
    Replies: 28
    Last Post: 16 November, 2009, 07:07 AM
  4. Changing IP Addresses
    By extreme-seo in forum Tech-Talk
    Replies: 0
    Last Post: 25 July, 2009, 06:36 AM
  5. Banning IP addresses by server
    By ghadeer in forum Managing
    Replies: 2
    Last Post: 14 May, 2009, 10:04 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •