Solved

kill connections

Posted on 2006-06-23
5
5,407 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

Superior storage. Superior surveillance.

WD Purple drives are built for 24/7, always-on, high-definition security systems. With support for up to 8 hard drives and 32 cameras, WD Purple drives are optimized for surveillance.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 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

18 Experts available now in Live!

Get 1:1 Help Now