carsonip / cuhk-cse-vpn-ubuntu-scripts

9 stars 2 forks source link

Cannot work on Ubuntu 18.04 #2

Open TDteach opened 4 years ago

TDteach commented 4 years ago

I clone this repo and run the ''install.sh'' on ubuntu 18.04. While, when I run the ''vpn_connect.sh'', it prompts that ''Device ppp0 is not found. Connection failed.'' I wanna ask whether this repo is adapted to ubuntu 18.04

carsonip commented 4 years ago

Hi @TDteach I think I used it on Ubuntu 16.04, so I'm not sure whether it would work on 18.04. Feel free to create a PR.

carsonip commented 4 years ago

Also I'm not sure if https://github.com/carsonip/cuhk-cse-vpn-ubuntu-scripts/pull/1 is related. Please checkout to a earlier point in the repo and see if it works.

TDteach commented 4 years ago

After rolling back to the commit point, "Remove device ppp0'', it still not works. I past the log produced by ''sudo tail -f /var/log/syslog'' at following

''' Jul 22 14:43:26 tdteach charon: 00[DMN] Starting IKE charon daemon (strongSwan 5.6.2, Linux 5.3.0-62-generic, x86_64) Jul 22 14:43:26 tdteach charon: 00[CFG] PKCS11 module '' lacks library path Jul 22 14:43:26 tdteach charon: 00[CFG] disabling load-tester plugin, not configured Jul 22 14:43:26 tdteach charon: 00[LIB] plugin 'load-tester': failed to load - load_tester_plugin_create returned NULL Jul 22 14:43:26 tdteach systemd[1]: Stopping LSB: layer 2 tunelling protocol daemon... Jul 22 14:43:26 tdteach charon: 00[CFG] dnscert plugin is disabled Jul 22 14:43:26 tdteach charon: 00[CFG] ipseckey plugin is disabled Jul 22 14:43:26 tdteach charon: 00[CFG] attr-sql plugin: database URI not set Jul 22 14:43:26 tdteach charon: 00[CFG] loading ca certificates from '/etc/ipsec.d/cacerts' Jul 22 14:43:26 tdteach charon: 00[CFG] loading aa certificates from '/etc/ipsec.d/aacerts' Jul 22 14:43:26 tdteach charon: 00[CFG] loading ocsp signer certificates from '/etc/ipsec.d/ocspcerts' Jul 22 14:43:26 tdteach charon: 00[CFG] loading attribute certificates from '/etc/ipsec.d/acerts' Jul 22 14:43:26 tdteach charon: 00[CFG] loading crls from '/etc/ipsec.d/crls' Jul 22 14:43:26 tdteach charon: 00[CFG] loading secrets from '/etc/ipsec.secrets' Jul 22 14:43:26 tdteach charon: 00[CFG] loading secrets from '/etc/ipsec.d/cse/cse.secrets' Jul 22 14:43:26 tdteach charon: 00[CFG] loaded IKE secret for %any 137.189.88.231 Jul 22 14:43:26 tdteach charon: 00[CFG] loading secrets from '/etc/ipsec.d/nm-l2tp-ipsec-a6489d5e-1754-4794-afe7-05fceea056a7.secrets' Jul 22 14:43:26 tdteach charon: 00[CFG] loaded IKE secret for %any Jul 22 14:43:26 tdteach charon: 00[CFG] loading secrets from '/etc/ipsec.d/nm-l2tp-ipsec-c9de18d8-79a1-46db-a38a-2abf7847a922.secrets' Jul 22 14:43:26 tdteach charon: 00[CFG] loaded IKE secret for %any Jul 22 14:43:26 tdteach charon: 00[CFG] loading secrets from '/etc/ipsec.d/cse/cse.secrets' Jul 22 14:43:26 tdteach charon: 00[CFG] loaded IKE secret for %any 137.189.88.231 Jul 22 14:43:26 tdteach charon: 00[CFG] loading secrets from '/etc/ipsec.d/cse/cse.secrets' Jul 22 14:43:26 tdteach charon: 00[CFG] loaded IKE secret for %any 137.189.88.231 Jul 22 14:43:26 tdteach charon: 00[CFG] sql plugin: database URI not set Jul 22 14:43:26 tdteach charon: 00[CFG] opening triplet file /etc/ipsec.d/triplets.dat failed: No such file or directory Jul 22 14:43:26 tdteach charon: 00[CFG] eap-simaka-sql database URI missing Jul 22 14:43:26 tdteach charon: 00[CFG] loaded 0 RADIUS server configurations Jul 22 14:43:26 tdteach charon: 00[CFG] HA config misses local/remote address Jul 22 14:43:26 tdteach charon: 00[CFG] no threshold configured for systime-fix, disabled Jul 22 14:43:26 tdteach charon: 00[CFG] coupling file path unspecified Jul 22 14:43:26 tdteach charon: 00[LIB] loaded plugins: charon test-vectors unbound ldap pkcs11 tpm aesni aes rc2 sha2 sha1 md4 md5 mgf1 rdrand random nonce x509 revocation constraints acert pubkey pkcs1 pkcs7 pkcs8 pkcs12 pgp dnskey sshkey dnscert ipseckey pem openssl gcrypt af-alg fips-prf gmp curve25519 agent chapoly xcbc cmac hmac ctr ccm gcm ntru bliss curl soup mysql sqlite attr kernel-netlink resolve socket-default connmark farp stroke updown eap-identity eap-sim eap-sim-pcsc eap-aka eap-aka-3gpp2 eap-simaka-pseudonym eap-simaka-reauth eap-md5 eap-gtc eap-mschapv2 eap-dynamic eap-radius eap-tls eap-ttls eap-peap eap-tnc xauth-generic xauth-eap xauth-pam xauth-noauth tnc-tnccs tnccs-20 tnccs-11 tnccs-dynamic dhcp whitelist lookip error-notify certexpire led radattr addrblock unity counters Jul 22 14:43:26 tdteach charon: 00[LIB] dropped capabilities, running as uid 0, gid 0 Jul 22 14:43:26 tdteach charon: 00[JOB] spawning 16 worker threads Jul 22 14:43:26 tdteach xl2tpd[20690]: Stopping xl2tpd: xl2tpd. Jul 22 14:43:26 tdteach systemd[1]: Stopped LSB: layer 2 tunelling protocol daemon. Jul 22 14:43:26 tdteach systemd[1]: Starting LSB: layer 2 tunelling protocol daemon... Jul 22 14:43:26 tdteach xl2tpd[20715]: Not looking for kernel SAref support. Jul 22 14:43:26 tdteach xl2tpd[20715]: Using l2tp kernel support. Jul 22 14:43:26 tdteach xl2tpd[20711]: Starting xl2tpd: xl2tpd. Jul 22 14:43:26 tdteach xl2tpd[20716]: xl2tpd version xl2tpd-1.3.10 started on tdteach PID:20716 Jul 22 14:43:26 tdteach systemd[1]: Started LSB: layer 2 tunelling protocol daemon. Jul 22 14:43:26 tdteach xl2tpd[20716]: Written by Mark Spencer, Copyright (C) 1998, Adtran, Inc. Jul 22 14:43:26 tdteach xl2tpd[20716]: Forked by Scott Balmos and David Stipp, (C) 2001 Jul 22 14:43:26 tdteach xl2tpd[20716]: Inherited by Jeff McAdams, (C) 2002 Jul 22 14:43:26 tdteach xl2tpd[20716]: Forked again by Xelerance (www.xelerance.com) (C) 2006-2016 Jul 22 14:43:26 tdteach xl2tpd[20716]: Listening on IP address 0.0.0.0, port 1701 Jul 22 14:43:26 tdteach charon: 06[CFG] received stroke: add connection 'cse' Jul 22 14:43:26 tdteach charon: 06[CFG] added configuration 'cse' Jul 22 14:43:26 tdteach charon: 07[CFG] received stroke: route 'cse' Jul 22 14:43:27 tdteach xl2tpd[20716]: Connecting to host vpn.cse.cuhk.edu.hk, port 1701 Jul 22 14:43:27 tdteach charon: 09[KNL] creating acquire job for policy 192.168.69.11/32[udp/l2f] === 137.189.88.231/32[udp/l2f] with reqid {1} Jul 22 14:43:27 tdteach charon: 09[IKE] initiating Main Mode IKE_SA cse[1] to 137.189.88.231 Jul 22 14:43:27 tdteach charon: 09[ENC] generating ID_PROT request 0 [ SA V V V V V ] Jul 22 14:43:27 tdteach charon: 09[NET] sending packet: from 192.168.69.11[500] to 137.189.88.231[500] (240 bytes) Jul 22 14:43:27 tdteach charon: 11[NET] received packet: from 137.189.88.231[500] to 192.168.69.11[500] (128 bytes) Jul 22 14:43:27 tdteach charon: 11[ENC] parsed ID_PROT response 0 [ SA V V ] Jul 22 14:43:27 tdteach charon: 11[IKE] received NAT-T (RFC 3947) vendor ID Jul 22 14:43:27 tdteach charon: 11[IKE] received FRAGMENTATION vendor ID Jul 22 14:43:27 tdteach charon: 11[ENC] generating ID_PROT request 0 [ KE No NAT-D NAT-D ] Jul 22 14:43:27 tdteach charon: 11[NET] sending packet: from 192.168.69.11[500] to 137.189.88.231[500] (244 bytes) Jul 22 14:43:27 tdteach charon: 12[NET] received packet: from 137.189.88.231[500] to 192.168.69.11[500] (304 bytes) Jul 22 14:43:27 tdteach charon: 12[ENC] parsed ID_PROT response 0 [ KE No V V V V NAT-D NAT-D ] Jul 22 14:43:27 tdteach charon: 12[IKE] received Cisco Unity vendor ID Jul 22 14:43:27 tdteach charon: 12[IKE] received XAuth vendor ID Jul 22 14:43:27 tdteach charon: 12[ENC] received unknown vendor ID: 1eab6e:7f:a0:3d:09:57:84:77:4c:d0:2b:93:05:b0 Jul 22 14:43:27 tdteach charon: 12[ENC] received unknown vendor ID: 1f:07:f7:0e:aa:65:14:d3:b0:fa:96:54:2a:50:01:00 Jul 22 14:43:27 tdteach charon: 12[IKE] local host is behind NAT, sending keep alives Jul 22 14:43:27 tdteach charon: 12[ENC] generating ID_PROT request 0 [ ID HASH N(INITIAL_CONTACT) ] Jul 22 14:43:27 tdteach charon: 12[NET] sending packet: from 192.168.69.11[4500] to 137.189.88.231[4500] (108 bytes) Jul 22 14:43:27 tdteach charon: 13[NET] received packet: from 137.189.88.231[4500] to 192.168.69.11[4500] (92 bytes) Jul 22 14:43:27 tdteach charon: 13[ENC] parsed ID_PROT response 0 [ ID HASH V ] Jul 22 14:43:27 tdteach charon: 13[IKE] received DPD vendor ID Jul 22 14:43:27 tdteach charon: 13[IKE] IKE_SA cse[1] established between 192.168.69.11[192.168.69.11]...137.189.88.231[137.189.88.231] Jul 22 14:43:27 tdteach charon: 13[IKE] scheduling reauthentication in 27777s Jul 22 14:43:27 tdteach charon: 13[IKE] maximum IKE_SA lifetime 28317s Jul 22 14:43:27 tdteach charon: 13[ENC] generating QUICK_MODE request 4145988485 [ HASH SA No ID ID NAT-OA NAT-OA ] Jul 22 14:43:27 tdteach charon: 13[NET] sending packet: from 192.168.69.11[4500] to 137.189.88.231[4500] (204 bytes) Jul 22 14:43:27 tdteach charon: 14[NET] received packet: from 137.189.88.231[4500] to 192.168.69.11[4500] (92 bytes) Jul 22 14:43:27 tdteach charon: 14[ENC] parsed INFORMATIONAL_V1 request 3141395788 [ HASH N(NO_PROP) ] Jul 22 14:43:27 tdteach charon: 14[IKE] received NO_PROPOSAL_CHOSEN error notify Jul 22 14:43:27 tdteach charon: 15[NET] received packet: from 137.189.88.231[4500] to 192.168.69.11[4500] (92 bytes) Jul 22 14:43:27 tdteach charon: 15[ENC] parsed INFORMATIONAL_V1 request 1443108629 [ HASH D ] Jul 22 14:43:27 tdteach charon: 15[IKE] received DELETE for IKE_SA cse[1] Jul 22 14:43:27 tdteach charon: 15[IKE] deleting IKE_SA cse[1] between 192.168.69.11[192.168.69.11]...137.189.88.231[137.189.88.231] Jul 22 14:43:58 tdteach xl2tpd[20716]: Maximum retries exceeded for tunnel 42089. Closing. Jul 22 14:43:58 tdteach xl2tpd[20716]: Connection 0 closed to 137.189.88.231, port 1701 (Timeout) Jul 22 14:44:29 tdteach xl2tpd[20716]: Unable to deliver closing message for tunnel 42089. Destroying anyway. '''

carsonip commented 4 years ago

Please try to rollback to 92a18ae1be41aeb8ea88422fa9d82fdb512b7f8f. Also I'm not sure how I could help you if that doesn't fix it for you.