LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-02-2003, 05:49 PM   #1
Onox
Member
 
Registered: Jun 2003
Distribution: RedHat 9
Posts: 45

Rep: Reputation: 15
(Using Apache) How to IP ban?


Any help? =\
 
Old 07-02-2003, 06:05 PM   #2
anilnatha
LQ Newbie
 
Registered: Jun 2003
Distribution: Red Hat 8.0, 9.0
Posts: 26

Rep: Reputation: 15
Within your <Directory> Tag,

either allow certain ip's to access your site, or deny certain ip's.

the best way is to:

<Directory /path/to/site>
Order deny,allow
Deny from All
Allow from ....
</Directory>

Simply replace the "..." with the IP's that you wish to allow access to your site. You may also implement this using .htaccess

It's always best to deny everyone from accessing your site, and then allowing the select IP's that you trust to view your site. However if you know of the exact IP that you wish to block and not block everyone else, do the reverse:

<Directory>
Order Allow,deny
Allow from all
Deny from ...
</Directory>

replace the ... with the IP's you wish to block separated by spaces or add a new "Deny from ..." for each IP you want to block
 
  


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
Auto-Ban in SSH damicatz Linux - Security 3 04-23-2005 08:45 PM
vsftpd ban IP dsgdevil Linux - Software 5 06-02-2004 12:44 AM
iptables ban rule hypton Linux - Networking 1 03-09-2004 11:42 PM
using iptables to ban a subnet? Sm0k3 Linux - Networking 4 01-24-2004 04:25 PM
how do i ban messenger programs? antken Linux - Networking 5 09-18-2002 07:41 AM


All times are GMT -5. The time now is 04:30 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration