Solved

kill connections

Posted on 2006-06-23
5
5,405 Views
Last Modified: 2012-08-13
I run netstat -a | grep smtp
and I see connections like these :


tcp        0      0 *:smtps                     *:*                         LISTEN
tcp        0      0 *:smtp                 *:*                         LISTEN
tcp        0      0 myserver:47197    spf2.us4.outblaze.com:smtp  ESTABLISHED
tcp        0      0 myserver:47194    spf2.us4.outblaze.com:smtp  ESTABLISHED
tcp        0      0 myserver:smtp     84.95.82.176.cable.012:3974 ESTABLISHED
tcp        0     30 myserver:smtp     bulk.hol.gr:41490           ESTABLISHED
tcp        0      0 myserver:46479    spf6.us4.outblaze.com:smtp  ESTABLISHED
tcp        0      0 myserver:47304    spf6.us4.outblaze.com:smtp  ESTABLISHED
tcp        0      0 myserver:47313    spf6.us4.outblaze.com:smtp  ESTABLISHED
tcp        0      0 myserver:47247    spf6.us4.outblaze.com:smtp  ESTABLISHED
tcp        0      0 myserver:47232    spf6.us4.outblaze.com:smtp  ESTABLISHED
tcp        0      0 myserver:47258    spf6.us4.outblaze.com:smtp  ESTABLISHED
tcp        0      0 myserver:47272    spf6.us4.outblaze.com:smtp  ESTABLISHED
tcp        0      0 myserver:47264    spf6.us4.outblaze.com:smtp  ESTABLISHED

I have added with iptables deny to outgoing and incoming to spf6.us4.outblaze.com
but it still connected.
how can I kill the connections ?



0
Comment
Question by:MaRiOsGR
  • 2
  • 2
5 Comments
 
LVL 14

Expert Comment

by:pablouruguay
ID: 16968328
in this case

service sendmail restart
0
 
LVL 2

Author Comment

by:MaRiOsGR
ID: 16968384
[root@server /]# service sendmail restart
bash: service: command not found
0
 
LVL 2

Author Comment

by:MaRiOsGR
ID: 16968394
I did restart the smtp (qmail) and pop3 server from the panel (plesk) many times but i still see these connections..
is there any way to kill them with some shell command ? just like we can kill a process ?
0
 
LVL 14

Expert Comment

by:pablouruguay
ID: 16968415
no, i guess.
The only way to close this connections is close the service or restart the server.  
0
 
LVL 43

Accepted Solution

by:
ravenpl earned 500 total points
ID: 16968535
run netstat with -p option(get the pid), then kill the process which hold the connection.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now