stopping ip's from accessing apache


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers stopping ip's from accessing apache
# 1  
Old 09-25-2004
stopping ip's from accessing apache

Fedora C2
Apcache 2.0

Right now my setup consists of a cable modem which connects to a wireless router (Linksys WRT54G), which I have port forward all port 80 requests to my Linux (Fedora) box.

I want to block a certain ip address that has been in my /etc/httpd/logs/access_log file with entries like this:

67.173.189.150 - - [25/Sep/2004:11:28:24 -0500] "GET /scripts/..%c1%9c../winnt/system32/cmd.exe?/c+dir HTTP/1.0" 404 306 "-" "-"

When I look at the logs, it's the same IP everytime, and it fills up my log file pretty good.

Now i have tried to use iptables to stop this, but they still show up. Here is the command I use, and I enter it into /etc/rc.local so that it will execute on reboot:

iptables -A INPUT -i eth0 -p tcp -s 67.173.189.150 -j DROP


Is there something that I'm missing? I seem to think that my iptables command may not be correct with having a router port fowarding port 80 requests.

Also, does it matter that I have ip6tables and iptables both?

Thanks,
Jeff
# 2  
Old 09-27-2004
I would leave out that -i eth0.

Then it'll drop those packets whatever interface they happen to be wandering in through.

ip6tables(or what) is used with IPv6
probably not applicable.
# 3  
Old 09-27-2004
Thanks for the reply. I did figure out the problem. My problem was that I had a chain that was executing before my manual changes. And this chain had an accept all for port 80.

Once I changed the order, I was golden. No more log entries.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Stopping SSH tunnel

I have initiated a tunnel for vncserver. now i want to stop it. is there any way except sleep option? (2 Replies)
Discussion started by: majid.merkava
2 Replies

2. Red Hat

stopping you have mail.....

Hi, on server Red Hat Enterprise Linux AS release 3, I am getting the mail "you have mail" can any body suggest how to stop this? mail are getting generated in below path. /var/spool/postfix/maildrop, due to which heavy file are getting generated. though sendmail service is stopped. ... (0 Replies)
Discussion started by: manoj.solaris
0 Replies

3. Shell Programming and Scripting

Apache/CGI Bin Accessing mounted SMB share

Hey Guys, I need to copy some files from my Apache server to SMB share ... copy $file,"/Volumes/v1/x/test/$datestamp$name$suffix" Unfortunately this command when executed from Apache/cgi-bin is not able to access mounted volumes .. is there anything that can be done about that ... Can... (1 Reply)
Discussion started by: NDxiak
1 Replies

4. UNIX Desktop Questions & Answers

stopping running process

hi all, I am using red hat AS 4 linux enterprise,i need to run my application such that while its running no other process shuld run all the remaining process should be suspended ,i need to use whole of the process only for that application to run ,can anyone suggest me how to do this. ... (3 Replies)
Discussion started by: srilakshmi
3 Replies

5. UNIX for Dummies Questions & Answers

Stopping a shell script

This is simple for an experianced scripter but that is not what I am :) if ; then echo -==Test Passed $3 $4==- >> $1$2 nohup $6$7 & >> $1$2 else echo -==$8==- >> $1$9 echo -==$8==- >> $1$2 fi In the else step I also want to stop the script from moving on. ... (15 Replies)
Discussion started by: jadionne
15 Replies

6. Shell Programming and Scripting

Stopping A process

Hi I want to stop a process using a shell script. how do i do that? ie, to simulate ps -ef|grep Process name get the process id and kill -9 process id plz help... (4 Replies)
Discussion started by: gopsman
4 Replies

7. Shell Programming and Scripting

Stopping a command in between

Hi Is it possible to stop a command executing after certain time? I have this command say prstat which keeps on giving the values etc of the processes after every 1 sec(refreshes the screen) What I want is just stop the execution after first screen Since I have written this command in shell... (3 Replies)
Discussion started by: superprg
3 Replies

8. UNIX for Advanced & Expert Users

stopping a processor

hi, Can any plz tell what is the command for stopping a processor? suppose a system is accessing 10 processors and we want to stop the 3rd & 6th processor then whats the command in Unix? thank u (2 Replies)
Discussion started by: nm_virtual
2 Replies

9. Shell Programming and Scripting

stopping a script

i want to stop a script from running after one minute, using the sleep command, and then kill the process. anyhelp with this. (2 Replies)
Discussion started by: AtomJ22
2 Replies
Login or Register to Ask a Question