LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Forcefully disconnect or drop users help (https://www.linuxquestions.org/questions/linux-newbie-8/forcefully-disconnect-or-drop-users-help-383276/)

HoOLi 11-15-2005 04:15 AM

Forcefully disconnect or drop users help
 
Greetings,

I have many windows clients hooking into a mandrake server.

I would like to forcefully drop one windows client only known by IP address (at least that's all I can see!) from the mandrake server without affecting service to other clients.

A gui would be nice but a command will be OK

Thanks!

HoOLi

uopjohnson 11-15-2005 06:23 PM

drop in what way? What service are they connected to? You could just block traffic from that machine on your firewall.
iptables -A INPUT -source xx.xxx.xxx.x -j DROP

anomie 11-15-2005 07:48 PM

One option:
Code:

ps -ef | grep 'service_name_here'
From that determine the PID of the offending user and kill it.
Code:

kill PID_here
or to be really forceful
Code:

kill -9 PID_here
If you need to keep him off, you can add his IP to a deny list (in my case I use tcp wrappers, so that would be /etc/hosts.deny). The method from the previous poster should work too, although I don't think it would kill his current session.

uopjohnson 11-15-2005 10:45 PM

Quote:

I don't think it would kill his current session.
Oh yea... true depending on how your firewall is configured. If you allow established connections by default then you will have problems with my suggestion.

HoOLi 11-16-2005 02:30 AM

Thanks guys,

I think uopjohnson's solution using iptables -A INPUT -source xx.xxx.xxx.x -j DROP will do the trick.

The windows clients are passing through the linux box as a proxy to go to a DMZ box. Users per se aren't able to be seen on the linux box as PID's. I know I didn't include that bit!

I have been exposed to windows too much where I could only think of mcc/computer management and browsing session/threads and killing them off that way.

Again thanks a lot! I had forgotten tcpwrappers anomie - I'll pop that snippet backet in the toolbag.

Cheers
HoOLi


All times are GMT -5. The time now is 09:18 PM.