{"id":620,"date":"2017-12-13T16:33:26","date_gmt":"2017-12-13T16:33:26","guid":{"rendered":"https:\/\/pandorafms.com\/library\/?p=620"},"modified":"2017-12-13T16:40:15","modified_gmt":"2017-12-13T16:40:15","slug":"pandora-server-access-violations","status":"publish","type":"post","link":"https:\/\/pandorafms.com\/library\/pandora-server-access-violations\/","title":{"rendered":"Pandora Server Access Violations"},"content":{"rendered":"<p>Sometimes our Pandora server (accessible from the Internet) is plagued with unexpected security and access violations. These include: API ACL violations, failed console logons and attempted console access without a session. Pandora logs these but they not easily accessible for analysis nor available for rapid response. These modules provide an explicit monitoring capability of these items.<\/p>\n<p>To configure, place the mysql password in <em>\/usr\/share\/pandora\/my.cnf<\/em> file. There could be security concerns with this approach. Research for yourself.<\/p>\n<p><em>my.cnf<\/em> file example content (exactly 2 lines):<\/p>\n<pre>\r\n[client]\r\npassword='fgjzsdmu'\r\n<\/pre>\n<p>* In the module sql strings below the spaces in &#8216;API access Failed&#8217;, &#8216;No session&#8217;, &#8216;Logon Failed&#8217;, need to be replaced with &#8216;\\&amp;\\#x20;&#8217; but remove the backslashes and outer quotes.<\/p>\n<h2>Module data<\/h2>\n<pre>module_begin\r\nmodule_name APIACLViolations\r\nmodule_type generic_data\r\nmodule_exec mysql --defaults-extra-file=\/usr\/share\/pandora\/my.cnf -upandora 'pandora' -s -e \"SELECT COUNT(*) FROM tsesion WHERE fecha &gt;= DATE_ADD(NOW(),INTERVAL - 5 MINUTE) AND (accion='API access Failed')\" | tail -1\r\nmodule_description API ACL violations at Pandora FMS server\r\nmodule_end<\/pre>\n<pre>\r\nmodule_begin\r\nmodule_name NoSessionViolations\r\nmodule_type generic_data\r\nmodule_exec mysql --defaults-extra-file=\/usr\/share\/pandora\/my.cnf -upandora 'pandora' -s -e \"SELECT COUNT(*) FROM tsesion WHERE fecha &gt;= DATE_ADD(NOW(), INTERVAL -5 MINUTE) AND (accion='No session')\" | tail -1\r\nmodule_description Console calls to Pandora FMS server without a valid session\r\nmodule_end\r\n<\/pre>\n<pre>\r\nmodule_begin\r\nmodule_name FailedLogons\r\nmodule_type generic_data\r\nmodule_exec mysql --defaults-extra-file=\/usr\/share\/pandora\/my.cnf -upandora 'pandora' -s -e \"SELECT COUNT(*) FROM tsesion WHERE fecha &gt;= DATE_ADD(NOW(), INTERVAL -5 MINUTE) AND (accion='Logon Failed')\" | tail -1\r\nmodule_description Failed browser logons to Pandora FMS server.\r\nmodule_end\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes our Pandora server (accessible from the Internet) is plagued with unexpected security and access violations. These include: API ACL violations, failed console logons and attempted console access without a session. Pandora logs these but they not easily accessible for analysis nor available for rapid response. These modules provide an explicit monitoring capability of these [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[8],"tags":[133,135,92,130,134],"_links":{"self":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/620"}],"collection":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/comments?post=620"}],"version-history":[{"count":0,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/620\/revisions"}],"wp:attachment":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/media?parent=620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/categories?post=620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/tags?post=620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}