Server error with a deny from command

Discussion in 'Apache' started by ian_ok, Jul 30, 2006.

  1. #1
    I've got lots of IP address's being block in my htaccess file such as:

    ** NOTE the x's are numbers that have been removed for posting on this forum **

    deny from x7.x5.
    deny from x5.3x.1x2.0/24
    deny from x2.3x.231.114
    etc..

    However when I try the following I get a server error:

    deny from 2x6.1x9.1x0.64/96

    Why is this so?

    Ian
     
    ian_ok, Jul 30, 2006 IP
  2. Cryogenius

    Cryogenius Peon

    Messages:
    1,280
    Likes Received:
    118
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Are you sure that /96 is valid CIDR notation? Try using a netmask instead (e.g. 255.255.0.0).

    Cryo.
     
    Cryogenius, Jul 30, 2006 IP
  3. ian_ok

    ian_ok Peon

    Messages:
    551
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    But I only want to ban a small renge of this IP for whole blocks.

    So is there a way round from not having to enter evry single IP when they are continous??

    deny from 2x6.1x9.1x0.64
    deny from 2x6.1x9.1x0.65
    deny from 2x6.1x9.1x0.66
    deny from 2x6.1x9.1x0.67
    deny from 2x6.1x9.1x0.68
    deny from 2x6.1x9.1x0.69
    and on......
    deny from 2x6.1x9.1x0.94
    deny from 2x6.1x9.1x0.95
    deny from 2x6.1x9.1x0.96


    Thanks Ian
     
    ian_ok, Jul 31, 2006 IP