Go Back   Choon.NET Community > IT Talk > Securing / Hardening / Updating / Configuring / Tweaking

Securing / Hardening / Updating / Configuring / Tweaking Talk about securing, hardening, updating your system, compiling softwares, tweaking your configurations etc. NO OFFER/PROMOTION PLEASE!

Reply
 
Thread Tools Display Modes
  #1  
Old 12-21-2006, 11:20 AM
coolrock coolrock is offline
Registered User
 
Join Date: Dec 2006
Posts: 1
Apache Security

Hi,

anyone knows how to configure http access to only a certain ip range? like an access list on apache.

like when an ip range of 123.x.x.x , I will allow them to access http://myserver.com

else, deny.

Thanks in advance.

Regards
Reply With Quote
  #2  
Old 12-21-2006, 03:24 PM
choon's Avatar
choon choon is offline
Administrator
 
Join Date: Sep 2002
Location: Singapore
Posts: 3,897
Create a .htaccess file with the following content in the folder which you want to restrict IP addresses:
Code:
order deny,allow
allow from 123.456.789.
allow from .yourdomain
allow from .yourisp.com
deny from all
The first line allow any ip in 123.456.789.x range. The second and third allow you to allow domains based on PTR records. Hope this is what you want. If you want to allow just an IP or two, simply add in allow from above deny from all line with its full ip address.

Kindest regards,
__________________
Giam Teck Choon
CHOON.NET
:: Join choon.net Community today to share your tips and tricks on server issues please ::
:: Singapore Co-location :: Singapore Dedicated Servers :: Singapore Virtual Private Servers :: Linux/FreeBSD Server Management ::
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump


All times are GMT +8. The time now is 02:56 AM.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright ©2001-2009 Choon.NET. All Rights Reserved.