2

Possible Duplicate:
How do I break an arbitrary TCP/IP connection on Linux?

I want to close the socket connection cretead for some clients in server machine i want to do this using command line. I know only port and ip of client

plz let me know any command in linux

Community
  • 1
  • 1
Syedsma
  • 1,183
  • 5
  • 17
  • 22

1 Answers1

1

Something like this

tcpkill -i eth0 host 192.168.1.100 port 8080
Rasive
  • 1,143
  • 1
  • 8
  • 20
  • tcpkill is not present in linux , its external tool – Syedsma Nov 26 '11 at 13:26
  • @Syedsma: tcpkill is not standard. iptables -t filter -A INPUT -p tcp -i eth0 -m tcp --dport 8080 -j DROP should do the trick – RedComet Nov 26 '11 at 13:42
  • 1
    @RedComet i could not kill open connections with this command. i tried it like: 'sudo iptables -t filter -A INPUT -p tcp -i eth0 -m tcp --dport 27017 -j DROP' this to kill all tcp connections going out on port 27017 (or coming in?) a 'netstat -anp | grep :27017' still showed the open connections. what am i doing wrong? – atripes Feb 01 '13 at 17:34