{"id":3215,"date":"2019-04-27T19:55:32","date_gmt":"2019-04-27T11:55:32","guid":{"rendered":"https:\/\/www.ookangzheng.com\/?p=3215"},"modified":"2020-09-05T13:36:28","modified_gmt":"2020-09-05T05:36:28","slug":"use-tls1-3-with-ocserv-anyconnect-on-debian","status":"publish","type":"post","link":"https:\/\/www.ookangzheng.com\/use-tls1-3-with-ocserv-anyconnect-on-debian\/","title":{"rendered":"Use TLS1.3 with Ocserv anyconnect on Debian"},"content":{"rendered":"\n

I already use ocserv<\/code> Anyconnect on my Debian Bust for a couple of months. Now I want to try to upgrade Ocserv to support TLS1.3, So I decided to have a try and below are my result ~~ Enjoy<\/p>\n\n\n\n

Upgrade your <\/strong>gnutls-bin<\/strong><\/code> to 3.6.7 <\/strong><\/p>\n\n\n\n

\/\/ Install related dependencies \n\/\/ Updated June 23,2019\n\napt install libgnutls-dane0=3.6.7-4 libgnutls30=3.6.7-4 libunbound8=1.9.0-2 libc6=2.28-10 libhogweed4=3.4.1-1 libidn2-0=2.0.5-1 libnettle6=3.4.1-1 libp11-kit0=0.23.15-2 libtasn1-6=4.13-3 libunistring2=0.9.10-1\n\n\/\/ Make sure `gnutls-bin` is up to date\napt upgrade gnutls-bin\n<\/code><\/pre>\n\n\n\n

If you got <\/strong>libc-bin error<\/strong><\/code> here are my solution<\/strong><\/p>\n\n\n\n

ERROR: \ndpkg: warning: 'ldconfig' not found in PATH or not executable.\ndpkg: 2 expected program(s) not found in PATH or not executable.\nNB: root's PATH should usually contain \/usr\/local\/sbin, \/usr\/sbin and \/sbin.\n\nSOLUTION:\nnano \/root\/.bashrc\n\n\/\/ inside .bashrc last line paste this \nexport PATH=\/sbin:\/bin:\/usr\/bin:\/usr\/sbin:\/usr\/local\/sbin:\/usr\/local\/bin\n\n\/\/ Save and restart\nsource \/root\/.bashrc\n\n\/\/ Resintall libc-bin\nwget http:\/\/ftp.jp.debian.org\/debian\/pool\/main\/g\/glibc\/libc-bin_2.24-11+deb9u4_amd64.deb\n\ndpkg -x libc-bin*.deb unpackdir\/\ncd unpackdir\/sbin\/\ncp ldconfig \/sbin\/\napt install libc-bin\n\napt policy libc6 \/\/ If it said you need to have version >= 2.2x\n\/\/ do this\n\napt install libc6=2.28-10<\/code><\/pre>\n\n\n\n

Install latest <\/strong>ocserv<\/strong><\/code> version <\/strong><\/p>\n\n\n\n

\/\/ check version \napt policy ocserv\n\/\/ return\nocserv:\n  Installed: 0.12.2-3\n  Candidate: 0.12.2-3\n  Version table:\n *** 0.12.2-3 100\n         90 http:\/\/deb.debian.org\/debian sid\/main amd64 Packages\n         90 http:\/\/deb.debian.org\/debian unstable\/main amd64 Packages\n        100 \/var\/lib\/dpkg\/status\n     0.12.2-3~bpo9+1 100\n        100 http:\/\/deb.debian.org\/debian stretch-backports\/main amd64 Packages\n\n\/\/ Install with latest version\napt install ocserv=0.12.2-3\n\n\/\/ Check installed version\nocserv -v \n\/\/ return\nocserv 0.12.2\nCompiled with: seccomp, tcp-wrappers, oath, radius, gssapi, PAM, PKCS#11, AnyConnect\nGnuTLS version: 3.6.7<\/code><\/pre>\n\n\n\n

Check your TLS connection<\/strong><\/p>\n\n\n\n

\/\/ Use openssl to test\nopenssl s_client -connect myvon.com:443 -tls1_3\n\n\/\/ return \nCONNECTED(00000003)\ndepth=2 O = Digital Signature Trust Co., CN = DST Root CA X3\nverify return:1\ndepth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3\nverify return:1\ndepth=0 CN = xxx.com\nPeer signing digest: SHA256\nPeer signature type: RSA-PSS\nServer Temp Key: ECDH, P-256, 256 bits\n---\nSSL handshake has read 3743 bytes and written 589 bytes\nVerification: OK\n---\nNew, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384\nServer public key is 4096 bit\nSecure Renegotiation IS NOT supported\nCompression: NONE\nExpansion: NONE\nNo ALPN negotiated\nEarly data was not sent\nVerify return code: 0 (ok)<\/code><\/pre>\n\n\n\n

Use Openconnect client on Mac<\/strong><\/p>\n\n\n\n

\/\/ installation\nbrew install openconnect\n\n\/\/ Export \nexport LDFLAGS=\"-L\/usr\/local\/opt\/libffi\/lib\"\n\n\/\/ connection\nsudo openconnect <vpn address:port><\/code><\/pre>\n\n\n\n
\"\"<\/figure>\n\n\n\n

Use Openconenct GUI client on Windows<\/strong><\/p>\n\n\n\n

\/\/ Download GUI client for Windows\nhttps://github.com\/openconnect\/openconnect-gui\/releases\/latest<\/code><\/pre>\n\n\n\n

Cisco anyconnect client<\/strong><\/p>\n\n\n\n