{"id":2744,"date":"2026-05-20T16:38:27","date_gmt":"2026-05-20T14:38:27","guid":{"rendered":"http:\/\/clark.tipistrani.it\/?p=2744"},"modified":"2026-05-20T16:38:27","modified_gmt":"2026-05-20T14:38:27","slug":"un-altra-openvpn-su-devuan","status":"publish","type":"post","link":"http:\/\/clark.tipistrani.it\/?p=2744","title":{"rendered":"Un altra openvpn su Devuan"},"content":{"rendered":"<p>Per varie ragioni (principalmente faciloneria da parte mia) nell&#8217;ultima settiman mi sono trovato a dover rifare due macchine la mia WS in ufficio e il mio portatile da combattimento sentiti pareri poco lusinghieri su Debian 13 e quindi su Devuan 6 son rimasto con Devuan 5.<br \/>\nNaturalmente mi son salvato tutte le configurazioni e i files importanti quindi rifatti i due PC ho banalmente copiato il copiabile se funzionava prima funzioner\u00e0 anche adesso ma Mr. Murphy mi ha messo una mano sulla spalla e con un sorriso maligno mi ha detto: &#8220;no mio caro, non funziona cos\u00ec&#8221;<\/p>\n<p>Infatti reinizializzata easi-rsa rigenerati i certificati etc etc etc copio le configurazioni server\/client e non va un bel niente.<br \/>\nIl fatto sconvolgente \u00e8 che invece la VPN ufficiale funziona perfettamente, la mia personale invece no, con poca calma e ancor meno pazienza mi metto a cercare di capire perch\u00e9 tutto funzionava e adesso non funziona pi\u00f9,il problema \u00e8 neanche a farlo apposta tls che \u00e8 non poco cambiato quindi cercando in Internet e andando un po per tentativi perch\u00e9 l&#8217;inerzia mentale \u00e8 un fatto (ma per quale motivo adesso non vai?) ho trovato questa soluzione e gi\u00e0 che c&#8217;ero ho sistemato anche un paio di warnng che ho sempre avuto, lato server avevo questo errore:<\/p>\n<p>2026-05-19 11:45:59 Note: cipher &#8216;AES-256-CBC&#8217; in &#8211;data-ciphers is not supported by ovpn-dco, disabling data channel offload.<br \/>\n2026-05-19 11:45:59 OpenVPN 2.6.3 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH\/PKTINFO] [AEAD] [DCO]<br \/>\n2026-05-19 11:45:59 library versions: OpenSSL 3.0.20 7 Apr 2026, LZO 2.10<br \/>\n2026-05-19 11:45:59 DCO version: N\/A<br \/>\n2026-05-19 11:45:59 net_route_v4_best_gw query: dst 0.0.0.0<br \/>\n2026-05-19 11:45:59 net_route_v4_best_gw result: via 192.168.2.224 dev eth0<br \/>\n2026-05-19 11:45:59 Diffie-Hellman initialized with 2048 bit key<br \/>\n2026-05-19 11:45:59 TUN\/TAP device tun0 opened<br \/>\n2026-05-19 11:45:59 net_iface_mtu_set: mtu 1500 for tun0<br \/>\n2026-05-19 11:45:59 net_iface_up: set tun0 up<br \/>\n2026-05-19 11:45:59 net_addr_v4_add: 172.27.120.1\/24 dev tun0<br \/>\n2026-05-19 11:45:59 Could not determine IPv4\/IPv6 protocol. Using AF_INET<br \/>\n2026-05-19 11:45:59 Socket Buffers: R=[131072-&gt;131072] S=[16384-&gt;16384]<br \/>\n2026-05-19 11:45:59 Listening for incoming TCP connection on [AF_INET][undef]:777<br \/>\n2026-05-19 11:45:59 TCPv4_SERVER link local (bound): [AF_INET][undef]:777<br \/>\n2026-05-19 11:45:59 TCPv4_SERVER link remote: [AF_UNSPEC]<br \/>\n2026-05-19 11:45:59 MULTI: multi_init called, r=256 v=256<br \/>\n2026-05-19 11:45:59 IFCONFIG POOL IPv4: base=172.27.120.2 size=253<br \/>\n2026-05-19 11:45:59 IFCONFIG POOL LIST<br \/>\n2026-05-19 11:45:59 MULTI: TCP INIT maxclients=1024 maxevents=1029<br \/>\n2026-05-19 11:45:59 Initialization Sequence Completed<br \/>\n2026-05-19 11:48:19 TCP connection established with [AF_INET]2.xxx.yyy.3:41644<br \/>\n2026-05-19 11:48:19 2.233.119.3:41644 Authenticate\/Decrypt packet error: packet HMAC authentication failed<br \/>\n2026-05-19 11:48:19 2.xxx.yyy.3:41644 TLS Error: incoming packet authentication failed from [AF_INET]2.xxx.yyy.3:41644<br \/>\n2026-05-19 11:48:19 2.xxx.yyy:41644 Fatal TLS error (check_tls_errors_co), restarting<br \/>\n2026-05-19 11:48:19 2.xxx.yyy.3:41644 SIGUSR1[soft,tls-error] received, client-instance restarting<\/p>\n<p>lato client quest&#8217;altro:<br \/>\n2026-03-25 20:06:56 WARNING: &#8211;ping should normally be used with &#8211;ping-restart or &#8211;ping-exit<br \/>\n2026-03-25 20:06:57 TCP\/UDP: Preserving recently used remote address: [AF_INET]62.97.44.211:777<br \/>\n2026-03-25 20:06:57 Socket Buffers: R=[131072-&gt;131072] S=[16384-&gt;16384]<br \/>\n2026-03-25 20:06:57 Attempting to establish TCP connection with [AF_INET]62.97.44.211:777<br \/>\n2026-03-25 20:06:57 TCP connection established with [AF_INET]62.97.44.211:777<br \/>\n2026-03-25 20:06:57 Socket flags: TCP_NODELAY=1 succeeded<br \/>\n2026-03-25 20:06:57 TCPv4_CLIENT link local: (not bound)<br \/>\n2026-03-25 20:06:57 TCPv4_CLIENT link remote: [AF_INET]62.97.44.211:777<br \/>\n2026-03-25 20:07:57 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)<br \/>\n2026-03-25 20:07:57 TLS Error: TLS handshake failed<br \/>\n2026-03-25 20:07:57 Fatal TLS error (check_tls_errors_co), restarting<br \/>\n2026-03-25 20:07:57 SIGUSR1[soft,tls-error] received, process restarting<br \/>\n2026-03-25 20:07:57 Restart pause, 1 second(s)<\/p>\n<p>configurazione server :<br \/>\nport 777<br \/>\nproto tcp<br \/>\ndev tun<br \/>\nca \u00a0\u00a0\u00a0\u00a0\u00a0\/etc\/openvpn\/easy-rsa\/pki\/ca.crt<br \/>\ncert \u00a0\u00a0\u00a0\/etc\/openvpn\/easy-rsa\/pki\/issued\/server.crt<br \/>\nkey \u00a0\u00a0\u00a0\u00a0\/etc\/openvpn\/easy-rsa\/pki\/private\/server.key<br \/>\ndh \u00a0\u00a0\u00a0\u00a0\u00a0\/etc\/openvpn\/easy-rsa\/pki\/dh.pem<br \/>\ncrl-verify \/etc\/openvpn\/easy-rsa\/pki\/crl.pem<br \/>\ntopology subnet<br \/>\nserver 172.27.120.0 255.255.255.0<br \/>\nifconfig-pool-persist ipp.txt<br \/>\nclient-config-dir \/etc\/openvpn\/ccd<br \/>\ntls-crypt \/etc\/openvpn\/easy-rsa\/pki\/ta.key 0<br \/>\ncipher AES-256-CBC<br \/>\ndata-ciphers AES-256-CBC<br \/>\ndata-ciphers-fallback AES-256-CBC<br \/>\nauth SHA256<br \/>\npersist-key<br \/>\npersist-tun<br \/>\nkeepalive 10 120<br \/>\ntcp-nodelay<br \/>\nstatus \/var\/log\/openvpn\/openvpn-status.log<br \/>\nlog-append \u00a0\/var\/log\/openvpn\/server.log<br \/>\nverb 3<\/p>\n<p>i cambiamenti sono stati topology subnet che era un warning che avevo lato client e che per\u00f2 ha generato un altro problema che vedremo poco pi\u00f9 avanti e<\/p>\n<p>tls-cryp al posto di tls-auth<\/p>\n<p>l&#8217;aggiunta di<\/p>\n<p>data-ciphers AES-256-CBC<br \/>\ndata-ciphers-fallback AES-256-CBC<\/p>\n<p>per onestamente non ho capito bene il perch\u00e9 ma funziona e quindi non mi faccio troppe domande.<\/p>\n<p>configurazione client:<\/p>\n<p>client<br \/>\ndev tun<br \/>\nproto tcp<\/p>\n<p>remote vpn.myfirm.com 777<br \/>\nremote vpn1.myfirm.com 777<br \/>\nresolv-retry 60<br \/>\nnobind<br \/>\npersist-key<br \/>\npersist-tun<\/p>\n<p>cipher AES-256-CBC<br \/>\ndata-ciphers AES-256-CBC<br \/>\ndata-ciphers-fallback AES-256-CBC<br \/>\nremote-cert-tls server<br \/>\nverb 3<br \/>\nauth SHA256<br \/>\nkey-direction 1<br \/>\nauth-nocache<br \/>\nping 10<br \/>\nverb 3<br \/>\nmute 10<br \/>\nsndbuf 0<br \/>\nrcvbuf 0<\/p>\n<p>tcp-nodelay<br \/>\nlog-append \/var\/log\/openvpn\/client.log<br \/>\nstatus \/var\/log\/openvpn\/status.log<\/p>\n<p>&lt;ca&gt;<\/p>\n<p>&#8212;&#8211;BEGIN CERTIFICATE&#8212;&#8211;<\/p>\n<p>il certificato ca<br \/>\n&#8212;&#8211;END CERTIFICATE&#8212;&#8211;<\/p>\n<p>&lt;\/ca&gt;<\/p>\n<p>&lt;tls-crypt&gt;<br \/>\n#<br \/>\n# 2048 bit OpenVPN static key<br \/>\n#<br \/>\n&#8212;&#8211;BEGIN OpenVPN Static key V1&#8212;&#8211;<br \/>\nla chiave ta<br \/>\n&#8212;&#8211;<\/p>\n<p>&#8212;&#8211;END OpenVPN Static key V1&#8212;&#8211;<\/p>\n<p>&lt;\/tls-crypt&gt;<\/p>\n<p>&lt;cert&gt;<br \/>\nil certificato del client<\/p>\n<p>&lt;\/cert&gt;<\/p>\n<p>&lt;key&gt;<\/p>\n<p>la chiave del client<\/p>\n<p>&lt;\/key&gt;<\/p>\n<p>rilancio lato client e come dicevo sopra mi trovo questo errore:<\/p>\n<p>2026-05-20 11:51:01 WARNING: &#8211;ping should normally be used with &#8211;ping-restart or &#8211;ping-exit<br \/>\n2026-05-20 11:51:01 TCP\/UDP: Preserving recently used remote address: [AF_INET]212.xxx.zzz.86:777<br \/>\n2026-05-20 11:51:01 Socket Buffers: R=[131072-&gt;131072] S=[16384-&gt;16384]<br \/>\n2026-05-20 11:51:01 Attempting to establish TCP connection with [AF_INET]212.xxx.zzz.86:777<br \/>\n2026-05-20 11:51:01 TCP connection established with [AF_INET]212.xxx.zzz.86:777<br \/>\n2026-05-20 11:51:01 TCPv4_CLIENT link local: (not bound)<br \/>\n2026-05-20 11:51:01 TCPv4_CLIENT link remote: [AF_INET]212.xxx.zzz.86:777<br \/>\n2026-05-20 11:51:01 TLS: Initial packet from [AF_INET]212.xxx.zzz.86:777, sid=dd347a15 a1f068ca<br \/>\n2026-05-20 11:51:01 VERIFY OK: depth=1, CN=Easy-RSA CA<br \/>\n2026-05-20 11:51:01 VERIFY KU OK<br \/>\n2026-05-20 11:51:01 Validating certificate extended key usage<br \/>\n2026-05-20 11:51:01 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication<br \/>\n2026-05-20 11:51:01 VERIFY EKU OK<br \/>\n2026-05-20 11:51:01 VERIFY OK: depth=0, CN=server<br \/>\n2026-05-20 11:51:01 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, peer certificate: 2048 bit RSA, signature: RSA-SHA256<br \/>\n2026-05-20 11:51:01 [server] Peer Connection Initiated with [AF_INET]212.xxx.zzz.86:777<br \/>\n2026-05-20 11:51:01 TLS: move_session: dest=TM_ACTIVE src=TM_INITIAL reinit_src=1<br \/>\n2026-05-20 11:51:01 TLS: tls_multi_process: initial untrusted session promoted to trusted<br \/>\n2026-05-20 11:51:01 PUSH: Received control message: &#8216;PUSH_REPLY,route-gateway 172.27.120.1,topology subnet,ping 10,ping-restart 120,route 192.168.2.0 255.255.254.0,dhcp-option DOMAIN INTRANET.LAN,dhcp-option DNS 192.168.2.254,dhcp-option DNS 192.168.2.224,ifconfig 172.27.120.10 172.27.120.11,<br \/>\npeer-id 0,cipher AES-256-CBC,protocol-flags cc-exit tls-ekm dyn-tls-crypt,tun-mtu 1500&#8217;<br \/>\n2026-05-20 11:51:01 OPTIONS IMPORT: &#8211;ifconfig\/up options modified<br \/>\n2026-05-20 11:51:01 OPTIONS IMPORT: route options modified<br \/>\n2026-05-20 11:51:01 OPTIONS IMPORT: route-related options modified<br \/>\n2026-05-20 11:51:01 OPTIONS IMPORT: &#8211;ip-win32 and\/or &#8211;dhcp-option options modified<br \/>\n2026-05-20 11:51:01 OPTIONS IMPORT: tun-mtu set to 1500<br \/>\n2026-05-20 11:51:01 net_route_v4_best_gw query: dst 0.0.0.0<br \/>\n2026-05-20 11:51:01 net_route_v4_best_gw result: via 192.168.20.10 dev eth0<br \/>\n2026-05-20 11:51:01 ROUTE_GATEWAY 192.168.20.10\/255.255.255.0 IFACE=eth0 HWADDR=44:8a:5b:84:84:0e<br \/>\n2026-05-20 11:51:01 TUN\/TAP device tun0 opened<br \/>\n2026-05-20 11:51:01 net_iface_mtu_set: mtu 1500 for tun0<br \/>\n2026-05-20 11:51:01 net_iface_up: set tun0 up<br \/>\n2026-05-20 11:51:01 net_addr_v4_add: 172.27.120.10\/-1 dev tun0<br \/>\n2026-05-20 11:51:01 sitnl_send: rtnl: generic error (-22): Invalid argument<br \/>\n2026-05-20 11:51:01 Linux can&#8217;t add IP to interface tun0<br \/>\n2026-05-20 11:51:01 Exiting due to fatal error<\/p>\n<p>Ma come Linux non pu\u00f2 aggiungere l&#8217;ip a tun0????<\/p>\n<p>Anche qui la documentazione non \u00e8 chiarissima ma in un forum ho trovato una spiegazione semplice del fatto, dato che nelle nuove versioni openvpn ha hardcoded topology subnet invece di net30 bisogna cambiare i file nella direcotry ccd<\/p>\n<p>#ifconfig-push 172.27.120.10 172.27.120.11<br \/>\nifconfig-push 172.27.120.10 255.255.255.0<br \/>\npush &#8220;route 192.168.2.0 255.255.254.0&#8221;<br \/>\npush &#8220;dhcp-option DOMAIN INTRANET.LAN&#8221;<br \/>\npush &#8220;dhcp-option DNS 192.168.2.254&#8221;<br \/>\npush &#8220;dhcp-option DNS 192.168.2.224&#8221;<\/p>\n<p>topology subnet si aspetta IP\/SUBNET non IP\/IP cambiato questo e rilanciato la vpn \u00e8 salita senza problemi.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Per varie ragioni (principalmente faciloneria da parte mia) nell&#8217;ultima settiman mi sono trovato a dover rifare due macchine la mia WS in ufficio e il mio portatile da combattimento sentiti pareri poco lusinghieri su Debian 13 e quindi su Devuan 6 son rimasto con Devuan 5. Naturalmente mi son salvato tutte le configurazioni e i [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,14,284],"tags":[136,78,315],"class_list":["post-2744","post","type-post","status-publish","format-standard","hentry","category-linux","category-networking","category-openvpn","tag-devuan","tag-openvpn","tag-tls"],"_links":{"self":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/2744","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2744"}],"version-history":[{"count":1,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/2744\/revisions"}],"predecessor-version":[{"id":2745,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/2744\/revisions\/2745"}],"wp:attachment":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2744"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2744"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}