OT: Blocking IP range in apache2 ubuntu server

antonio at antoniocordero.com antonio at antoniocordero.com
Wed Jan 16 16:02:38 UTC 2008


   Well, when you use 193.200.0.0 , you are blocking the traffic only for
one host (193.200.0.0), but if you use the IP/netmask, you block the
traffic for more than one host.

   In your question, you wanted to block the traffic for all the computers
with the adress 193.200.xxx.xxx , so, you need to apply the netmask to
block the traffic for all the host in it. If you only want to block the
/24 instead the /16, you only need to change your mask:

     deny from 193.200.0.0/255.255.255.0 --> block computers between
193.200.0.0 to 193.200.0.255.

    Would help you to understand if you try to read some about the CIDR
notation.

    Nice day :)
    Antonio

>
> On Wed, 2008-01-16 at 16:24 +0100, antonio at antoniocordero.com wrote:
>
>> Maybe :
>>    deny from 193.200.0.0/255.255.0.0
>>
>>    Have a nice day,
>>    Antonio
>>
>
> That worked perfectly. Thank you!
> Can you explain how you come up with the 255.255.0.0 ? I like to
> understand why something works rather than just following directions :)
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>






More information about the ubuntu-users mailing list