Menu

Connecting to Azure VPN on MacOS (using certificate)

Help
2019-09-26
2019-09-27
  • Szabo Bence

    Szabo Bence - 2019-09-26

    Hi there!
    Long story short: I would like to connect to my Azure VPN through sstp-client on Mac OS.
    I need to provide a certificate to the Azure's VPN, this way it authenticates me.
    Tried adding the client certificate (which is the same on my windows client which could easily connect to the same vpn), tried converting it to .pem file so the --ca-path can use it. Still not working. Im out of idea whats the problem.

    Please help me somehow.
    This is the logging level 5 log:

    LibreELEC:~ root# /usr/local/sbin/sstpc --user vpn --password vpn --ca-path /usr/local/sbin/leetra.pem --log-stderr azuregateway-92969da7e470.vpn.azure.com usepeerdns require-mschap-v2 noauth noipdefault defaultroute noccp --cert-warn --log-level 5
    Sep 26 15:43:55 sstpc[8017]: Resolved azuregateway-92969da7e470.vpn.azure.com to 51.145.157.42
    Sep 26 15:43:55 sstpc[8017]: Connected to azuregateway-92969da7e470.vpn.azure.com
    Sep 26 15:43:55 sstpc[8017]: SSL certificate verification failed: unable to get local issuer certificate (20)
    Sep 26 15:43:55 sstpc[8017]: Server certificated failed verification, ignoring
    Sep 26 15:43:55 sstpc[8017]: Sending Connect-Request Message
    Sep 26 15:43:55 sstpc[8017]: SEND SSTP CRTL PKT(14) 
    Sep 26 15:43:55 sstpc[8017]:   TYPE(1): CONNECT REQUEST, ATTR(1):
    Sep 26 15:43:55 sstpc[8017]:     ENCAP PROTO(1): 6
    Sep 26 15:43:55 sstpc[8017]: RECV SSTP CRTL PKT(48) 
    Sep 26 15:43:55 sstpc[8017]:   TYPE(2): CONNECT ACK, ATTR(1):
    Sep 26 15:43:55 sstpc[8017]:     CRYPTO BIND REQ(4): 40
    Sep 26 15:43:55 sstpc[8017]: Started PPP Link Negotiation
    Sep 26 15:43:55 sstpc[8017]: SEND SSTP DATA PKT(28) 
    Sep 26 15:43:55 sstpc[8017]:   PPP LCP ID: 1  CONFREQ ASYNCMAP: 00 00 00 00 MAGIC: 0x6BF27783
    Sep 26 15:43:55 sstpc[8017]: RECV SSTP DATA PKT(60) 
    Sep 26 15:43:55 sstpc[8017]:   PPP LCP ID: 0  CONFREQ MRU: 4091 AUTH: EAP MAGIC: 0x0CE40FBC CALLBACK: 06 MRRU: 1614 EPDISC: 01 C7 43 DF 07 19 2E 49 EB 92 D6 07 1B 31 5E 1A 67 00 00 00 00
    Sep 26 15:43:55 sstpc[8017]: SEND SSTP DATA PKT(19) 
    Sep 26 15:43:55 sstpc[8017]:   PPP LCP ID: 0  CONFREJ CALLBACK: 06 MRRU: 1614
    Sep 26 15:43:55 sstpc[8017]: RECV SSTP DATA PKT(28) 
    Sep 26 15:43:55 sstpc[8017]:   PPP LCP ID: 1  CONFACK ASYNCMAP: 00 00 00 00 MAGIC: 0x6BF27783
    Sep 26 15:43:55 sstpc[8017]: RECV SSTP DATA PKT(53) 
    Sep 26 15:43:55 sstpc[8017]:   PPP LCP ID: 1  CONFREQ MRU: 4091 AUTH: EAP MAGIC: 0x0CE40FBC EPDISC: 01 C7 43 DF 07 19 2E 49 EB 92 D6 07 1B 31 5E 1A 67 00 00 00 00
    Sep 26 15:43:55 sstpc[8017]: SEND SSTP DATA PKT(53) 
    Sep 26 15:43:55 sstpc[8017]:   PPP LCP ID: 1  CONFACK MRU: 4091 AUTH: EAP MAGIC: 0x0CE40FBC EPDISC: 01 C7 43 DF 07 19 2E 49 EB 92 D6 07 1B 31 5E 1A 67 00 00 00 00
    Sep 26 15:43:55 sstpc[8017]: RECV SSTP DATA PKT(11) 
    Sep 26 15:43:55 sstpc[8017]:   PPP EAP ID: 0  CONFREQ 0x01 
    Sep 26 15:43:55 sstpc[8017]: SEND SSTP DATA PKT(14) 
    Sep 26 15:43:55 sstpc[8017]:   PPP EAP ID: 0  CONFACK 0x01 0x76 0x70 0x6E 
    Sep 26 15:43:55 sstpc[8017]: RECV SSTP DATA PKT(12) 
    Sep 26 15:43:55 sstpc[8017]:   PPP EAP ID: 1  CONFREQ 0x0D 0x20 
    Sep 26 15:44:07 sstpc[8017]: RECV SSTP DATA PKT(12) 
    Sep 26 15:44:07 sstpc[8017]:   PPP EAP ID: 1  CONFREQ 0x0D 0x20 
    Sep 26 15:44:20 sstpc[8017]: RECV SSTP DATA PKT(12) 
    Sep 26 15:44:20 sstpc[8017]:   PPP EAP ID: 1  CONFREQ 0x0D 0x20 
    Sep 26 15:44:32 sstpc[8017]: RECV SSTP DATA PKT(12) 
    Sep 26 15:44:32 sstpc[8017]:   PPP EAP ID: 1  CONFREQ 0x0D 0x20 
    Sep 26 15:44:44 sstpc[8017]: RECV SSTP DATA PKT(12) 
    Sep 26 15:44:44 sstpc[8017]:   PPP EAP ID: 1  CONFREQ 0x0D 0x20 
    Sep 26 15:44:55 sstpc[8017]: RECV SSTP CRTL PKT(20) 
    Sep 26 15:44:55 sstpc[8017]:   TYPE(5): ABORT, ATTR(1):
    Sep 26 15:44:55 sstpc[8017]:     STATUS INFO(2): 12
    Sep 26 15:44:55 sstpc[8017]: Connection was aborted, Reason was not known
    **Error: Connection was aborted, Reason was not known, (-1)
    LibreELEC:~ root# 
    
     
    • Eivind

      Eivind - 2019-09-27

      Hello,

      The EAP-TLS authentication protocol isn't supported with Apple's version of pppd in combination with sstpc.

      While pppd on Apple is open source, one would need special header and entitlements to compile it.

      Patches has been applied to enable this on Ubuntu. That might be your better option at this point.

      Regards,

      Eivind

      Get Outlook for Android

      On Thu, Sep 26, 2019 at 7:00 AM -0700, "Szabo Bence" bence98007@users.sourceforge.net wrote:

      Hi there!

      Long story short: I would like to connect to my Azure VPN through sstp-client on Mac OS.

      I need to provide a certificate to the Azure's VPN, this way it authenticates me.

      Tried adding the client certificate (which is the same on my windows client which could easily connect to the same vpn), tried converting it to .pem file so the --ca-path can use it. Still not working. Im out of idea whats the problem.

      Please help me somehow.

      This is the logging level 5 log:
      LibreELEC:~ root# /usr/local/sbin/sstpc --user vpn --password vpn --ca-path /usr/local/sbin/leetra.pem --log-stderr azuregateway-92969da7e470.vpn.azure.com usepeerdns require-mschap-v2 noauth noipdefault defaultroute noccp --cert-warn --log-level 5
      Sep 26 15:43:55 sstpc[8017]: Resolved azuregateway-92969da7e470.vpn.azure.com to 51.145.157.42
      Sep 26 15:43:55 sstpc[8017]: Connected to azuregateway-92969da7e470.vpn.azure.com
      Sep 26 15:43:55 sstpc[8017]: SSL certificate verification failed: unable to get local issuer certificate (20)
      Sep 26 15:43:55 sstpc[8017]: Server certificated failed verification, ignoring
      Sep 26 15:43:55 sstpc[8017]: Sending Connect-Request Message
      Sep 26 15:43:55 sstpc[8017]: SEND SSTP CRTL PKT(14)
      Sep 26 15:43:55 sstpc[8017]: TYPE(1): CONNECT REQUEST, ATTR(1):
      Sep 26 15:43:55 sstpc[8017]: ENCAP PROTO(1): 6
      Sep 26 15:43:55 sstpc[8017]: RECV SSTP CRTL PKT(48)
      Sep 26 15:43:55 sstpc[8017]: TYPE(2): CONNECT ACK, ATTR(1):
      Sep 26 15:43:55 sstpc[8017]: CRYPTO BIND REQ(4): 40
      Sep 26 15:43:55 sstpc[8017]: Started PPP Link Negotiation
      Sep 26 15:43:55 sstpc[8017]: SEND SSTP DATA PKT(28)
      Sep 26 15:43:55 sstpc[8017]: PPP LCP ID: 1 CONFREQ ASYNCMAP: 00 00 00 00 MAGIC: 0x6BF27783
      Sep 26 15:43:55 sstpc[8017]: RECV SSTP DATA PKT(60)
      Sep 26 15:43:55 sstpc[8017]: PPP LCP ID: 0 CONFREQ MRU: 4091 AUTH: EAP MAGIC: 0x0CE40FBC CALLBACK: 06 MRRU: 1614 EPDISC: 01 C7 43 DF 07 19 2E 49 EB 92 D6 07 1B 31 5E 1A 67 00 00 00 00
      Sep 26 15:43:55 sstpc[8017]: SEND SSTP DATA PKT(19)
      Sep 26 15:43:55 sstpc[8017]: PPP LCP ID: 0 CONFREJ CALLBACK: 06 MRRU: 1614
      Sep 26 15:43:55 sstpc[8017]: RECV SSTP DATA PKT(28)
      Sep 26 15:43:55 sstpc[8017]: PPP LCP ID: 1 CONFACK ASYNCMAP: 00 00 00 00 MAGIC: 0x6BF27783
      Sep 26 15:43:55 sstpc[8017]: RECV SSTP DATA PKT(53)
      Sep 26 15:43:55 sstpc[8017]: PPP LCP ID: 1 CONFREQ MRU: 4091 AUTH: EAP MAGIC: 0x0CE40FBC EPDISC: 01 C7 43 DF 07 19 2E 49 EB 92 D6 07 1B 31 5E 1A 67 00 00 00 00
      Sep 26 15:43:55 sstpc[8017]: SEND SSTP DATA PKT(53)
      Sep 26 15:43:55 sstpc[8017]: PPP LCP ID: 1 CONFACK MRU: 4091 AUTH: EAP MAGIC: 0x0CE40FBC EPDISC: 01 C7 43 DF 07 19 2E 49 EB 92 D6 07 1B 31 5E 1A 67 00 00 00 00
      Sep 26 15:43:55 sstpc[8017]: RECV SSTP DATA PKT(11)
      Sep 26 15:43:55 sstpc[8017]: PPP EAP ID: 0 CONFREQ 0x01
      Sep 26 15:43:55 sstpc[8017]: SEND SSTP DATA PKT(14)
      Sep 26 15:43:55 sstpc[8017]: PPP EAP ID: 0 CONFACK 0x01 0x76 0x70 0x6E
      Sep 26 15:43:55 sstpc[8017]: RECV SSTP DATA PKT(12)
      Sep 26 15:43:55 sstpc[8017]: PPP EAP ID: 1 CONFREQ 0x0D 0x20
      Sep 26 15:44:07 sstpc[8017]: RECV SSTP DATA PKT(12)
      Sep 26 15:44:07 sstpc[8017]: PPP EAP ID: 1 CONFREQ 0x0D 0x20
      Sep 26 15:44:20 sstpc[8017]: RECV SSTP DATA PKT(12)
      Sep 26 15:44:20 sstpc[8017]: PPP EAP ID: 1 CONFREQ 0x0D 0x20
      Sep 26 15:44:32 sstpc[8017]: RECV SSTP DATA PKT(12)
      Sep 26 15:44:32 sstpc[8017]: PPP EAP ID: 1 CONFREQ 0x0D 0x20
      Sep 26 15:44:44 sstpc[8017]: RECV SSTP DATA PKT(12)
      Sep 26 15:44:44 sstpc[8017]: PPP EAP ID: 1 CONFREQ 0x0D 0x20
      Sep 26 15:44:55 sstpc[8017]: RECV SSTP CRTL PKT(20)
      Sep 26 15:44:55 sstpc[8017]: TYPE(5): ABORT, ATTR(1):
      Sep 26 15:44:55 sstpc[8017]: STATUS INFO(2): 12
      Sep 26 15:44:55 sstpc[8017]: Connection was aborted, Reason was not known
      **Error: Connection was aborted, Reason was not known, (-1)
      LibreELEC:~ root#

      Connecting to Azure VPN on MacOS (using certificate)

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/sstp-client/discussion/1499218/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

Log in to post a comment.