Hello Traffic and thanks for your answer.
I read the the article you've linked, and if I understand it correctly, I only have to use the intermediate CA's for the ca file in order to only accept certificates signed by this intermediate CA. I've tried this and couldn't establish a connection even if all files were from the same CA. I have the following logs from this test.
Server:
Wed Feb 24 08:47:10 2016 us=886320 MULTI: multi_create_instance called
Wed Feb 24 08:47:10 2016 us=886385 192.168.1.4:1194 Re-using SSL/TLS context
Wed Feb 24 08:47:10 2016 us=886418 192.168.1.4:1194 LZO compression initialized
Wed Feb 24 08:47:10 2016 us=886517 192.168.1.4:1194 Control Channel MTU parms [ L:1558 D:166 EF:66 EB:0 ET:0 EL:3 ]
Wed Feb 24 08:47:10 2016 us=886544 192.168.1.4:1194 Data Channel MTU parms [ L:1558 D:1450 EF:58 EB:143 ET:0 EL:3 AF:3/1 ]
Wed Feb 24 08:47:10 2016 us=886578 192.168.1.4:1194 Local Options String: 'V4,dev-type tun,link-mtu 1558,tun-mtu 1500,proto UDPv4,comp-lzo,keydir 0,cipher AES-256-CBC,auth SHA1,keysize 256,tls-auth,key-method 2,tls-server'
Wed Feb 24 08:47:10 2016 us=886589 192.168.1.4:1194 Expected Remote Options String: 'V4,dev-type tun,link-mtu 1558,tun-mtu 1500,proto UDPv4,comp-lzo,keydir 1,cipher AES-256-CBC,auth SHA1,keysize 256,tls-auth,key-method 2,tls-client'
Wed Feb 24 08:47:10 2016 us=886610 192.168.1.4:1194 Local Options hash (VER=V4): '162b04de'
Wed Feb 24 08:47:10 2016 us=886635 192.168.1.4:1194 Expected Remote Options hash (VER=V4): '9e7066d2'
Wed Feb 24 08:47:10 2016 us=886666 192.168.1.4:1194 TLS: Initial packet from [AF_INET]192.168.1.4:1194, sid=f05c137f 8c7e7105
Wed Feb 24 08:47:12 2016 us=974968 192.168.1.4:1194 TLS: new session incoming connection from [AF_INET]192.168.1.4:1194
Wed Feb 24 08:47:15 2016 us=90804 192.168.1.4:1194 TLS: new session incoming connection from [AF_INET]192.168.1.4:1194
Client:
Wed Feb 24 09:47:13 2016 us=88093 Restart pause, 2 second(s)
Wed Feb 24 09:47:15 2016 us=89000 WARNING: file '/home/ovpn-gast1/Schreibtisch/intermediate-2/inter1/client1.key' is group or others accessible
Wed Feb 24 09:47:15 2016 us=89538 WARNING: file '/home/ovpn-gast1/Schreibtisch/intermediate-2/ta.key' is group or others accessible
Wed Feb 24 09:47:15 2016 us=89566 Control Channel Authentication: using '/home/ovpn-gast1/Schreibtisch/intermediate-2/ta.key' as a OpenVPN static key file
Wed Feb 24 09:47:15 2016 us=89589 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Feb 24 09:47:15 2016 us=89607 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Feb 24 09:47:15 2016 us=89635 LZO compression initialized
Wed Feb 24 09:47:15 2016 us=89724 Control Channel MTU parms [ L:1558 D:166 EF:66 EB:0 ET:0 EL:3 ]
Wed Feb 24 09:47:15 2016 us=89794 Socket Buffers: R=[212992->131072] S=[212992->131072]
Wed Feb 24 09:47:15 2016 us=89849 Data Channel MTU parms [ L:1558 D:1450 EF:58 EB:143 ET:0 EL:3 AF:3/1 ]
Wed Feb 24 09:47:15 2016 us=89905 Local Options String: 'V4,dev-type tun,link-mtu 1558,tun-mtu 1500,proto UDPv4,comp-lzo,keydir 1,cipher AES-256-CBC,auth SHA1,keysize 256,tls-auth,key-method 2,tls-client'
Wed Feb 24 09:47:15 2016 us=89932 Expected Remote Options String: 'V4,dev-type tun,link-mtu 1558,tun-mtu 1500,proto UDPv4,comp-lzo,keydir 0,cipher AES-256-CBC,auth SHA1,keysize 256,tls-auth,key-method 2,tls-server'
Wed Feb 24 09:47:15 2016 us=89960 Local Options hash (VER=V4): '9e7066d2'
Wed Feb 24 09:47:15 2016 us=89984 Expected Remote Options hash (VER=V4): '162b04de'
Wed Feb 24 09:47:15 2016 us=90003 UDPv4 link local (bound): [undef]
Wed Feb 24 09:47:15 2016 us=90022 UDPv4 link remote: [AF_INET]192.168.1.5:1194
Wed Feb 24 09:47:15 2016 us=91940 TLS Error: Unroutable control packet received from [AF_INET]192.168.1.5:1194 (si=3 op=P_CONTROL_V1)
Wed Feb 24 09:47:15 2016 us=92348 TLS Error: Unroutable control packet received from [AF_INET]192.168.1.5:1194 (si=3 op=P_CONTROL_V1)
Wed Feb 24 09:47:16 2016 us=151658 TLS Error: Unroutable control packet received from [AF_INET]192.168.1.5:1194 (si=3 op=P_CONTROL_V1)
Wed Feb 24 09:47:16 2016 us=151818 TLS Error: Unroutable control packet received from [AF_INET]192.168.1.5:1194 (si=3 op=P_CONTROL_V1)
Wed Feb 24 09:47:17 2016 us=212183 TLS Error: Unroutable control packet received from [AF_INET]192.168.1.5:1194 (si=3 op=P_CONTROL_V1)
Wed Feb 24 09:47:17 2016 us=212736 TLS Error: Unroutable control packet received from [AF_INET]192.168.1.5:1194 (si=3 op=P_CONTROL_V1)
Wed Feb 24 09:47:17 2016 us=213779 TLS Error: Unroutable control packet received from [AF_INET]192.168.1.5:1194 (si=3 op=P_ACK_V1)
Wed Feb 24 09:47:18 2016 us=273386 TLS Error: Unroutable control packet received from [AF_INET]192.168.1.5:1194 (si=3 op=P_CONTROL_V1)
Wed Feb 24 09:47:18 2016 us=273554 TLS Error: Unroutable control packet received from [AF_INET]192.168.1.5:1194 (si=3 op=P_CONTROL_V1)
Wed Feb 24 09:47:19 2016 us=333571 TLS Error: Unroutable control packet received from [AF_INET]192.168.1.5:1194 (si=3 op=P_CONTROL_V1)
Wed Feb 24 09:47:19 2016 us=333672 TLS Error: Unroutable control packet received from [AF_INET]192.168.1.5:1194 (si=3 op=P_CONTROL_V1)
Wed Feb 24 09:47:20 2016 us=394375 TLS Error: Unroutable control packet received from [AF_INET]192.168.1.5:1194 (si=3 op=P_CONTROL_V1)
Wed Feb 24 09:47:21 2016 us=487326 TLS Error: Unroutable control packet received from [AF_INET]192.168.1.5:1194 (si=3 op=P_CONTROL_V1)
Wed Feb 24 09:47:21 2016 us=491011 TLS Error: Unroutable control packet received from [AF_INET]192.168.1.5:1194 (si=3 op=P_ACK_V1)
Wed Feb 24 09:47:22 2016 us=583219 TLS Error: Unroutable control packet received from [AF_INET]192.168.1.5:1194 (si=3 op=P_CONTROL_V1)
Wed Feb 24 09:47:24 2016 us=767264 TLS Error: Unroutable control packet received from [AF_INET]192.168.1.5:1194 (si=3 op=P_CONTROL_V1)
Wed Feb 24 09:47:25 2016 us=860572 TLS Error: Unroutable control packet received from [AF_INET]192.168.1.5:1194 (si=3 op=P_CONTROL_V1)
Wed Feb 24 09:47:26 2016 us=955180 TLS Error: Unroutable control packet received from [AF_INET]192.168.1.5:1194 (si=3 op=P_CONTROL_V1)
Wed Feb 24 09:47:27 2016 us=304967 event_wait : Interrupted system call (code=4)
Wed Feb 24 09:47:27 2016 us=305080 TCP/UDP: Closing socket
Wed Feb 24 09:47:27 2016 us=305883 SIGINT[hard,] received, process exiting
The ccd-exclusive command works perfectly. So I won't have to deal with scripts. Thank you for that 😃 . I still would really like to know if I'm right with the certificates. Should it work the way I said above?