Banning countries / IPs to visit your site

Discussion in 'Site & Server Administration' started by razib19, Mar 15, 2009.

  1. #1
    How to Ban Visitors from any Country or IPs to visit a site ?

    I hv tried adding Banned IPs on .htaccess and uploading them on server.

    and also using IP deny Manager, but itz not working :(


    Can uy plz let us know if there as any other tested ways...
     
    razib19, Mar 15, 2009 IP
  2. strat

    strat Active Member

    Messages:
    154
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #2
    strat, Mar 17, 2009 IP
  3. ~kev~

    ~kev~ Well-Known Member

    Messages:
    2,866
    Likes Received:
    194
    Best Answers:
    0
    Trophy Points:
    110
    #3
    Check with the hosting provider and see if they can add that IP range to the server firewall.

    Is there a way to add the IP range to the host.deny file?

    Are you running some kind of content management system or forum? Some CMSs and forums have a built in IP deny feature.

    If you have tried using the IP deny manager in CPAnel, you may want to submit a trouble ticket to tech support. Because that feature should work.
     
    ~kev~, Mar 17, 2009 IP
  4. internetstromer

    internetstromer Member

    Messages:
    19
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #4
    If you have server root access you can block IP from server as well here are the command to block and unblock the particular IP via putty

    TO BLOCK IP
    iptables -I INPUT -s 111.111.111.111 -j DROP

    TO UNBLOCK IP
    iptables -D INPUT -s 111.111.111.111 -j DROP

    This command will drop the request which is comming to the server from and particular IP

    This will help for sure ;)
     
    internetstromer, Mar 17, 2009 IP