Mac Forums

Mac Forums (http://www.mac-forums.com/forums/)
-   OS X - Operating System (http://www.mac-forums.com/forums/os-x-operating-system/)
-   -   How to block specific IP address(es) access to my webserver? (http://www.mac-forums.com/forums/os-x-operating-system/310523-how-block-specific-ip-address-es-access-my-webserver.html)

tjod 04-15-2014 01:52 PM

How to block specific IP address(es) access to my webserver?
 
Hi;

I run a small personal website on a Mac Mini at home. Using 2010 Mac Mini Server w/ OS X 10.9.2 and latest OS X Server, Apache Web Server 2.2x.

Would like to be able to block some specific IP addresses that are using a lot of bandwidth (spiders, hackers, etc.) from accessing the site and possibly the IP address on the public side.

Is there a way to redirect specific addresses into some sort of a black hole, with no error message - just ... nothing?

Thanks!

vansmith 04-15-2014 01:56 PM

Looks like you want Apache's access control functionality (see here).

tjod 04-15-2014 02:06 PM

Thanks, but that's not very helpful. Not even sure where those settings would go.

Is there a way to block at the firewall? I'm using Airport Extreme (5th Gen)

Thanks.

vansmith 04-15-2014 02:21 PM

Those settings go in your httpd.conf file (so, /etc/apache2/httpd.conf...I think, I'm away from my Mac right now).

I'm not sure how the sever app works but evidently there's a hardware section in the server app that lets you tweak with the Airport device on the Mac itself. From what I've seen, there's a bit of control there for blocking things.

tjod 04-15-2014 05:05 PM

That was simpler than I thought. I was able to add a directive (if that's the right term) like "DENY xxx.yyy.zzz.aaa" for the address. directly to the httpd.conf file in etc/apache2. For some reason, all the other references I had seen were saying to refer to files inside other files and defined elsewhere, yadda yadda. Hopefully this will work. Seems a lot more direct that other methods at least.

Thanks!


All times are GMT -4. The time now is 03:25 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.