OT: Blocking IP range in apache2 ubuntu server

Craig Puchta craig at craigpuchta.net
Wed Jan 16 14:02:31 UTC 2008


I'm having problems blocking an IP range in the default Apache setup in
Ubuntu server edition.
I'm neither a Linux or Apache guru but from searching I have come to the
conclusion that I put the IP's I want blocked into the file:
/etc/apache2/sites-available/default

This is what I have in there:
 <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
                deny from 193.200.0.0
                deny from 85.195.0.0
                # This directive allows us to have apache2's default
start page
                # in /apache2-default/, but still have / go to the right
place
                #RedirectMatch ^/$ /apache2-default/
        </Directory>

IP's are dummy IP's for testing, but I want to block the entire range of
193.200.
How do I accomplish this and am I even in the correct file. 

I also understand that you shouldn't use .htaccess files unless you
don't have access to 
/etc/apache2/sites-available/default which I do have access to.
Any help would surely be appreciated. 

Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080116/e311ef95/attachment.html>


More information about the ubuntu-users mailing list