{"id":43,"date":"2014-12-10T16:18:00","date_gmt":"2014-12-10T16:18:00","guid":{"rendered":"https:\/\/www.tech-and-dev.com\/blog\/2014\/12\/10\/how-to-secure-roundcube-installation-of-virtualmin\/"},"modified":"2021-02-22T01:03:19","modified_gmt":"2021-02-22T01:03:19","slug":"how-to-secure-roundcube-installation-from-virtualmin","status":"publish","type":"post","link":"https:\/\/www.tech-and-dev.com\/blog\/2014\/12\/how-to-secure-roundcube-installation-from-virtualmin.html","title":{"rendered":"How To Secure Roundcube Installation Of Virtualmin"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2021\/02\/rouncube-logo.jpg\"><img decoding=\"async\" title=\"Roundcube Logo\" src=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2021\/02\/rouncube-logo.jpg\" alt=\"Roundcube Logo\" border=\"0\" \/><\/a><\/div>\n<div style=\"text-align: justify;\">Roundcube is a PHP open source webmail that allow users to read and send emails through a user-friendly interface.<\/div>\n<p><a name=\"more\"><\/a><\/p>\n<h2>Installing Roundcube in Virtualmin<\/h2>\n<div style=\"text-align: justify;\">In Virtualmin, choose the virtual host you want to install the script on, and click &#8220;Install Scripts&#8221;:<\/div>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2021\/02\/virtualmin-install-scripts.png\"><img decoding=\"async\" title=\"VirtualMin Install RoundCube\" src=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2021\/02\/virtualmin-install-scripts.png\" alt=\"VirtualMin install scripts\" border=\"0\" \/><\/a><\/div>\n<p>Choose &#8220;Roundcube&#8221; and click &#8220;Show Install Options&#8221;<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2021\/02\/roundcube-install.png\"><img decoding=\"async\" title=\"Installing Roundcube in Virtualmin\" src=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2021\/02\/roundcube-install.png\" alt=\"Installing Roundcube in Virtualmin\" border=\"0\" \/><\/a><\/div>\n<p>Choose a database and enter the path, I chose &#8220;webmail&#8221; for the path.<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2021\/02\/roundcube-configuration.png\"><img loading=\"lazy\" decoding=\"async\" title=\"Configuring Roundcube in Virtualmin\" src=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2021\/02\/roundcube-configuration.png\" alt=\"Configuring Roundcube in Virtualmin\" width=\"640\" height=\"216\" border=\"0\" \/><\/a><\/div>\n<h2 style=\"text-align: left;\">Securing Roundcube in Virtualmin<\/h2>\n<div style=\"text-align: justify;\">Roundcube provides many plugins to further enhance and secure the script. The plugins can be found on: <a href=\"http:\/\/trac.roundcube.net\/wiki\/Plugin_Repository\" target=\"_blank\" rel=\"nofollow noopener\">http:\/\/trac.roundcube.net\/wiki\/Plugin_Repository<\/a><\/div>\n<p>&nbsp;<\/p>\n<div style=\"text-align: justify;\">In order to prevent brute force attacks on the email, we install the following plugins:<\/div>\n<h2 style=\"text-align: left;\">Installing antiBruteForce Plugin:<\/h2>\n<p>Download antiBruteForce plugin from:<br \/>\n<a href=\"http:\/\/code.google.com\/p\/rcd-plugin-antibruteforce\/downloads\/list\" target=\"_blank\" rel=\"nofollow noopener\">http:\/\/code.google.com\/p\/rcd-plugin-antibruteforce\/downloads\/list<\/a><br \/>\nExtract it and upload it to your roundcube\/plugins directory.<\/p>\n<p>or download and extract it from ssh into roundcube&#8217;s plugins directory:<\/p>\n<blockquote><p>wget https:\/\/rcd-plugin-antibruteforce.googlecode.com\/files\/antiBruteForce_v2.0.tar.gz<br \/>\ntar -xvf antiBruteForce_v2.0.tar.gz<\/p><\/blockquote>\n<p>Go to roundcube config directory, open and edit <b>config.inc.php<\/b>,<br \/>\nScroll to the bottom of the file, and search for <b>$config[&#8216;plugins&#8217;] =<\/b> and add a new value called <b>antiBruteForce<\/b>, so that it will look like this:<\/p>\n<blockquote><p>$config[&#8216;plugins&#8217;] = array(&#8216;virtuser_file&#8217;,<br \/>\n&#8216;archive&#8217;,<br \/>\n&#8216;zipdownload&#8217;,<br \/>\n&#8216;antiBruteForce&#8217;,<br \/>\n);<\/p><\/blockquote>\n<p>Now try to enter an incorrect password several times, and roundcube should block your IP address for a while.<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2021\/02\/round-cube-anti-brute-force.png\"><img decoding=\"async\" title=\"Roundcube Brute Force Blocking\" src=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2021\/02\/round-cube-anti-brute-force.png\" alt=\"Roundcube Brute Force Blocking\" border=\"0\" \/><\/a><\/div>\n<h2 style=\"text-align: left;\">Installing Dr Captcha Plugin:<\/h2>\n<p><b><span style=\"color: red;\">Note:<\/span><\/b> In order to successfully use this plugin, you must have <span style=\"color: red;\"><b>PHP GD<\/b><\/span> installed.<\/p>\n<p>Download Dr Captcha from here:<br \/>\n<a href=\"http:\/\/sourceforge.net\/projects\/drcaptcha\/\" target=\"_blank\" rel=\"nofollow noopener\">http:\/\/sourceforge.net\/projects\/drcaptcha\/<\/a><\/p>\n<p>Extract &amp; upload it to the plugins directory of roundcube.<\/p>\n<p>You should have a directory called <i>plugins\/drcaptcha.<\/i><\/p>\n<ol style=\"text-align: left;\">\n<li>Go to <i>plugins\/drcaptcha <\/i>and rename <b>config.inc.php.dist<\/b> to <b>config.inc.php<\/b> and open it and modify the plugin&#8217;s settings as you wish.<\/li>\n<li>In order to enable the plugin, go back to roundcube config directory, open and edit <b>config.inc.php<\/b><\/li>\n<li>Scroll to the bottom of the file, and search for <b>$config[&#8216;plugins&#8217;] =<\/b><\/li>\n<li>Add a new value called <b>drcaptcha<\/b>, so that it will look like this:<\/li>\n<\/ol>\n<blockquote><p>$config[&#8216;plugins&#8217;] = array(&#8216;virtuser_file&#8217;,<br \/>\n&#8216;archive&#8217;,<br \/>\n&#8216;zipdownload&#8217;,<br \/>\n&#8216;antiBruteForce&#8217;,<br \/>\n&#8216;drcaptcha&#8217;,<br \/>\n);<\/p><\/blockquote>\n<p>Refresh the login screen and it should look as follows:<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2021\/02\/roundcube-captcha.png\"><img decoding=\"async\" title=\"Roundcube Captcha\" src=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2021\/02\/roundcube-captcha.png\" alt=\"roundcube captcha\" border=\"0\" \/><\/a><\/div>\n<div style=\"clear: both; text-align: center;\"><\/div>\n<p>&nbsp;<\/p>\n<h2 style=\"text-align: left;\">Force https to prevent eavesdropping:<\/h2>\n<p>Open <b>config\/defaults.inc.php<\/b><br \/>\nSearch for:<\/p>\n<blockquote><p>$config[&#8216;force_https&#8217;] = false;<\/p><\/blockquote>\n<p>and change it to:<\/p>\n<blockquote><p>$config[&#8216;force_https&#8217;] = 443;<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<div style=\"text-align: justify;\">Additionally, if you have fail2ban installed, you can create a filter to scan the log files and ban the offending IPs.<\/div>\n<p><b>Questions? Post them in the comment box below!<\/b><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Roundcube is a PHP open source webmail that allow users to read and send emails through a user-friendly interface. Installing Roundcube in Virtualmin In Virtualmin, choose the virtual host you want to install the script on, and click &#8220;Install Scripts&#8221;: Choose &#8220;Roundcube&#8221; and click &#8220;Show Install Options&#8221; Choose a database and enter the path, I [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[23,13,61,28,41],"tags":[],"class_list":["post-43","post","type-post","status-publish","format-standard","hentry","category-brute-force","category-email","category-roundcube","category-security","category-virtualmin"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/43","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/comments?post=43"}],"version-history":[{"count":1,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/43\/revisions"}],"predecessor-version":[{"id":292,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/43\/revisions\/292"}],"wp:attachment":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/media?parent=43"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/categories?post=43"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/tags?post=43"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}