After issued command to stop pptpd, the pptpd won't stop until all the VPN client has disconnected. The following code shows pptpd is still running after issuing the stop command.

ubuntu@ip-10-138-31-87:~$ sudo /etc/init.d/pptpd stop
Stopping PPTP: pptpd.
ubuntu@ip-10-138-31-87:~$ ps -ef |grep pptpd
root      5524     1  0 21:46 ?        00:00:00 pptpd [<myIp>:8544 - 0000]                                                                                                 
root      5525  5524  0 21:46 pts/1    00:00:00 /usr/sbin/pppd local file /etc/ppp/pptpd-options 115200 192.168.0.1:192.168.0.234 ipparam <myIP> plugin /usr/lib/pptpd/pptpd-logwtmp.so pptpd-original-ip <myIP>
ubuntu    5564  4668  0 21:50 pts/4    00:00:00 grep --color=auto pptpd

After all the active vpn client connections were disconnected mannually, the pptpd then stops. Is there a way that pptpd can be forced to stop even there are active vpn client connections?

link|improve this question
feedback

1 Answer

Spend enough time to script it properly and you should be able to use the tcpkill or the cutter command inside of the init script so that connections are killed off prior to attempting to stop the daemon (assuming you haven't tried using kill command and that there is some form of autorespawn happening here which may be limiting its effectiveness).

http://www.cyberciti.biz/tips/cutting-the-tcpip-network-connection-with-cutter.html http://www.cyberciti.biz/howto/question/linux/kill-tcp-connection-using-linux-netstat.php

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.