LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-15-2002, 12:42 AM   #1
kobe
Member
 
Registered: Jun 2002
Location: Australia
Distribution: RH 7.3 & Debian (Woody)
Posts: 30

Rep: Reputation: 15
Apache log Question


Ok ppl....

i have got my apache server up and operational, i am now in the process of securing my system.

I am wondering if anyone can shed some light on these log (http logs) entries

1)

199.0.42.10 - - [15/Jul/2002:01:51:12 +1000] "GET /scripts/..%255c%255c../winnt/system32/cmd.exe?/c+dir" 404 -

2)

adsl-66.110.147-167.globetrotter.net - - [15/Jul/2002:13:53:19 +1000] "GET /scripts/..%255c..%255cwinnt/system32/cmd.exe?/c+dir+c:\ HTTP/1.1" 404 357


Also i am wondering how i can stop a person viewing my website by blocking their ip address? is this possible and how?ANy information regarding the securing of a apache webserver would also be helpful!!

by the way, it is apache 1.3 on a redhat 7.3 kernel 2.4.18-3 system


thanx
 
Old 07-15-2002, 01:15 AM   #2
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
As for logs, you can just laugh at them - some scrip-kiddie is trying IIS tricks on your linux box - he/she is trying to get a DOS prompt with administrator privileges if possible but he/she is stupid enough to do social engineering first - to find out what OS is running and what is the webserver. As for blocking IP and securing your box I suggest browse http://www.linuxsecurity.org http://www.securityfocus.com esspaciallly their bugtraq section, and many many other web security related sites - means do some googling.
Cheers
 
Old 07-15-2002, 03:11 AM   #3
kobe
Member
 
Registered: Jun 2002
Location: Australia
Distribution: RH 7.3 & Debian (Woody)
Posts: 30

Original Poster
Rep: Reputation: 15
ok cool......

another quick question:

does the host.deny file stop people from accessing ur machin (and webserver)????


also what is the format for the host.deny file....

i know DENYENY ALL....

any help is much appreciated!!!
 
Old 07-15-2002, 03:03 PM   #4
_stef_
Member
 
Registered: Apr 2002
Location: Bosnia and Herzegovina
Distribution: Debian&M$Win*
Posts: 39

Rep: Reputation: 15
You have file /etc/httpd/conf/httpd.conf
There you should search for your domain options
something like this:
<Directory /home/*/public_html>
.
.
.
Allow from <addresses that should be allowed>
Deny from <ip addresses that should be denied>
.
.
.
</Directory>
 
Old 07-16-2002, 06:09 AM   #5
kobe
Member
 
Registered: Jun 2002
Location: Australia
Distribution: RH 7.3 & Debian (Woody)
Posts: 30

Original Poster
Rep: Reputation: 15
cheers bro for that response....just what i needed!!!
thanx for ur time!
 
Old 07-16-2002, 09:21 AM   #6
_stef_
Member
 
Registered: Apr 2002
Location: Bosnia and Herzegovina
Distribution: Debian&M$Win*
Posts: 39

Rep: Reputation: 15
I forgot to tell you that you have to restart your Apache after these modifications (not computer). So, you have to search for the script httpd and execute with parameter stop then with parameter start (also you can do it by once with parameter restart).

It is up to your system where is that file, but you should search in /etc/rc.d/*

One more thing, when you find that script run is like /etc/rc.d/*/httpd <restart> not just like httpd <restart> because this will probably start httpd from your "path" and nothings happen (that is case in Red Hat I don't know is it like that in other distros but it is easyer just to do right thing).

HUH! I'm tyred now from all these words...
 
Old 07-16-2002, 03:09 PM   #7
Rashkae
Member
 
Registered: May 2002
Distribution: Slackware
Posts: 125

Rep: Reputation: 15
Just so you know, those messages you described are not really script kiddies, but are actually computers infected with Code Red or Nimda or some variant thereof trying ot spread themselves around.. There's no point trying to block the IP addresses, you'll die of old age before you stem the flood.

It does, however, become important to have a logrotate routine properly configured, otherwise, log files now become uncomfortably large.
 
Old 07-22-2002, 04:02 AM   #8
kobe
Member
 
Registered: Jun 2002
Location: Australia
Distribution: RH 7.3 & Debian (Woody)
Posts: 30

Original Poster
Rep: Reputation: 15
hmmm...thanx...would never of thought of that!!!1
 
Old 09-03-2002, 10:55 AM   #9
BaerRS
Member
 
Registered: Oct 2001
Location: Columbus, Ohio
Distribution: all.. but mainly SuSe--- looks like it changing to Red Hat
Posts: 119

Rep: Reputation: 15
A little late.. but this should do what you need...

I had the same problme, as far as my apache log file filling up with hits from unsecure IIS boxes...

I created WormBlock for my personal use, if you think it could benefit from it as well, then by all mean use it. I was sick and tired (to say the least) of all the crap I was getting in my apache log file from unsecured boxes on the internet, mostly home uses on DSL or Cable Modems. I was getting around 25M of log files every 3 days, and this is not a public site... just my personal space. Im thinking about posting all the IP's of the infected computers, and having a way so you can post yours so we could all share the IP's ... theirfor we would not have to wait till they pollute the log files before we block them.

if you would likt to check it out at:

http://wormblock.sourceforge.net
 
Old 09-03-2002, 08:22 PM   #10
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
Ok, is that safe? I don't want to have a 25M iptables script instead of a 25M apache log.
 
Old 09-05-2002, 10:23 AM   #11
BaerRS
Member
 
Registered: Oct 2001
Location: Columbus, Ohio
Distribution: all.. but mainly SuSe--- looks like it changing to Red Hat
Posts: 119

Rep: Reputation: 15
That has not happened...
I have about 320 address causing all the problems... each time one of the address hit my box.. its usually about 20 -30 hits depending on the version of the worm, and multiple times a day, on a avg. about 5 times a day per address. You add that up.. 32,000 - 48,000 hits a day that it is blocking.
 
Old 09-05-2002, 10:53 AM   #12
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
WOW...
Thanx BaerRS I will try it
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache log formatch question whysyn Linux - Software 1 11-07-2005 10:27 AM
Apache Log file question. GarroteYou Linux - Security 8 10-24-2004 05:51 AM
apache access log question verbal Linux - Software 3 07-28-2004 11:15 PM
Apache log question--What is this? grizzly Linux - Security 4 09-02-2003 02:18 PM
newb apache log question spooge Linux - Security 1 03-08-2003 07:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:59 AM.

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