New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

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


Post Reply New Thread Subscribe

 
Thread Tools
tjod

 
Member Since: Mar 03, 2013
Posts: 15
tjod is on a distinguished road

tjod is offline
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!
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 18,217
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

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

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
tjod

 
Member Since: Mar 03, 2013
Posts: 15
tjod is on a distinguished road

tjod is offline
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.
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 18,217
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
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.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
tjod

 
Member Since: Mar 03, 2013
Posts: 15
tjod is on a distinguished road

tjod is offline
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!
QUOTE Thanks

Post Reply New Thread Subscribe


« Unusual OSX 10.9.2 connectivity issue | Ghost HP Printer files »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

All times are GMT -4. The time now is 09:17 AM.

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

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?