Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-22-2010, 04:27 AM
|
#1
|
|
Member
Registered: Oct 2003
Location: the Netherlands
Distribution: Arch Linux, Ubuntu server
Posts: 145
Rep:
|
Apache2 access restriction in location
I've got this in my Apache2 config (on a Ubuntu 9.10 server):
Code:
<VirtualHost _default_:443>
DocumentRoot /srv/svn
<Location /repos>
DAV svn
SVNParentPath /srv/svn
Order Deny,Allow
Deny from all
# ALlow local host
Allow from 127.0.0.1 172.23.120
AuthType Basic
AuthName "Knock Knock"
AuthUserFile /srv/svn/.webdavpwd
Require valid-user
Satisfy All
</Location>
some ssl code, etc etc
When I comment out the "allow from" line, I have no access to this server at all, but when "Allow from 127.0.0.1 172.23.120" is activated, I can also access that location from other IP's (I can even access it from the internet).
What I really want is access limited to the IP's in "Allow from" because I don't want anyone accessing our subversion repo's from anywhere else.
I know I'm overlooking something very obvious, but perusing Apache2 documentation for 2 hours haven't helped me find it. 
|
|
|
|
01-22-2010, 05:33 AM
|
#2
|
|
Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,392
|
Hi,
Remove or comment out the "Deny from all" directive and restart apache.
|
|
|
|
01-22-2010, 07:38 AM
|
#3
|
|
Member
Registered: Oct 2003
Location: the Netherlands
Distribution: Arch Linux, Ubuntu server
Posts: 145
Original Poster
Rep:
|
Did it, can still reach the server from all and any IP's I want, including those not specified in the "Allow from" directive.
|
|
|
|
01-22-2010, 07:57 AM
|
#4
|
|
Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,392
|
|
|
|
|
01-22-2010, 08:36 AM
|
#5
|
|
Member
Registered: Oct 2003
Location: the Netherlands
Distribution: Arch Linux, Ubuntu server
Posts: 145
Original Poster
Rep:
|
Nope, no effect. Can still reach the location from the internet.
Is the fact that there is another <Location> webdav / svn directive in the same VirtualHost file (without any IP restrictions) any reason for this not to work?
|
|
|
|
01-22-2010, 08:53 AM
|
#6
|
|
Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,392
|
Could be. The Location directive matches regexes, so it maybe bypasses your restriction because it matches something else.
You can put the directives needed for access restriction inside a .htaccess file in the directory you want to protect.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:20 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|