Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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

share|improve this answer
killall pppd

This will obviously kill all ppp connections including the pptp clients

In these days i think we all do not use ppp dialups so you will not risk interrupting any active internet conenction so this should o for you.

Or, you can do a

ps -aux | grep ppp

and get a list of pid's associated with the pptp connections and kill them manually one by one.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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