{"id":40828,"date":"2016-11-15T15:50:57","date_gmt":"2016-11-15T10:20:57","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=40828"},"modified":"2016-11-18T10:48:01","modified_gmt":"2016-11-18T05:18:01","slug":"how-to-update-and-view-timeout-session-in-openvpn-access-server","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/how-to-update-and-view-timeout-session-in-openvpn-access-server\/","title":{"rendered":"How to Update and View Timeout Session in OpenVPN Access Server?"},"content":{"rendered":"<p>OpenVPN Access Server (AS) is a paid package based on <a title=\"OpenVPN\" href=\"http:\/\/www.tothenew.com\/blog\/openvpn\/\" target=\"_blank\">OpenVPN<\/a> Server which provides management of users, connections, even LDAP integration simplified through a web interface.<\/p>\n<p>This helps in <a title=\"remote DevOps\" href=\"http:\/\/www.tothenew.com\/devops-automation-consulting\" target=\"_blank\">deployment<\/a> of a VPN solution for multiple users in a matter of minutes.<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-42235\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/11\/AcessServer.png\" alt=\"AcessServer\" width=\"357\" height=\"53\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/11\/AcessServer.png 357w, \/blog\/wp-ttn-blog\/uploads\/2016\/11\/AcessServer-300x44.png 300w\" sizes=\"(max-width: 357px) 100vw, 357px\" \/><\/p>\n<p>But, OpenVPN AS by default comes with a 24-hour session time-out period. This can be taxing at times to reconnect to the OpenVPN Server and start the processes all over again.<\/p>\n<p>The OpenVPN AS uses SQLite at backend to store its certificates, configuration, logs and user related data.<\/p>\n<p>The data stored in SQLite is in encrypted format and to decrypt the data to text format OpenVPN AS provides a &#8220;<strong>sqlite3<\/strong>&#8221; script.<\/p>\n<p>All the OpenVPN AS&#8217;s scripts are located in &#8220;<strong>\/usr\/local\/openvpn_as\/scripts<\/strong>&#8221; and all the related database is stored in &#8220;<strong>\/usr\/local\/openvpn_as\/etc\/db<\/strong>&#8220;.<\/p>\n<p><strong>i) To view the current OpenVPN AS&#8217;s timeout session<\/strong> run this script:<\/p>\n<p>[sourcecode language=&#8221;bash&#8221;]<br \/>\n\t\t\t\/usr\/local\/openvpn_as\/scripts\/sqlite3 \/usr\/local\/openvpn_as\/etc\/db\/config.db .dump &gt; \/tmp\/config.txt<br \/>\n[\/sourcecode]<\/p>\n<p>Now, <strong>view config.txt file<\/strong> and locate &#8220;<strong>vpn.server.session_expire<\/strong>&#8221; and its corresponding value in seconds.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-40841\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/09\/timeout_as.png\" alt=\"timeout_as_openvpn\" width=\"824\" height=\"148\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/09\/timeout_as.png 824w, \/blog\/wp-ttn-blog\/uploads\/2016\/09\/timeout_as-300x53.png 300w, \/blog\/wp-ttn-blog\/uploads\/2016\/09\/timeout_as-624x112.png 624w\" sizes=\"(max-width: 824px) 100vw, 824px\" \/><\/p>\n<p>In the above picture, session timeout is specified as 604800 seconds equivalent to 7 days.<\/p>\n<p>To change the timeout period there is another script provided by OpenVPN AS, i.e. &#8220;<strong>sacli<\/strong>&#8220;.<\/p>\n<p><strong>ii) To set your own customized session timeout<\/strong> let&#8217;s say 30 days (2592000 seconds), use &#8220;sacli&#8221; script as follows:<\/p>\n<p>[sourcecode language=&#8221;bash&#8221;]<br \/>\n\t\t\t\/usr\/local\/openvpn_as\/scripts\/sacli &#8211;key vpn.server.session_expire &#8211;value 2592000 ConfigPut<br \/>\n[\/sourcecode]<\/p>\n<p><strong>iii)<\/strong> <strong>To reload the configuration<\/strong>, follow the process below and don&#8217;t worry it will not stop your running server:<\/p>\n<p>[sourcecode language=&#8221;bash&#8221;]<br \/>\n\t\t\t\/usr\/local\/openvpn_as\/scripts\/sacli start<br \/>\n[\/sourcecode]<\/p>\n<p>The OpenVPN AS will now run smoothly without dropping any connections for a period of 30 days, it can be customized according your requirements.<\/p>\n<p>Keep following and subscribe to our blogs to make your life simpler and boss happy. \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OpenVPN Access Server (AS) is a paid package based on OpenVPN Server which provides management of users, connections, even LDAP integration simplified through a web interface. This helps in deployment of a VPN solution for multiple users in a matter of minutes. But, OpenVPN AS by default comes with a 24-hour session time-out period. This [&hellip;]<\/p>\n","protected":false},"author":913,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":80},"categories":[2348,1],"tags":[1892,2561,4046,4047],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/40828"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/913"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=40828"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/40828\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=40828"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=40828"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=40828"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}