The VPN used for bypassing the Great Firewall, which was set up using a VPS, frequently experiences disconnections and connection failures (error 619, etc.) after the latest system upgrade. After investigating the system logs (syslog) on Linux, it was found that the following log content appears every time a connection fails:
GRE: read(fd=6,buffer=80504c0,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs CTRL: PTY read or GRE write failed (pty,gre)=(6,7) CTRL: Reaping child PPP[13354] CTRL: Client XXX.XXX.XXX.XXX control connection finished
Initially, it was thought that there was an issue with GRE, but after checking the upgrade logs, it was found that GRE was not upgraded. Later, a solution was found through Google and Baidu. Here are the steps:
- Enable debug mode by modifying the /etc/ppp/pptp-options file. Find the following lines:
#debug
#dump
Remove the comment symbol at the beginning of the lines. Restart the pptpd service to enter debug mode.
- After analyzing the logs, it was found that the issue was caused by a version mismatch between logwtmp and pptpd. Open the /etc/pptpd.conf file and find the following line:
logwtmp
Comment out the logwtmp line, then restart pptpd. After reconnecting, everything should return to normal.
- Finally, if your server has proxyarp enabled, don't forget to run "arp -d" after each abnormal disconnection.
#windows
arp -d
#linux
sudo arp -d -a