LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-11-2006, 06:59 PM   #1
dcdbutler
Member
 
Registered: Jan 2005
Location: Boston
Distribution: slackware
Posts: 502

Rep: Reputation: 30
What security for apache in slackware?


Well, I've just set up a webserver for the first time (apache 1.3.34) on my home lan, more of a hobby than anything serious at the moment. Here's the background:

My only firewall at the moment is a wireless router which is however well-configured for basic security. The port I'm binding apache to is being forwarded by the router. This is the only forwarding port which is open on the router.

Apache is installed with a minimal slackware installation, the only other "listening" service running is ssh. I'm using ssh for administration and I'm logging in from another computer (also slackware) on my lan, so port 22 is not open to the outside world on the router.

Well, the server is running and seems to be ok, but I'm concerned about the best security options for apache, both for myself and for everyone else. I obviously don't my webserver to become a breeding ground for worms/malware.

I'm going to follow the apache related security tips here:

http://httpd.apache.org/docs/1.3/mis...rity_tips.html

Anyone have any extra security ideas, slackware-oriented or otherwise, firewall or apache related? eg should I be using iptables in combination with the router, or is this overkill?

Cheers
 
Old 03-11-2006, 07:51 PM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
a few things you might wanna look into:

http://www.modsecurity.org/ (web application security for apache)

http://www.grsecurity.net/ (kernel security patch)

http://www.rootkit.nl/ (a rootkit scanner, nice to run periodically with cron and have it mail you results, etc.)

http://www.logwatch.org (it watches your logs and emails you reports)

http://sourceforge.net/projects/tripwire (a file integrity checker is good to have)

BTW, it would be great if you could explain what kinda content you are serving with Apache... are you using php/perl/python?? do you have a database going??

Quote:
Originally Posted by dcdbutler
should I be using iptables in combination with the router, or is this overkill?
it's not overkill IMHO... it provides you with another safety net in case something goes wrong at the router... it also lets you make rules to control access to the server within the LAN/DMZ, something which you could not do with the router...


just my ...

Last edited by win32sux; 03-11-2006 at 07:54 PM.
 
Old 03-11-2006, 08:10 PM   #3
dcdbutler
Member
 
Registered: Jan 2005
Location: Boston
Distribution: slackware
Posts: 502

Original Poster
Rep: Reputation: 30
Thanks for the reply and the excellent links

Quote:
BTW, it would be great if you could explain what kinda content you are serving with Apache... are you using php/perl/python?? do you have a database going??
Yea,I'm really really new to this, I'm not going to get into anything compllicated yet. I plan to start out just using HTML, probably better security-wise anyway, I can disable the apache modules I don't need. Eventually I'd like to migrate to something a bit more adventurous though such as LAMP, but not for a while yet.

Good point about the LAN, I'll brush up on my iptables.

Thanks!
 
Old 03-12-2006, 07:01 AM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
In addition, I would run a file integrity check program like Tripwire, Aide or Samhain. None of these will stop an attack, but they can answer a lot of questions about which files have been altered if you suspect you've been compromised.
 
Old 03-12-2006, 07:24 AM   #5
danieldk
Member
 
Registered: Aug 2002
Posts: 150

Rep: Reputation: 15
You can also contain Apache and other server programs with AppArmor. If there is a security problem, a potential cracker will stil not be able to break out of Apache's containment. For more information and packages see:

http://danieldk.org/apparmor/
 
Old 03-31-2006, 05:22 PM   #6
dcdbutler
Member
 
Registered: Jan 2005
Location: Boston
Distribution: slackware
Posts: 502

Original Poster
Rep: Reputation: 30
All great suggestions. Just one more to add for anyone referring to this thread in the future:

mod_chroot (Saves having to manually set up apache in a "root jail" - mod_security also has this functionality).

I also found these security tips to be useful while hacking away at httpd.conf. The httpd.conf defaults are actually not very secure, but they're good for getting the server up and running without having to do anything.

I also got some iptables rules in place.

Cheers

Last edited by dcdbutler; 03-31-2006 at 05:28 PM.
 
  


Reply



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
Apache security ohade Mandriva 1 01-21-2006 05:24 PM
Apache security oldator1940 Linux - Security 5 10-20-2005 09:28 PM
apache security tyler0123 Linux - Security 7 03-26-2005 02:04 PM
Slackware 10 security with apache & router tw001_tw Slackware 11 08-16-2004 09:20 AM
apache security depaul Linux - Security 5 12-10-2003 12:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:05 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