LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   web server security (https://www.linuxquestions.org/questions/linux-security-4/web-server-security-415313/)

jcombs_31 02-14-2006 09:48 AM

web server security
 
I've posted this problem in the slackware forum, but maybe I'll get some help here. I have a slackware 10 box set up at my house as my personal web/ftp/mysql/smtp/ssh server. I have noticed lots of traffic and that my site seems to be getting hit hard from spam to the guestbook and email form. How can I secure apache to not accept this kind of junk? It seems to be eating lots of bandwidth on my DSL connection.

macemoneta 02-14-2006 11:25 AM

This is generally handled with "captcha" software. It's the software that creates those barely readable graphics with text/numbers that people have to type in before an entry is accepted. Many popular web applications now have this type of facility. Do a Google search for captcha and the software you're using on your web site to see if a plug-in is available.

Intimidator 02-14-2006 11:57 AM

Some Tips:

- Apache:
- Enable only needed modules in Apache.
- Install mod_security, and run apache in a jail with chroot.
- Fix all security bugs in Apache installation (see Bugtraq).
- See modules like mod_access, mod_auth, mod_rewrite and mod_ssl, may help.

- MySQL:
- Be carefull with the databases/tables permissions. If you run MySQL in the
same host than apache, you must run MySQL only in localhost.
- Use other user than root (Database Superuser), to
connect your applications in php.

Have a look @:

http://www.securityfocus.com/infocus/1694
http://www.securityfocus.com/infocus/1706
http://www.lamphowto.com/

jcombs_31 02-14-2006 01:36 PM

Quote:

Originally Posted by Intimidator
Some Tips:

- Apache:
- Enable only needed modules in Apache.
- Install mod_security, and run apache in a jail with chroot.
- Fix all security bugs in Apache installation (see Bugtraq).
- See modules like mod_access, mod_auth, mod_rewrite and mod_ssl, may help.

- MySQL:
- Be carefull with the databases/tables permissions. If you run MySQL in the
same host than apache, you must run MySQL only in localhost.
- Use other user than root (Database Superuser), to
connect your applications in php.

Have a look @:

http://www.securityfocus.com/infocus/1694
http://www.securityfocus.com/infocus/1706
http://www.lamphowto.com/

Do you have more detailed info about mod_security and jail with chroot?

I'm don't really have any mysql problems, everything seems to root from my site getting constantly scanned for forms to post. I can secure the forms, but that isn't really what I was looking for.

macemoneta 02-14-2006 03:02 PM

If you're concerned about the (never ending) scans, then take a look at the source addresses. I find that the scans typically originate from one or two countries. If you don't have any need to interact with folks from those countries (e.g., no business requirement or personal relationships), you can look up their address ranges and simply block them at the firewall. This has the added advantage of reducing the resource requirements on your server, but it is a brute force method.

jcombs_31 02-15-2006 08:36 AM

I let netwatch run on the box for a little while and noticed all kinds of strange connections.

http://www.jcombs.net/~jeff/netwatch.jpg

I don't know why hotmail would be connected so many times. Any advise from looking at the screen shot?

macemoneta 02-15-2006 09:29 AM

Well, it looks like a considerable number of packets are coming from Korea.

nx5000 02-15-2006 10:24 AM

He these poor chineese people already have filtering done by their government but for the hackers that manage to go out of the chineese firewall they are blocked by our firewall. lol
Poor them...
I personnaly don't think its so nice to block a whole country just because some zombies or scriptkiddies are there.

jcombs_31 02-15-2006 10:54 AM

Quote:

Originally Posted by macemoneta
Well, it looks like a considerable number of packets are coming from Korea.

How do you know? I'm intersted in knowing more details.

Intimidator 02-15-2006 01:05 PM

Quote:

Originally Posted by jcombs_31
How do you know? I'm intersted in knowing more details.

http://www.linuxquestions.org/questi...d.php?t=360119


All times are GMT -5. The time now is 03:49 PM.