I am trying to establish a connection to my Employer's VPN (running on a Sonicwall). I am running Ubuntu 17.04.
But the process is failing somewhere and I really have no idea how to debug it properly. I am a graphic designer by trade, and so a lot of the terminology I am coming across in trying to solve this issue is difficult for me to understand.
Here is what I have so far:
The connection uses a pre shared key.
The info I have from my Employer is as follows:
Code:
IKE (Phase 1) Proposal:
DH Group: Group 2
Encryption: AES-256
Authentication: SHA1
Life Time 9seconds): 43200
Ipsec (Phase 2) Proposal
Protocol: ESP
Encryption: AES-256
Authentication: SHA1
Enable Perfect Forward Secrecy: Off
Life Time (seconds): 43200
I have strongswan installed:
Code:
bvz@t5500-Linux:/etc$ ipsec --version
Linux strongSwan U5.5.1/K4.10.0-30-generic
Institute for Internet Technologies and Applications
University of Applied Sciences Rapperswil, Switzerland
See 'ipsec --copyright' for copyright information.
Here is my ipsec.conf file:
Code:
# ipsec.conf - strongSwan IPsec configuration file
# basic configuration
config setup
# strictcrlpolicy=yes
# uniqueids = no
# Add connections here.
# Sample VPN connections
#conn sample-self-signed
# leftsubnet=10.1.0.0/16
# leftcert=selfCert.der
# leftsendcert=never
# right=192.168.0.2
# rightsubnet=10.2.0.0/16
# rightcert=peerCert.der
# auto=start
#conn sample-with-ca-cert
# leftsubnet=10.1.0.0/16
# leftcert=myCert.pem
# right=192.168.0.2
# rightsubnet=10.2.0.0/16
# rightid="C=CH, O=Linux strongSwan CN=peer name"
# auto=start
conn Employer
authby=psk
auto=add
type=tunnel
esp=aes256-sha1-modp1024
ike=aes256-sha1-modp1024
keyexchange=ikev1
left=192.168.42.91
leftid=192.168.42.91
right=NN.NN.NN.N
rightid=NN.NN.NN.N
Here is my ipsec.secrets file:
Code:
#This file holds shared secrets or RSA private keys for authentication.
# RSA private key for this host, authenticating it to any other host
# which knows the public part.
: PSK <THE_SHARED_KEY>
Here is the output of the ipsec up command:
Code:
bvz@t5500-Linux:~$ sudo ipsec up Employer
initiating Main Mode IKE_SA Employer[1] to NN.NN.NN.N
generating ID_PROT request 0 [ SA V V V V V ]
sending packet: from 192.168.42.91[500] to NN.NN.NN.N[500] (240 bytes)
received packet: from NN.NN.NN.N[500] to 192.168.42.91[500] (116 bytes)
parsed ID_PROT response 0 [ SA V V ]
received unknown vendor ID: 5b:36:2b:c8:20:f6:00:07
received NAT-T (RFC 3947) vendor ID
generating ID_PROT request 0 [ KE No NAT-D NAT-D ]
sending packet: from 192.168.42.91[500] to NN.NN.NN.N[500] (244 bytes)
received packet: from NN.NN.NN.N[500] to 192.168.42.91[500] (276 bytes)
parsed ID_PROT response 0 [ KE NAT-D NAT-D No V V V ]
received unknown vendor ID: 40:4b:f4:39:52:2c:a3:f6
received XAuth vendor ID
received DPD vendor ID
local host is behind NAT, sending keep alives
generating ID_PROT request 0 [ ID HASH N(INITIAL_CONTACT) ]
sending packet: from 192.168.42.91[4500] to NN.NN.NN.N[4500] (108 bytes)
received packet: from NN.NN.NN.N[4500] to 192.168.42.91[4500] (76 bytes)
queueing TRANSACTION request as tasks still active
sending retransmit 1 of request message ID 0, seq 3
sending packet: from 192.168.42.91[4500] to NN.NN.NN.N[4500] (108 bytes)
received packet: from NN.NN.NN.N[4500] to 192.168.42.91[4500] (64 bytes)
payload type ID_V1 was not encrypted
could not decrypt payloads
integrity check failed
generating INFORMATIONAL_V1 request 3360496049 [ HASH N(INVAL_HASH) ]
sending packet: from 192.168.42.91[4500] to NN.NN.NN.N[4500] (76 bytes)
ID_PROT response with message ID 0 processing failed
sending retransmit 2 of request message ID 0, seq 3
sending packet: from 192.168.42.91[4500] to NN.NN.NN.N[4500] (108 bytes)
received packet: from NN.NN.NN.N[4500] to 192.168.42.91[4500] (204 bytes)
parsed INFORMATIONAL_V1 request 1360054657 [ N(INVAL_IKE_SPI) ]
ignoring unprotected INFORMATIONAL from NN.NN.NN.N
message verification failed
ignore malformed INFORMATIONAL request
INFORMATIONAL_V1 request with message ID 1360054657 processing failed
sending retransmit 3 of request message ID 0, seq 3
sending packet: from 192.168.42.91[4500] to NN.NN.NN.N[4500] (108 bytes)
received packet: from NN.NN.NN.N[4500] to 192.168.42.91[4500] (204 bytes)
parsed INFORMATIONAL_V1 request 4082597799 [ N(INVAL_IKE_SPI) ]
ignoring unprotected INFORMATIONAL from NN.NN.NN.N
message verification failed
ignore malformed INFORMATIONAL request
INFORMATIONAL_V1 request with message ID 4082597799 processing failed
sending keep alive to NN.NN.NN.N[4500]
sending retransmit 4 of request message ID 0, seq 3
sending packet: from 192.168.42.91[4500] to NN.NN.NN.N[4500] (108 bytes)
received packet: from NN.NN.NN.N[4500] to 192.168.42.91[4500] (204 bytes)
parsed INFORMATIONAL_V1 request 620371603 [ N(INVAL_IKE_SPI) ]
ignoring unprotected INFORMATIONAL from NN.NN.NN.N
message verification failed
ignore malformed INFORMATIONAL request
INFORMATIONAL_V1 request with message ID 620371603 processing failed
sending keep alive to NN.NN.NN.N[4500]
I am not a sys admin or networking guy. This is as far as I have gotten after about 6 days trying to understand the strongswan docs. Unfortunately, since I have no background in this it is very hard to understand what I am doing wrong (or even how to figure out the error messages above). Is it passing phase 1 but failing on phase 2? Is this an IKEv1 or IKEv2 system? I am guessing it is an IKEv1, but I am not sure. The IT guy at work is just barely keeping his head above water - we are a tiny tiny company and he does not know much about the sonicwall beyond just hitting a few buttons to set it up. Googling "payload type ID_V1 was not encrypted" does not give me much in the way of understanding where in the process it is failing.
Any help whatsoever would be GREATLY appreciated. Even if it is just a nudge in the right direction that will let me focus where to research next. I am really stuck here. Thanks so much!
Edit:
Here is the output of ike-scan
Code:
bvz@t5500-Linux:~$ sudo ike-scan NN.NN.NN.N
Starting ike-scan 1.9 with 1 hosts (http://www.nta-monitor.com/tools/ike-scan/)
NN.NN.NN.N Main Mode Handshake returned HDR=(CKY-R=9c62492336d96d3c) SA=(Enc=3DES Hash=SHA1 Group=2:modp1024 Auth=PSK LifeType=Seconds LifeDuration=28800) VID=5b362bc820f60007
Ending ike-scan 1.9: 1 hosts scanned in 0.031 seconds (32.08 hosts/sec). 1 returned handshake; 0 returned notify
And here is the output of ipsec statusall
Code:
bvz@t5500-Linux:/etc$ sudo ipsec statusall
[sudo] password for bvz:
Status of IKE charon daemon (strongSwan 5.5.1, Linux 4.10.0-30-generic, x86_64):
uptime: 16 minutes, since Aug 10 23:09:27 2017
malloc: sbrk 2433024, mmap 0, used 400576, free 2032448
worker threads: 10 of 16 idle, 6/0/0/0 working, job queue: 0/0/0/0, scheduled: 2
loaded plugins: charon test-vectors aesni aes rc2 sha2 sha1 md4 md5 random nonce x509 revocation constraints pubkey pkcs1 pkcs7 pkcs8 pkcs12 pgp dnskey sshkey pem openssl fips-prf gmp agent xcbc hmac ccm gcm attr kernel-netlink resolve socket-default connmark stroke updown eap-mschapv2 xauth-generic
Listening IP addresses:
192.168.42.91
Connections:
Employer: 192.168.42.91...NN.NN.NN.N IKEv1
Employer: local: [192.168.42.91] uses pre-shared key authentication
Employer: remote: [NN.NN.NN.N] uses pre-shared key authentication
Employer: child: dynamic === dynamic TUNNEL
Security Associations (0 up, 1 connecting):
Employer[1]: CONNECTING, 192.168.42.91[192.168.42.91]...NN.NN.NN.N[%any]
Employer[1]: IKEv1 SPIs: ff7bf965a496d853_i* 59052d323272dc9e_r
Employer[1]: IKE proposal: AES_CBC_256/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_1024
Employer[1]: Tasks queued: QUICK_MODE
Employer[1]: Tasks active: ISAKMP_VENDOR MAIN_MODE