hwdsl2 / setup-ipsec-vpn

Scripts to build your own IPsec VPN server, with IPsec/L2TP, Cisco IPsec and IKEv2
Other
25.12k stars 6.31k forks source link

xl2tpd Cannot restart,Because there is no restart command #272

Closed fengerwoo closed 6 years ago

fengerwoo commented 6 years ago

root@ubuntu:/etc/ppp# ipsec restart
Redirecting to: systemctl stop ipsec.service
Redirecting to: systemctl start ipsec.service
root@ubuntu:/etc/ppp# xl2tpd restart

xl2tpd version:  xl2tpd-1.3.6
Usage: xl2tpd [-c ] [-s ] [-p ]
              [-C ] [-D]
              [-v, --version]

root@ubuntu:/etc/ppp#

hwdsl2 commented 6 years ago

@DreamboyA Try: service ipsec restart and service xl2tpd restart.

fengerwoo commented 6 years ago

Command error ,service xl2tpd restart


root@ubuntu:/etc/ppp# service ipsec restart
root@ubuntu:/etc/ppp# service xl2tpd restart
Job for xl2tpd.service failed because the control process exited with error code. See "systemctl status xl2tpd.service" and "journalctl -xe" for details.
root@ubuntu:/etc/ppp#

hwdsl2 commented 6 years ago

@DreamboyA What is the output of systemctl status xl2tpd.service?

fengerwoo commented 6 years ago

@hwdsl2


root@ubuntu:~# systemctl status xl2tpd.service
● xl2tpd.service - LSB: layer 2 tunelling protocol daemon
   Loaded: loaded (/etc/init.d/xl2tpd; bad; vendor preset: enabled)
   Active: active (running) since Tue 2017-11-14 23:04:59 EST; 18s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2765 ExecStop=/etc/init.d/xl2tpd stop (code=exited, status=0/SUCCESS)
  Process: 2774 ExecStart=/etc/init.d/xl2tpd start (code=exited, status=0/SUCCESS)
    Tasks: 1
   Memory: 132.0K
      CPU: 5ms
   CGroup: /system.slice/xl2tpd.service
           └─2781 /usr/sbin/xl2tpd

Nov 14 23:04:59 ubuntu xl2tpd[2780]: setsockopt recvref[30]: Protocol not available
Nov 14 23:04:59 ubuntu xl2tpd[2780]: Using l2tp kernel support.
Nov 14 23:04:59 ubuntu xl2tpd[2774]: Starting xl2tpd: xl2tpd.
Nov 14 23:04:59 ubuntu xl2tpd[2781]: xl2tpd version xl2tpd-1.3.6 started on ubuntu PID:2781
Nov 14 23:04:59 ubuntu xl2tpd[2781]: Written by Mark Spencer, Copyright (C) 1998, Adtran, Inc.
Nov 14 23:04:59 ubuntu xl2tpd[2781]: Forked by Scott Balmos and David Stipp, (C) 2001
Nov 14 23:04:59 ubuntu xl2tpd[2781]: Inherited by Jeff McAdams, (C) 2002
Nov 14 23:04:59 ubuntu systemd[1]: Started LSB: layer 2 tunelling protocol daemon.
Nov 14 23:04:59 ubuntu xl2tpd[2781]: Forked again by Xelerance (www.xelerance.com) (C) 2006
Nov 14 23:04:59 ubuntu xl2tpd[2781]: Listening on IP address 0.0.0.0, port 1701
root@ubuntu:~#

hwdsl2 commented 6 years ago

@DreamboyA The output you posted look fine. And the xl2tpd service seems to be running. Are you able to connect to the VPN? If not, also check the output of grep xl2tpd /var/log/syslog.

fengerwoo commented 6 years ago

@hwdsl2 The server was restarted and no error was reported,But the client can't connect。I'm on the mainland of China

hwdsl2 commented 6 years ago

@DreamboyA It seems that the server is running fine. Unfortunately I don't have further suggestions for you based on the information provided. Maybe you can look into alternatives such as Shadowsocks.

fengerwoo commented 6 years ago

@hwdsl2 Thank you very much! Where are you from?