When we generated the keys, we were given a vars file to edit as needed
This was the default given us
set_var EASYRSA "/etc/ openvpn / easyrsa "
set_var EASYRSA_PKI " $EASYRSA /pki"
set_var EASYRSA_DN "org "
set_var EASYRSA_REQ_COUNTRY "CA"
set_var EASYRSA_REQ_PROVINCE " myprovince "
set_var EASYRSA_REQ_CITY " mycity "
set_var EASYRSA_REQ_ORG " companyname "
set_var EASYRSA_REQ_EMAIL " MY_EMAIL_ADDRESS "
set_var EASYRSA_REQ_OU " $DEPARTMENT "
# Use Elliptic Curve instead of RSA
set_var EASYRSA_ALGO ec
set_var EASYRSA_CURVE secp521r1
# RootCA expires in 10 years
set_var EASYRSA_CA_EXPIRE 3650
# issued certificates expire in 2 years
set_var EASYRSA_CERT_EXPIRE 730
# Do not support Netscape extensions
set_var EASYRSA_NS_SUPPORT "no"
# Use sha512 cryptographic digest
set_var EASYRSA_DIGEST " sha512 "
I modified this recently to try to correct the issues and used the following instead:
set_var EASYRSA "/etc/ openvpn / easyrsa "
set_var EASYRSA_PKI " $EASYRSA /pki"
set_var EASYRSA_DN "org "
set_var EASYRSA_REQ_COUNTRY "CA"
set_var EASYRSA_REQ_PROVINCE " myprovince "
set_var EASYRSA_REQ_CITY " mycity "
set_var EASYRSA_REQ_ORG " companyname "
set_var EASYRSA_REQ_EMAIL " MY_EMAIL_ADDRESS "
set_var EASYRSA_REQ_OU " DEPARTMENT "
set_var EASYRSA_KEY_SIZE 2048
# Use RSA
set_var EASYRSA_ALGO rsa
# RootCA expires in 10 years
set_var EASYRSA_CA_EXPIRE 3650
# issued certificates expire in 10 years
set_var EASYRSA_CERT_EXPIRE 3650
# Do not support Netscape extensions
set_var EASYRSA_NS_SUPPORT "no"
# Use sha256 cryptographic digest
set_var EASYRSA_DIGEST " sha256 "
Then we ran
easyrsa init-pki
and
easyrsa build-ca
Is there something you would change?
OK, the logs from the camera. I think these are not in order because I think it outputs some stuff then it waits and outputs another blurb at the top of the log window, etc. This is just copy and pasted out of the log window.
SIGTERM[soft,exit-with-notification] received, process exiting
TCP/UDP: CLOSING socket
SIGTERM received, sending exit notification to peer
event_wait : Interrupted system call (code=4)
VERIFY OK: depth=0, C=CA, ST=..., L=..., O=..., OU=..., CN=..., emailAddress=...
VERIFY EKU OK
++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Validating certificate extended key usage
VERIFY KU OK
VERIFY OK: depth=1, C=CA, ST=..., L=...n, O=..., OU=..., CN=..., emailAddress=...
TLS: Initial packet from [AF_INET]123.123.123.123:1194, sid=56fdf206 e373ecde
UDP link remote: [AF_INET]123.123.123.123:1194
UDP link local: (not bound)
Socket Buffers: R=[110592->110592] S=[262144->262144]
TCP/UDP: Preserving recently used remote address: [AF_INET]123.123.123.123:1194
Expected Remote Options String (VER=V4): 'V4,dev-type tun,link-mtu 1558,tun-mtu 1500,proto UDPv4,comp-lzo,cipher AES-256-CBC,auth SHA1,keysize 256,key-method 2,tls-server'
Local Options String (VER=V4): 'V4,dev-type tun,link-mtu 1558,tun-mtu 1500,proto UDPv4,comp-lzo,cipher AES-256-CBC,auth SHA1,keysize 256,key-method 2,tls-client'
Data Channel MTU parms [ L:1622 D:1450 EF:122 EB:406 ET:0 EL:3 ]
Control Channel MTU parms [ L:1622 D:1212 EF:38 EB:0 ET:0 EL:3 ]
LZO compression initializing
Re-using SSL/TLS context
Restart pause, 5 second(s)
SIGUSR1[soft,tls-ERROR] received, process restarting
TCP/UDP: CLOSING socket
TLS ERROR: TLS handshake FAILED
TLS ERROR: TLS key negotiation FAILED to occur within 60 seconds (check your network connectivity)
VERIFY OK: depth=0, {same as above}
VERIFY EKU OK
++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Validating certificate extended key usage
VERIFY KU OK
VERIFY OK: depth=1, {same as above}
TLS: Initial packet from [AF_INET]123.123.123.123:1194, sid=77af0f6b 50187f63
UDP link remote: [AF_INET]123.123.123.123:1194
UDP link local: (not bound)
Socket Buffers: R=[110592->110592] S=[262144->262144]
TCP/UDP: Preserving recently used remote address: [AF_INET]123.123.123.123:1194
Expected Remote Options String (VER=V4): 'V4,dev-type tun,link-mtu 1558,tun-mtu 1500,proto UDPv4,comp-lzo,cipher AES-256-CBC,auth SHA1,keysize 256,key-method 2,tls-server'
Local Options String (VER=V4): 'V4,dev-type tun,link-mtu 1558,tun-mtu 1500,proto UDPv4,comp-lzo,cipher AES-256-CBC,auth SHA1,keysize 256,key-method 2,tls-client'
Data Channel MTU parms [ L:1622 D:1450 EF:122 EB:406 ET:0 EL:3 ]
Control Channel MTU parms [ L:1622 D:1212 EF:38 EB:0 ET:0 EL:3 ]
LZO compression initializing
library versions: OpenSSL 1.0.2k 26 Jan 2017, LZO 2.03
OpenVPN starting up...
auth_user_pass_file = '[UNDEF]'
pull = ENABLED
client = ENABLED
tls_crypt_file = '[UNDEF]'
tls_auth_file = '[UNDEF]'
tls_exit = DISABLED
push_peer_info = DISABLED
single_session = DISABLED
transition_window = 3600
handshake_window = 60
renegotiate_seconds = 3600
renegotiate_packets = 0
renegotiate_bytes = -1
tls_timeout = 2
ssl_flags = 0
remote_cert_eku = 'TLS Web Server Authentication'
remote_cert_ku
= 0
remote_cert_ku = 65535
ns_cert_type = 0
I do not know where all this TLS stuff is coming from.
When the server is started, I see:
openvpn@xyz.service - OpenVPN Robust And Highly Flexible Tunneling Application On xyz
Loaded: loaded (/usr/lib/systemd/system/openvpn@.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2018-05-22 12:33:32 CST; 5s ago
Main PID: 19588 (openvpn)
Status: "Initialization Sequence Completed"
CGroup: /system.slice/system-openvpn.slice/openvpn@xyz.service
└─19588 /usr/sbin/openvpn --cd /etc/openvpn/ --config xyz.conf
May 22 12:33:32 VPN-test-pilot openvpn[19588]: Tue May 22 12:33:32 2018 us=722714 Data Channel MTU parms [ L:1622 D:1450 EF:122 EB:406 ET:0 EL:3 ]
May 22 12:33:32 VPN-test-pilot openvpn[19588]: Tue May 22 12:33:32 2018 us=723488 Socket Buffers: R=[212992->212992] S=[212992->212992]
May 22 12:33:32 VPN-test-pilot openvpn[19588]: Tue May 22 12:33:32 2018 us=723586 UDPv4 link local (bound): [AF_INET][undef]:1194
May 22 12:33:32 VPN-test-pilot openvpn[19588]: Tue May 22 12:33:32 2018 us=723784 UDPv4 link remote: [AF_UNSPEC]
May 22 12:33:32 VPN-test-pilot openvpn[19588]: Tue May 22 12:33:32 2018 us=723803 GID set to nobody
May 22 12:33:32 VPN-test-pilot openvpn[19588]: Tue May 22 12:33:32 2018 us=723816 UID set to nobody
May 22 12:33:32 VPN-test-pilot openvpn[19588]: Tue May 22 12:33:32 2018 us=723840 MULTI: multi_init called, r=256 v=256
May 22 12:33:32 VPN-test-pilot openvpn[19588]: Tue May 22 12:33:32 2018 us=723875 IFCONFIG POOL: base=10.8.0.2 size=4, ipv6=0
May 22 12:33:32 VPN-test-pilot openvpn[19588]: Tue May 22 12:33:32 2018 us=723894 IFCONFIG POOL LIST
May 22 12:33:32 VPN-test-pilot openvpn[19588]: Tue May 22 12:33:32 2018 us=723976 Initialization Sequence Completed
Then when I enable the camera, I get the HMAC error reported above in a previous post.