Menu

SSTP Connection Failed in Ubuntu 12.04

Help
Anas
2012-09-27
2013-01-16
  • Anas

    Anas - 2012-09-27

    Hello,

    I've purchased a SSTP VPN subscription from StrongVPN.com, and followed their step by step instructions here to create the connection. Unfortunately I'm unable to connect in Ubuntu (it works perfectly in Windows 7), I contacted their technical support but they couldn't provide me with real help as they seem lacking Linux expertise.

    Here is what I get in syslog when connection fails:

    Sep 27 16:04:44 ICS NetworkManager[1454]: <info> Starting VPN service 'sstp'...
    Sep 27 16:04:44 ICS NetworkManager[1454]: <info> VPN service 'sstp' started (org.freedesktop.NetworkManager.sstp), PID 15286
    Sep 27 16:04:44 ICS NetworkManager[1454]: <info> VPN service 'sstp' appeared; activating connections
    Sep 27 16:04:44 ICS NetworkManager[1454]: <info> VPN plugin state changed: starting (3)
    Sep 27 16:04:44 ICS pppd[15290]: Plugin /usr/lib/pppd/2.4.5/nm-sstp-pppd-plugin.so loaded.
    Sep 27 16:04:44 ICS NetworkManager[1454]: <info> VPN connection 'StrongVPN' (Connect) reply received.
    Sep 27 16:04:44 ICS pppd[15290]: pppd 2.4.5 started by root, uid 0
    Sep 27 16:04:44 ICS pppd[15290]: Using interface ppp0
    Sep 27 16:04:44 ICS pppd[15290]: Connect: ppp0 <--> /dev/pts/4
    Sep 27 16:04:44 ICS NetworkManager[1454]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
    Sep 27 16:04:44 ICS NetworkManager[1454]:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
    Sep 27 16:04:44 ICS pppd[15290]: Modem hangup
    Sep 27 16:04:44 ICS pppd[15290]: Connection terminated.
    Sep 27 16:04:44 ICS avahi-daemon[1231]: Withdrawing workstation service for ppp0.
    Sep 27 16:04:44 ICS NetworkManager[1454]:    SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
    Sep 27 16:04:44 ICS NetworkManager[1454]: <warn> VPN plugin failed: 1
    Sep 27 16:04:44 ICS pppd[15290]: Exit.
    Sep 27 16:04:44 ICS NetworkManager[1454]: <warn> VPN plugin failed: 1
    Sep 27 16:04:44 ICS NetworkManager[1454]: <warn> VPN plugin failed: 1
    Sep 27 16:04:44 ICS NetworkManager[1454]: <info> VPN plugin state changed: stopped (6)
    Sep 27 16:04:44 ICS NetworkManager[1454]: <info> VPN plugin state change reason: 0
    Sep 27 16:04:44 ICS NetworkManager[1454]: <warn> error disconnecting VPN: Could not process the request because no VPN connection was active.
    Sep 27 16:04:44 ICS NetworkManager[1454]: <info> Policy set 'Silver' (wlan0) as default for IPv4 routing and DNS.
    Sep 27 16:04:49 ICS NetworkManager[1454]: <info> VPN service 'sstp' disappeared
    

    Also here is what I get when I try:  sudo sstpc -log-level 5 -log-stderr -user <username> -password <password> server

    sudo sstpc --log-level 5 --log-stderr --user XXXX --password XXXX vpn-sf40.reliablehosting.com
    [sudo] password for anas: 
    Sep 27 16:09:55 sstpc[15410]: Resolved vpn-sf40.reliablehosting.com to 207.204.224.50
    Sep 27 16:09:55 sstpc[15410]: Connected to vpn-sf40.reliablehosting.com
    Sep 27 16:09:56 sstpc[15410]: The certificate did not match the host: vpn-sf40.reliablehosting.com
    Sep 27 16:09:56 sstpc[15410]: Verification of server certificate failed
    **Error: Verification of server certificate failed, (-2)
    

    I also tried: NM_PPP_DEBUG=1 /usr/lib/NetworkManager/nm-sstp-service -debug and here is the result:

    ** Message: nm-sstp-service (version 0.9.1) starting...
    connection
        name : "connection"
        id : "StrongVPN" (s)
        uuid : "5faf115e-a1a5-4e3c-8e0f-aa9a647ffba1" (s)
        type : "vpn" (s)
        permissions : [] (sd)
        autoconnect : FALSE (s)
        timestamp : 0 (sd)
        read-only : FALSE (sd)
        zone : NULL (sd)
        master : NULL (sd)
        slave-type : NULL (sd)
    vpn
        name : "vpn"
        service-type : "org.freedesktop.NetworkManager.sstp" (s)
        user-name : "anas" (s)
        data : [ { 'lcp-echo-interval': 30 }, { 'password-flags': 1 }, { 'user': XXXX }, { 'uuid': 5faf115e-a1a5-4e3c-8e0f-aa9a647ffba1 }, { 'refuse-chap': yes }, { 'lcp-echo-failure': 5 }, { 'gateway': vpn-sf40.reliablehosting.com }, { 'refuse-pap': yes }, ] (s)
        secrets : [ { 'password': XXXX }, ] (s)
    ipv4
        name : "ipv4"
        method : "auto" (s)
        dns : [134744072 (8.8.8.8), 67373064 (8.8.4.4)] (s)
        dns-search : [] (sd)
        addresses : [] (s)
        routes : [] (s)
        ignore-auto-routes : FALSE (sd)
        ignore-auto-dns : TRUE (s)
        dhcp-client-id : NULL (sd)
        dhcp-send-hostname : TRUE (sd)
        dhcp-hostname : NULL (sd)
        never-default : FALSE (sd)
        may-fail : TRUE (sd)
    Plugin /usr/lib/pppd/2.4.5/nm-sstp-pppd-plugin.so loaded.** Message: pppd started with pid 15464
    ** Message: nm-sstp-ppp-plugin: (plugin_init): initializing
    ** Message: nm-sstp-ppp-plugin: (nm_phasechange): status 3 / phase 'serial connection'
    using channel 18
    Using interface ppp0
    Connect: ppp0 <--> /dev/pts/4
    ** Message: nm-sstp-ppp-plugin: (nm_phasechange): status 5 / phase 'establish'
    /usr/sbin/sstpc: unrecognized option '--uuid'
    Script /usr/sbin/sstpc vpn-sf40.reliablehosting.com  --nolaunchpppd --log-level 4  --ipparam nm-sstp-service-15460 --uuid 5faf115e-a1a5-4e3c-8e0f-aa9a647ffba1  finished (pid 15466), status = 0xff
    Modem hangup
    ** Message: nm-sstp-ppp-plugin: (nm_phasechange): status 11 / phase 'disconnect'
    Connection terminated.
    ** Message: nm-sstp-ppp-plugin: (nm_phasechange): status 1 / phase 'dead'
    ** Message: nm-sstp-ppp-plugin: (nm_exit_notify): cleaning up
    ** (nm-sstp-service:15460): WARNING **: pppd exited with error code 16
    

    Note: I obscured all usernames and passwords.

    Hope I provided enough information to get my problem solved. Thanks in advance :)

     
  • Nobody/Anonymous

    Hi,
    Thank you for trying sstp-client and supporting the project. What happen if you tell sstpc to ignore certificate problems? I believe there is a checkbox in the NetworkManager applet to allow you to do that, or you can run sstpc on command line using -cert-warn (please check with the man page, I might have forgotten the exact option). Running it from command line you can append certain pppd options like debug noauth require-mschap-v2 refuse-eap.

     
  • Anas

    Anas - 2012-09-30

    Hi and sorry for the delay.

    I tried using -cert-warn from the command line, and it did the trick and I was able to connect, BUT a very weird thing happened, although it looked connected, my connections didn't pass through the VPN, I mean when checking my IP (in ipchicken.com for example) it's still the same, also still unable to access blocked websites in my country. Here is a sample log, what do you think?

    sudo sstpc --log-level 5 --log-stderr --cert-warn --user XXX --password XXX vpn-sf40.reliablehosting.com 
    Sep 30 12:10:52 sstpc[3957]: Resolved vpn-sf40.reliablehosting.com to 207.204.224.50
    Sep 30 12:10:52 sstpc[3957]: Connected to vpn-sf40.reliablehosting.com
    Sep 30 12:10:54 sstpc[3957]: The certificate did not match the host: vpn-sf40.reliablehosting.com
    Sep 30 12:10:54 sstpc[3957]: Server certificated failed verification, ignoring
    Sep 30 12:10:54 sstpc[3957]: Sending Connect-Request Message
    Sep 30 12:10:54 sstpc[3957]: SSTP CRTL PKT(14) 
    Sep 30 12:10:54 sstpc[3957]:   TYPE(1): CONNECT REQUEST, ATTR(1):
    Sep 30 12:10:54 sstpc[3957]:     ENCAP PROTO(1): 6
    Sep 30 12:10:54 sstpc[3957]:   0x10 0x01 0x00 0x0e 0x00 0x01 0x00 0x01 0x00 0x01 0x00 0x06 0x00 0x01 
    Sep 30 12:10:54 sstpc[3957]: SSTP CRTL PKT(48) 
    Sep 30 12:10:54 sstpc[3957]:   TYPE(2): CONNECT ACK, ATTR(1):
    Sep 30 12:10:54 sstpc[3957]:     CRYPTO BIND REQ(4): 40
    Sep 30 12:10:54 sstpc[3957]:   0x10 0x01 0x00 0x30 0x00 0x02 0x00 0x01 0x00 0x04 0x00 0x28 0x00 0x00 0x00 0x02 
    Sep 30 12:10:54 sstpc[3957]:   0x2e 0x50 0xdd 0x98 0xc3 0xf4 0x7e 0x02 0x59 0x0b 0xc0 0xa0 0x52 0x1d 0x53 0xde 
    Sep 30 12:10:54 sstpc[3957]:   0x7e 0x6d 0x83 0x99 0x9a 0x8f 0xb4 0xb8 0xc8 0x69 0x5a 0xc4 0x24 0xe2 0xb2 0xef 
    Sep 30 12:10:54 sstpc[3957]: Started PPP Link Negotiation
    Sep 30 12:10:54 sstpc[3957]: SSTP DATA PKT(34) 
    Sep 30 12:10:54 sstpc[3957]:   0x10 0x00 0x00 0x22 0xff 0x03 0xc0 0x21 0x01 0x00 0x00 0x1a 0x01 0x04 0x0f 0xfb 
    Sep 30 12:10:54 sstpc[3957]:   0x03 0x05 0xc2 0x23 0x81 0x05 0x06 0x23 0x31 0x47 0x3b 0x07 0x02 0x08 0x02 0x0d 
    Sep 30 12:10:54 sstpc[3957]:   0x03 0x06 
    Sep 30 12:10:54 sstpc[3957]: SSTP DATA PKT(28) 
    Sep 30 12:10:54 sstpc[3957]:   0x10 0x00 0x00 0x1c 0xff 0x03 0xc0 0x21 0x02 0x01 0x00 0x14 0x02 0x06 0x00 0x00 
    Sep 30 12:10:54 sstpc[3957]:   0x00 0x00 0x05 0x06 0x37 0xea 0x28 0x18 0x07 0x02 0x08 0x02 
    Sep 30 12:10:55 sstpc[3957]: SSTP DATA PKT(31) 
    Sep 30 12:10:55 sstpc[3957]:   0x10 0x00 0x00 0x1f 0xff 0x03 0xc0 0x21 0x01 0x01 0x00 0x17 0x01 0x04 0x0f 0xfb 
    Sep 30 12:10:55 sstpc[3957]:   0x03 0x05 0xc2 0x23 0x81 0x05 0x06 0x23 0x31 0x47 0x3b 0x07 0x02 0x08 0x02 
    Sep 30 12:10:55 sstpc[3957]: SSTP DATA PKT(35) 
    Sep 30 12:10:55 sstpc[3957]:   0x10 0x00 0x00 0x23 0xc2 0x23 0x01 0x00 0x00 0x1d 0x10 0x0f 0x5a 0xdb 0x79 0xb1 
    Sep 30 12:10:55 sstpc[3957]:   0xde 0x42 0x96 0x9b 0x3d 0xe5 0xa2 0x21 0x98 0x77 0x40 0x56 0x50 0x4e 0x2d 0x53 
    Sep 30 12:10:55 sstpc[3957]:   0x46 0x34 0x30 
    Sep 30 12:10:55 sstpc[3957]: Sending Connected Message
    Sep 30 12:10:55 sstpc[3957]: SSTP CRTL PKT(112) 
    Sep 30 12:10:55 sstpc[3957]:   TYPE(4): CONNECTED, ATTR(1):
    Sep 30 12:10:55 sstpc[3957]:     CRYPTO BIND(3): 104
    Sep 30 12:10:55 sstpc[3957]:   0x10 0x01 0x00 0x70 0x00 0x04 0x00 0x01 0x00 0x03 0x00 0x68 0x00 0x00 0x00 0x02 
    Sep 30 12:10:55 sstpc[3957]:   0x2e 0x50 0xdd 0x98 0xc3 0xf4 0x7e 0x02 0x59 0x0b 0xc0 0xa0 0x52 0x1d 0x53 0xde 
    Sep 30 12:10:55 sstpc[3957]:   0x7e 0x6d 0x83 0x99 0x9a 0x8f 0xb4 0xb8 0xc8 0x69 0x5a 0xc4 0x24 0xe2 0xb2 0xef 
    Sep 30 12:10:55 sstpc[3957]:   0x4c 0x54 0x67 0xd7 0x7b 0x7a 0xb1 0xc5 0xaa 0xc5 0x4b 0x36 0xc6 0x10 0x78 0xf9 
    Sep 30 12:10:55 sstpc[3957]:   0x23 0x65 0xb2 0x25 0xc5 0xbf 0xbc 0x7c 0x66 0x3a 0x39 0x8c 0x94 0xf0 0x8f 0xb7 
    Sep 30 12:10:55 sstpc[3957]:   0x72 0x2d 0xd3 0xed 0x1c 0x7e 0xba 0x55 0xe4 0x17 0xc0 0x9f 0xdf 0x91 0xbb 0x43 
    Sep 30 12:10:55 sstpc[3957]:   0xa9 0xfc 0xee 0x20 0x45 0x8d 0x87 0x6c 0x2e 0xd5 0x1b 0x59 0x10 0xc7 0x85 0xa4 
    Sep 30 12:10:55 sstpc[3957]: Connection Established
    Sep 30 12:10:55 sstpc[3957]: SSTP DATA PKT(14) 
    Sep 30 12:10:55 sstpc[3957]:   0x10 0x00 0x00 0x0e 0xc0 0x21 0x0a 0x00 0x00 0x08 0x23 0x31 0x47 0x3b 
    Sep 30 12:10:56 sstpc[3957]: SSTP DATA PKT(52) 
    Sep 30 12:10:56 sstpc[3957]:   0x10 0x00 0x00 0x34 0xc2 0x23 0x03 0x00 0x00 0x2e 0x53 0x3d 0x45 0x38 0x37 0x32 
    Sep 30 12:10:56 sstpc[3957]:   0x39 0x38 0x45 0x41 0x35 0x43 0x30 0x30 0x46 0x37 0x30 0x34 0x36 0x39 0x45 0x41 
    Sep 30 12:10:56 sstpc[3957]:   0x39 0x30 0x36 0x46 0x45 0x39 0x39 0x46 0x37 0x31 0x44 0x43 0x33 0x31 0x35 0x33 
    Sep 30 12:10:56 sstpc[3957]:   0x41 0x34 0x41 0x34 
    Sep 30 12:10:56 sstpc[3957]: SSTP DATA PKT(16) 
    Sep 30 12:10:56 sstpc[3957]:   0x10 0x00 0x00 0x10 0x80 0xfd 0x01 0x03 0x00 0x0a 0x12 0x06 0x01 0x00 0x00 0x01 
    Sep 30 12:10:56 sstpc[3957]: SSTP DATA PKT(16) 
    Sep 30 12:10:56 sstpc[3957]:   0x10 0x00 0x00 0x10 0x80 0x21 0x01 0x04 0x00 0x0a 0x03 0x06 0xcf 0xcc 0xf9 0x81 
    Sep 30 12:10:56 sstpc[3957]: SSTP DATA PKT(21) 
    Sep 30 12:10:56 sstpc[3957]:   0x10 0x00 0x00 0x15 0x80 0xfd 0x04 0x01 0x00 0x0f 0x1a 0x04 0x78 0x00 0x18 0x04 
    Sep 30 12:10:56 sstpc[3957]:   0x78 0x00 0x15 0x03 0x2f 
    Sep 30 12:10:57 sstpc[3957]: SSTP DATA PKT(16) 
    Sep 30 12:10:57 sstpc[3957]:   0x10 0x00 0x00 0x10 0x80 0x21 0x04 0x01 0x00 0x0a 0x02 0x06 0x00 0x2d 0x0f 0x01 
    Sep 30 12:10:57 sstpc[3957]: SSTP DATA PKT(22) 
    Sep 30 12:10:57 sstpc[3957]:   0x10 0x00 0x00 0x16 0x80 0xfd 0x05 0x05 0x00 0x10 0x23 0x31 0x47 0x3b 0x00 0x3c 
    Sep 30 12:10:57 sstpc[3957]:   0xcd 0x74 0x00 0x00 0x02 0xdc 
    Sep 30 12:10:57 sstpc[3957]: SSTP DATA PKT(16) 
    Sep 30 12:10:57 sstpc[3957]:   0x10 0x00 0x00 0x10 0x80 0x21 0x03 0x02 0x00 0x0a 0x03 0x06 0xcf 0xcc 0xf9 0x8a 
    Sep 30 12:10:58 sstpc[3957]: SSTP DATA PKT(16) 
    Sep 30 12:10:58 sstpc[3957]:   0x10 0x00 0x00 0x10 0x80 0x21 0x02 0x03 0x00 0x0a 0x03 0x06 0xcf 0xcc 0xf9 0x8a 
    Sep 30 12:11:00 sstpc[3957]: SSTP DATA PKT(10) 
    Sep 30 12:11:00 sstpc[3957]:   0x10 0x00 0x00 0x0a 0x80 0xfd 0x06 0x02 0x00 0x04 
    Sep 30 12:11:00 sstpc[3957]: SSTP DATA PKT(35) 
    Sep 30 12:11:00 sstpc[3957]:   0x10 0x00 0x00 0x23 0x80 0xfd 0x06 0x03 0x00 0x1d 0x4e 0x6f 0x20 0x63 0x6f 0x6d 
    Sep 30 12:11:00 sstpc[3957]:   0x70 0x72 0x65 0x73 0x73 0x69 0x6f 0x6e 0x20 0x6e 0x65 0x67 0x6f 0x74 0x69 0x61
    
     
  • Nobody/Anonymous

    Looks good, so the -cert-warn resolved it for you. The current problem has to do with routing and that you need a default route for you connection to work. You can append the 'defaultroute' option to the end of the command line and pppd will handle the default route option for you.

    On the other hand, NetworkManager plugin for SSTP already supports to ignore the certificate warning and you can check this box if you trust the site. NetworkManager should automatically handle the default routes for you.

    Good Luck!

     

Log in to post a comment.