Linux Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOperating SystemsLinux Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 23rd, 2002, 08:52 PM
pentium5 pentium5 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: entlegen
Posts: 442 pentium5 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
how to kill an IP who is browsing / download in apache server???

how to kill an IP who is browsing / download ??


if shutdown -r now or shutdown -h now, it is taking care "HACKER of the Notorious", but for "baby hacker". I want to kill that IP in a linux command.

I do not wish to restart httpd!!!!!!!!!!


any bright ideas are welcome!!!!
__________________
regards,

wish to use AT 89c51 single chip computer to do remote sensing and send the data back from woods to office via nokie 3330 and internet. HOW?
first I must revise C program thro' example, what's next?

Reply With Quote
  #2  
Old January 23rd, 2002, 08:56 PM
Hero Zzyzzx's Avatar
Hero Zzyzzx Hero Zzyzzx is offline
11
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2001
Location: Lynn, MA
Posts: 4,635 Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 4 Days 23 h 44 m 19 sec
Reputation Power: 81
Send a message via AIM to Hero Zzyzzx
Why this topic again? This is like the third time you've asked.

Go read about ipchains / iptables. It should be trivial to add a rule on a case-by-case basis from the command line.

Reply With Quote
  #3  
Old January 25th, 2002, 12:48 AM
BlurZero BlurZero is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Location: Edmonton, AB, Canada
Posts: 44 BlurZero User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
Send a message via ICQ to BlurZero
A quick iptables based solution may be something along the lines of:
Code:
iptables -A INPUT -p tcp -s the.ip.address.toblock -j REJECT --reject-with icmp-port-unreachable

That'll prevent them from connecting to any service on your box... assuming you're running linux, with iptables.

You could probably do something in an .htaccess file too... but that would only prevent connections to apache, not other services.

Reply With Quote
  #4  
Old January 25th, 2002, 02:15 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
First off, I don't know anything about iptables, since ipfilter is far more robust and mature.

>> REJECT --reject-with icmp-port-unreachable

That would be appropriate for udp packets. Echo reply with port-unr for TCP reveals to the other end that your port is actually open, which is an extremely bad way for any packet filter ruleset. The proper/secure way is to reply with RESET, in ipfilter, that's return-rst.

I am not sure if iptables supports dynamic rulesets. In ipfilter, I can insert dynamic rule on-the-fly to my 1st rule or group, without reloading my entire static rulesets. Of course, to make it permanent, I can insert it to my /etc/ipf.rules and reload it. This could be a way to avoid DOS attack to Apache, but it's somewhat expensive to really implement it.

Reply With Quote
  #5  
Old January 25th, 2002, 03:08 AM
BlurZero BlurZero is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Location: Edmonton, AB, Canada
Posts: 44 BlurZero User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
Send a message via ICQ to BlurZero
freebsd,

That's good stuff to know - I didn't realize that using port unreachable for tcp revealed that the port was open.

Yes, iptables does support dynamic rules (if we're thinking of the same thing).

Reply With Quote
  #6  
Old January 25th, 2002, 03:21 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
auth/ident (tcp port 113) is a good example. If your ruleset blocks it without a reply or reply with port unreachable, that doesn't stop the timeout.
The proper way is to send a TCP RESET so it doesn't timeout at all. This is true for all tcp on any port (listening/not listening).

Reply With Quote
  #7  
Old February 16th, 2002, 05:59 AM
pentium5 pentium5 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: entlegen
Posts: 442 pentium5 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
can u put it in more simple and direct comand, so that I can tried out what u said.

I must again I am a newbie and depsite I have made a running working site. I still have many things to learn.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsLinux Help > how to kill an IP who is browsing / download in apache server???

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap