Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Security and Privacy
FedoraForum Search

Forgot Password? Join Us!

Security and Privacy Sadly, malware, spyware, hackers and privacy threats abound in today's world. Let's be paranoid and secure our penguins, and slam the doors on privacy exploits.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12th January 2006, 06:51 PM
bonefry Offline
Registered User
 
Join Date: Oct 2005
Posts: 21
How to secure Apache ?

Hi guys,

I am in charge of administering a RHEL version 3 server that hosts a couple of websites.
Unfortunately I am just a programmer that had nothing to do with Linux administration before.

While looking at the HTTPD logs, I discovered the following errors:
Code:
[Sun Jan 08 13:53:03 2006] [error] [client 85.75.58.103] File does not exist: /var/www/html/phpmyadmin
[Sun Jan 08 13:53:04 2006] [error] [client 85.75.58.103] File does not exist: /var/www/html/PMA
[Sun Jan 08 13:53:04 2006] [error] [client 85.75.58.103] File does not exist: /var/www/html/mysql
[Sun Jan 08 13:53:04 2006] [error] [client 85.75.58.103] File does not exist: /var/www/html/admin
[Sun Jan 08 13:53:04 2006] [error] [client 85.75.58.103] File does not exist: /var/www/html/db
[Sun Jan 08 13:53:04 2006] [error] [client 85.75.58.103] File does not exist: /var/www/html/dbadmin
[Sun Jan 08 13:53:04 2006] [error] [client 85.75.58.103] File does not exist: /var/www/html/web
[Sun Jan 08 13:53:05 2006] [error] [client 85.75.58.103] File does not exist: /var/www/html/admin
[Sun Jan 08 13:53:05 2006] [error] [client 85.75.58.103] File does not exist: /var/www/html/admin
[Sun Jan 08 13:53:05 2006] [error] [client 85.75.58.103] File does not exist: /var/www/html/admin
[Sun Jan 08 13:53:05 2006] [error] [client 85.75.58.103] File does not exist: /var/www/html/phpmyadmin2
[Sun Jan 08 13:53:05 2006] [error] [client 85.75.58.103] File does not exist: /var/www/html/mysqladmin
[Sun Jan 08 13:53:06 2006] [error] [client 85.75.58.103] File does not exist: /var/www/html/mysql-admin
......
......
It is clear that these are hacking attempts. Fortunately I never thought it was a good ideea to have phpmyadmin on my server, so I felt a relief seing the above attempts, but it got me wondering ...

What can I do to secure my Apache webserver better ?

The database is on a different server and only accepts connections from the webserver's IP and from my workstation.
I connect to both servers remotely using SSH, and the firewall is only accepting connections from a couple of IPs.
I also made sure the PHP scripts cannot be compromised with mysql injections.

But other than that, I have no ideea, and I started worrying after seeing those logs.
Maybe you guys can give me some points were I can improove.
Reply With Quote
  #2  
Old 12th January 2006, 07:09 PM
GMalenko1 Offline
Registered User
 
Join Date: May 2005
Posts: 29
I think there is a way in the httpd.conf file to ban different ips. I have to look it up.
Reply With Quote
  #3  
Old 16th January 2006, 04:03 AM
kden604 Offline
Registered User
 
Join Date: Jan 2006
Location: Northern Ontario
Posts: 3
Quote:
Originally Posted by GMalenko1
I think there is a way in the httpd.conf file to ban different ips. I have to look it up.
There is a few different ways to ban people, but I prefer using the ModSecurity module for apache. It's available at http://modsecurity.org - you can also download rules for know bad boxes, general pre-setup blocks etc from http://gotroot.com and finally, i have my own home-brew auto-rules update script available at http://kendennis-rss.homeip.net/

ModSecurity is one of the more effect application firewalls for apache... when used in conjunction with general good security practices it "helps" to keep your box safer.
__________________
--
Ken Dennis
http://KenDennis-RSS.homeip.net/
There's no place like 127.0.0.1
Reply With Quote
  #4  
Old 16th January 2006, 05:17 AM
rayyes Offline
Registered User
 
Join Date: Dec 2004
Location: Toronto, ON
Posts: 408
-TURN OFF Autoindexing in httpd.conf !!! (this will deter 90% of script kiddies)
-Separate your files in 2 camps: those anyone can see, and the rest. For the rest put them in folders accessible only by YOU (or chown/chmod them so only you access them).
-Change all default passwords and do not use default usernames
__________________
Peace - To the Middle East.
rayyes.com
Reply With Quote
Reply

Tags
apache, secure

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to secure apache and mythweb AnimeFreak Servers & Networking 3 20th February 2009 07:03 AM
How secure is default apache settings? thisone Servers & Networking 0 21st March 2006 11:39 PM
Apache secure directory jrmontg Servers & Networking 20 3rd January 2006 06:16 PM
secure apache and ie not playing together websavages Servers & Networking 0 1st August 2005 10:41 AM
Ways to secure apache anysh Servers & Networking 5 31st March 2005 03:47 AM


Current GMT-time: 21:26 (Tuesday, 21-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat