LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-23-2005, 03:30 PM   #1
Mondus
Member
 
Registered: Jul 2005
Location: Denmark
Distribution: Debian
Posts: 31

Rep: Reputation: 15
.htaccess on Debian


Hi... I've installed my apache server with apt-get install... But now I want to make .htaccess work because I need to password protect a directory... Can anyone guide me through it? I know it's not quite like getting it to work on other distros.. and I haven't been able to find a good guide.... So I'm hoping someone has been doing this before!
 
Old 09-24-2005, 02:55 AM   #2
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
hi there,
what do you need that it is not written in the APACHE documentation??
regards,
slackie1000
 
Old 09-24-2005, 03:48 AM   #3
Mondus
Member
 
Registered: Jul 2005
Location: Denmark
Distribution: Debian
Posts: 31

Original Poster
Rep: Reputation: 15
Oh.. sorry... a couple of hours after posting in here.. I got it working.. but I just have a small issue... What security precautions should I take to completely secure the directory... Because, when prompted to login, if a hacker knew my username.. what's going to stop him form just bruteforcing his way into the directory?
 
Old 09-24-2005, 04:01 AM   #4
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
hi there,
Quote:
Originally posted by Mondus
what's going to stop him form just bruteforcing his way into the directory?
a strong password?
ok, .htaccess is not the strongest way to protect a directory. if someone knows your user, it is still necessary to "guess" your pass.
if you really need something safe, you should get your hands dirty with php.
regards,
slackie1000
 
Old 09-24-2005, 05:50 AM   #5
Mondus
Member
 
Registered: Jul 2005
Location: Denmark
Distribution: Debian
Posts: 31

Original Poster
Rep: Reputation: 15
And use sessions or what? ..... But I know they have to guess my password.. but what's to stop them from doing it by means of bruteforcing?
 
Old 09-24-2005, 10:58 AM   #6
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
hi there,
Quote:
Originally posted by Mondus
but what's to stop them from doing it by means of bruteforcing?
short answer: nothing.
it is like ssh. you can not stop it. but there are ways to prevent or make it difficult.
about .htaccess i must again point you to the excellent apache documentation. to give you some ideas, what is possible with .htaccess for example is blocking ips, domains and such things. but you can not prevent a brute force attack. like i wrote before if you have really important content to protect .htaccess is not the solution.
regards,
slackie1000
 
Old 09-24-2005, 02:31 PM   #7
Mondus
Member
 
Registered: Jul 2005
Location: Denmark
Distribution: Debian
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by slackie1000
hi there,

short answer: nothing.
it is like ssh. you can not stop it. but there are ways to prevent or make it difficult.
about .htaccess i must again point you to the excellent apache documentation. to give you some ideas, what is possible with .htaccess for example is blocking ips, domains and such things. but you can not prevent a brute force attack. like i wrote before if you have really important content to protect .htaccess is not the solution.
regards,
slackie1000

Ok.. so there are ways to make it difficult... Which ways? Can I for example define a waiting period before a retry login?

Ok, so now we've established that .htaccess is not the best idea... But then what is? What's a good alternative?
 
Old 09-24-2005, 02:35 PM   #8
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
hi there,
nope. afaik it is not possible to define time periods with .htaccess. l
ike i already wrote you can use a php authentication, where you can define time periods along with other security things..
this can be useful for you.
regards,
slackie1000
 
Old 09-24-2005, 04:51 PM   #9
Mondus
Member
 
Registered: Jul 2005
Location: Denmark
Distribution: Debian
Posts: 31

Original Poster
Rep: Reputation: 15
Ok.. thanks.. I'll look into that!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess Help GUIPenguin Linux - Security 6 02-22-2005 02:25 PM
htaccess xlord Linux - Newbie 1 01-16-2004 09:20 PM
.htaccess artistik Linux - Software 1 10-23-2003 03:24 PM
Htaccess DoobyWho Linux - General 4 04-28-2003 01:01 PM
.htaccess axman Linux - Newbie 1 08-16-2001 05:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration