From 5d3183341f3289c5a7d70a1f584e5e6b5364736b Mon Sep 17 00:00:00 2001 From: Marcello Coutinho Date: Tue, 29 Jan 2013 15:58:04 -0200 Subject: dansguardian - package version 0.1.7. Gui improvements, 2.1 support, pcre fix ,dansguardian 2.12.0.3 and more --- config/dansguardian/blockedflash.swf | Bin 2740 -> 0 bytes config/dansguardian/dansguardian.conf.template | 32 ++++---- config/dansguardian/dansguardian.inc | 81 +++++++++++--------- config/dansguardian/dansguardian.php | 49 ++++++++---- config/dansguardian/dansguardian.xml | 40 ++++++---- config/dansguardian/dansguardian_about.php | 10 +-- config/dansguardian/dansguardian_antivirus_acl.xml | 76 +++++++++++++++---- config/dansguardian/dansguardian_blacklist.xml | 10 +-- config/dansguardian/dansguardian_config.xml | 19 +++-- config/dansguardian/dansguardian_content_acl.xml | 83 ++++++++++++++++----- config/dansguardian/dansguardian_file_acl.xml | 83 ++++++++++++++++----- config/dansguardian/dansguardian_groups.xml | 13 ++-- config/dansguardian/dansguardian_header_acl.xml | 83 ++++++++++++++++----- config/dansguardian/dansguardian_ips_header.xml | 8 +- config/dansguardian/dansguardian_ldap.php | 12 ++- config/dansguardian/dansguardian_ldap.xml | 15 ++-- config/dansguardian/dansguardian_limits.xml | 10 +-- config/dansguardian/dansguardian_log.xml | 10 +-- config/dansguardian/dansguardian_phrase_acl.xml | 83 ++++++++++++++++----- config/dansguardian/dansguardian_pics_acl.xml | 83 ++++++++++++++++----- config/dansguardian/dansguardian_search_acl.xml | 83 ++++++++++++++++----- config/dansguardian/dansguardian_site_acl.xml | 81 +++++++++++++++----- config/dansguardian/dansguardian_sync.xml | 10 +-- config/dansguardian/dansguardian_url_acl.xml | 83 ++++++++++++++++----- config/dansguardian/dansguardian_users_header.xml | 10 +-- config/dansguardian/dansguardianfx.conf.template | 2 +- 26 files changed, 772 insertions(+), 297 deletions(-) delete mode 100644 config/dansguardian/blockedflash.swf (limited to 'config/dansguardian') diff --git a/config/dansguardian/blockedflash.swf b/config/dansguardian/blockedflash.swf deleted file mode 100644 index ef53ee44..00000000 Binary files a/config/dansguardian/blockedflash.swf and /dev/null differ diff --git a/config/dansguardian/dansguardian.conf.template b/config/dansguardian/dansguardian.conf.template index ab30527a..ed514eca 100755 --- a/config/dansguardian/dansguardian.conf.template +++ b/config/dansguardian/dansguardian.conf.template @@ -30,7 +30,7 @@ #create dansguardian.conf $dg=<<&1',$output,$return); - if (preg_match("/x\W+(\w+)/",$output[0],$matches)) { + exec('/usr/bin/tar -xvzf /usr/local/pkg/blacklist.tgz 2>&1',$output,$return); + if (preg_match("/x\W+(\w+)/",$output[1],$matches)) { if ($matches[1] != "blacklists") rename("./".$matches[1],"blacklists"); - read_lists(); + read_lists($log_notice); } else { file_notice("Dansguardian - Could not determine Blacklist extract dir. Categories not updated",""); @@ -67,13 +82,14 @@ function fetch_blacklist() { } } else { - file_notice("Dansguardian - Blacklist url is invalid.",""); + if (!empty($url)) + file_notice("Dansguardian - Blacklist url is invalid.",""); } } -function read_lists(){ +function read_lists($log_notice=true){ global $config,$g; $group_type=array(); - $dir="/usr/local/etc/dansguardian/lists"; + $dir=DANSGUARDIAN_DIR . "/etc/dansguardian/lists"; #read dansguardian lists dirs $groups= array("phraselists", "blacklists", "whitelists"); #assigns know list files @@ -136,7 +152,8 @@ function read_lists(){ $edit_file=preg_replace('/size.19/','size>5',$edit_file); file_put_contents("/usr/local/pkg/dansguardian_".$edit_xml."_acl.xml",$edit_file,LOCK_EX); } - file_notice("Dansguardian - Blacklist applied, check site and URL access lists for categories",""); + if($log_notice==true) + file_notice("Dansguardian - Blacklist applied, check site and URL access lists for categories",""); #foreach($config['installedpackages'] as $key => $values) # if (preg_match("/dansguardian(phrase|black|white)lists/",$key)) # print "$key\n"; diff --git a/config/dansguardian/dansguardian.xml b/config/dansguardian/dansguardian.xml index 334c99e7..48b7b4a7 100644 --- a/config/dansguardian/dansguardian.xml +++ b/config/dansguardian/dansguardian.xml @@ -9,7 +9,7 @@ /* dansguardian.xml part of the dansguardian for pfSense - Copyright (C) 2012 Marcello Coutinho + Copyright (C) 2012-2013 Marcello Coutinho All rights reserved. */ @@ -18,7 +18,7 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code MUST retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright @@ -188,11 +188,6 @@ /usr/local/pkg/ 0755 - - http://www.pfsense.org/packages/config/dansguardian/blockedflash.swf - /usr/local/share/dansguardian/ - 0755 - Daemon @@ -212,8 +207,8 @@ /pkg_edit.php?xml=dansguardian_blacklist.xml&id=0 - Access Lists - /pkg_edit.php?xml=dansguardian_antivirus_acl.xml&id=0 + ACLs + /pkg.php?xml=dansguardian_site_acl.xml LDAP @@ -236,7 +231,7 @@ /pkg_edit.php?xml=dansguardian_log.xml&id=0 - XMLRPC Sync + Sync /pkg_edit.php?xml=dansguardian_sync.xml&id=0 @@ -258,7 +253,8 @@ Listen Interface(s) interface - LAN/loopback
Select interface(s) that you want to dansguardian listen on.]]>
+ LAN/loopback
Select interface(s) that you want to dansguardian listen on.
+ Note: Do NOT select more then one interface if you plan to use more then one authentication plugin.]]>
interfaces_selection @@ -349,10 +345,28 @@ 3128
Sets port number for proxy server.]]>
- + + Proxy Time out + proxytimeout + + select + + + + + + + + + + 30 + + - dansguardian_php_install_command(); + update_status("Checking Dansguardian Blacklists... One moment please..."); + update_output_window("This operation may take quite some time, please be patient. Do not press stop or attempt to navigate away from this page during this process."); + dansguardian_php_install_command(false,true); dansguardian_php_deinstall_command(); diff --git a/config/dansguardian/dansguardian_about.php b/config/dansguardian/dansguardian_about.php index 07b5768e..b7834281 100755 --- a/config/dansguardian/dansguardian_about.php +++ b/config/dansguardian/dansguardian_about.php @@ -53,16 +53,16 @@ include("head.inc"); diff --git a/config/dansguardian/dansguardian_antivirus_acl.xml b/config/dansguardian/dansguardian_antivirus_acl.xml index 21c5c17e..563d3f13 100755 --- a/config/dansguardian/dansguardian_antivirus_acl.xml +++ b/config/dansguardian/dansguardian_antivirus_acl.xml @@ -46,54 +46,100 @@ Services: Dansguardian - Access Lists /usr/local/pkg/dansguardian.inc - - Back to config + + Daemon /pkg_edit.php?xml=dansguardian.xml&id=0 + + General + /pkg_edit.php?xml=dansguardian_config.xml&id=0 + + + Limits + /pkg_edit.php?xml=dansguardian_limits.xml&id=0 + + + Blacklist + /pkg_edit.php?xml=dansguardian_blacklist.xml&id=0 + + + ACLs + /pkg.php?xml=dansguardian_site_acl.xml + + + + LDAP + /pkg.php?xml=dansguardian_ldap.xml + + + Groups + /pkg.php?xml=dansguardian_groups.xml + + + Users + /pkg_edit.php?xml=dansguardian_users.xml + + + IPs + /pkg_edit.php?xml=dansguardian_ips.xml + + + Report and log + /pkg_edit.php?xml=dansguardian_log.xml&id=0 + + + Sync + /pkg_edit.php?xml=dansguardian_sync.xml&id=0 + + + Help + /dansguardian_about.php + Antivirus /pkg_edit.php?xml=dansguardian_antivirus_acl.xml&id=0 + 2 Pics /pkg.php?xml=dansguardian_pics_acl.xml&id=0 + 2 - Phase + Phrase Lists /pkg.php?xml=dansguardian_phrase_acl.xml + 2 - Site + Site Lists /pkg.php?xml=dansguardian_site_acl.xml + 2 - URL + URL Lists /pkg.php?xml=dansguardian_url_acl.xml + 2 - Extension + Extension Lists /pkg.php?xml=dansguardian_file_acl.xml + 2 - Content + Content Lists /pkg.php?xml=dansguardian_content_acl.xml + 2 Header /pkg.php?xml=dansguardian_header_acl.xml + 2 Searche Engine /pkg.php?xml=dansguardian_search_acl.xml - - - Groups - /pkg.php?xml=dansguardian_groups.xml - - - Users - /pkg_edit.php?xml=dansguardian_users.xml + 2 diff --git a/config/dansguardian/dansguardian_blacklist.xml b/config/dansguardian/dansguardian_blacklist.xml index d95558e6..e9cba862 100644 --- a/config/dansguardian/dansguardian_blacklist.xml +++ b/config/dansguardian/dansguardian_blacklist.xml @@ -9,7 +9,7 @@ /* dansguardian_limits.xml part of the dansguardian for pfSense - Copyright (C) 2012 Marcello Coutinho + Copyright (C) 2012-2013 Marcello Coutinho All rights reserved. */ @@ -18,7 +18,7 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code MUST retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright @@ -65,8 +65,8 @@
- Access Lists - /pkg_edit.php?xml=dansguardian_antivirus_acl.xml&id=0 + ACLs + /pkg.php?xml=dansguardian_site_acl.xml LDAP @@ -89,7 +89,7 @@ /pkg_edit.php?xml=dansguardian_log.xml&id=0 - XMLRPC Sync + Sync /pkg_edit.php?xml=dansguardian_sync.xml&id=0 diff --git a/config/dansguardian/dansguardian_config.xml b/config/dansguardian/dansguardian_config.xml index 0c14a7bb..35b0bf5b 100644 --- a/config/dansguardian/dansguardian_config.xml +++ b/config/dansguardian/dansguardian_config.xml @@ -9,7 +9,7 @@ /* dansguardian_config.xml part of the dansguardian for pfSense - Copyright (C) 2012 Marcello Coutinho + Copyright (C) 2012-2013 Marcello Coutinho All rights reserved. */ @@ -18,7 +18,7 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code MUST retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright @@ -65,8 +65,8 @@ /pkg_edit.php?xml=dansguardian_blacklist.xml&id=0 - Access Lists - /pkg_edit.php?xml=dansguardian_antivirus_acl.xml&id=0 + ACLs + /pkg.php?xml=dansguardian_site_acl.xml LDAP @@ -89,7 +89,7 @@ /pkg_edit.php?xml=dansguardian_log.xml&id=0 - XMLRPC Sync + Sync /pkg_edit.php?xml=dansguardian_sync.xml&id=0 @@ -106,7 +106,9 @@ Auth Plugins auth_plugin + enabling requests to be handled according to the settings of the user's filter group.
+ Use CTRL + click for multiple select.
+ Note: Do NOT select more then one auth plugin if you plan to use more then one listening interface.]]> select @@ -116,11 +118,14 @@ + + 7 Scan Options scan_options - + + Use CTRL + click for multiple select.]]> select diff --git a/config/dansguardian/dansguardian_content_acl.xml b/config/dansguardian/dansguardian_content_acl.xml index 1302d89c..8a1866af 100755 --- a/config/dansguardian/dansguardian_content_acl.xml +++ b/config/dansguardian/dansguardian_content_acl.xml @@ -8,7 +8,7 @@ /* dansguardian_content_acl.xml part of pfSense (http://www.pfSense.com) - Copyright (C) 2012 Marcello Coutinho + Copyright (C) 2012-2013 Marcello Coutinho All rights reserved. */ @@ -17,7 +17,7 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code MUST retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright @@ -46,54 +46,100 @@ Services: Dansguardian - Access Lists /usr/local/pkg/dansguardian.inc - - Back to Config + + Daemon /pkg_edit.php?xml=dansguardian.xml&id=0 + + General + /pkg_edit.php?xml=dansguardian_config.xml&id=0 + + + Limits + /pkg_edit.php?xml=dansguardian_limits.xml&id=0 + + + Blacklist + /pkg_edit.php?xml=dansguardian_blacklist.xml&id=0 + + + ACLs + /pkg.php?xml=dansguardian_site_acl.xml + + + + LDAP + /pkg.php?xml=dansguardian_ldap.xml + + + Groups + /pkg.php?xml=dansguardian_groups.xml + + + Users + /pkg_edit.php?xml=dansguardian_users.xml + + + IPs + /pkg_edit.php?xml=dansguardian_ips.xml + + + Report and log + /pkg_edit.php?xml=dansguardian_log.xml&id=0 + + + Sync + /pkg_edit.php?xml=dansguardian_sync.xml&id=0 + + + Help + /dansguardian_about.php + Antivirus /pkg_edit.php?xml=dansguardian_antivirus_acl.xml&id=0 + 2 Pics /pkg.php?xml=dansguardian_pics_acl.xml&id=0 + 2 - Phrase + Phrase Lists /pkg.php?xml=dansguardian_phrase_acl.xml + 2 - Site + Site Lists /pkg.php?xml=dansguardian_site_acl.xml + 2 - URL + URL Lists /pkg.php?xml=dansguardian_url_acl.xml + 2 - Extension + Extension Lists /pkg.php?xml=dansguardian_file_acl.xml + 2 - Content + Content Lists /pkg.php?xml=dansguardian_content_acl.xml + 2 Header /pkg.php?xml=dansguardian_header_acl.xml + 2 Searche Engine /pkg.php?xml=dansguardian_search_acl.xml - - - Groups - /pkg.php?xml=dansguardian_groups.xml - - - Users - /pkg_edit.php?xml=dansguardian_users.xml + 2 @@ -104,7 +150,8 @@ Description description - + + on diff --git a/config/dansguardian/dansguardian_file_acl.xml b/config/dansguardian/dansguardian_file_acl.xml index 808fb4e2..ed4866c6 100755 --- a/config/dansguardian/dansguardian_file_acl.xml +++ b/config/dansguardian/dansguardian_file_acl.xml @@ -8,7 +8,7 @@ /* dansguardian_file_acl.xml part of pfSense (http://www.pfSense.com) - Copyright (C) 2012 Marcello Coutinho + Copyright (C) 2012-2013 Marcello Coutinho All rights reserved. */ @@ -17,7 +17,7 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code MUST retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright @@ -46,54 +46,100 @@ Services: Dansguardian - Access Lists /usr/local/pkg/dansguardian.inc - - Back to Config + + Daemon /pkg_edit.php?xml=dansguardian.xml&id=0 + + General + /pkg_edit.php?xml=dansguardian_config.xml&id=0 + + + Limits + /pkg_edit.php?xml=dansguardian_limits.xml&id=0 + + + Blacklist + /pkg_edit.php?xml=dansguardian_blacklist.xml&id=0 + + + ACLs + /pkg.php?xml=dansguardian_site_acl.xml + + + + LDAP + /pkg.php?xml=dansguardian_ldap.xml + + + Groups + /pkg.php?xml=dansguardian_groups.xml + + + Users + /pkg_edit.php?xml=dansguardian_users.xml + + + IPs + /pkg_edit.php?xml=dansguardian_ips.xml + + + Report and log + /pkg_edit.php?xml=dansguardian_log.xml&id=0 + + + Sync + /pkg_edit.php?xml=dansguardian_sync.xml&id=0 + + + Help + /dansguardian_about.php + Antivirus /pkg_edit.php?xml=dansguardian_antivirus_acl.xml&id=0 + 2 Pics /pkg.php?xml=dansguardian_pics_acl.xml&id=0 + 2 - Phrase + Phrase Lists /pkg.php?xml=dansguardian_phrase_acl.xml + 2 - Site + Site Lists /pkg.php?xml=dansguardian_site_acl.xml + 2 - URL + URL Lists /pkg.php?xml=dansguardian_url_acl.xml + 2 - Extension + Extension Lists /pkg.php?xml=dansguardian_file_acl.xml + 2 - Content + Content Lists /pkg.php?xml=dansguardian_content_acl.xml + 2 Header /pkg.php?xml=dansguardian_header_acl.xml + 2 Searche Engine /pkg.php?xml=dansguardian_search_acl.xml - - - Groups - /pkg.php?xml=dansguardian_groups.xml - - - Users - /pkg_edit.php?xml=dansguardian_users.xml + 2 @@ -104,7 +150,8 @@ Description description - + + on diff --git a/config/dansguardian/dansguardian_groups.xml b/config/dansguardian/dansguardian_groups.xml index 9498ef4c..031ae88b 100755 --- a/config/dansguardian/dansguardian_groups.xml +++ b/config/dansguardian/dansguardian_groups.xml @@ -8,7 +8,7 @@ /* dansguardian_groups.xml part of pfSense (http://www.pfSense.com) - Copyright (C) 2012 Marcello Coutinho + Copyright (C) 2012-2013 Marcello Coutinho All rights reserved. */ @@ -17,7 +17,7 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code MUST retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright @@ -63,8 +63,8 @@ /pkg_edit.php?xml=dansguardian_blacklist.xml&id=0
- Access Lists - /pkg_edit.php?xml=dansguardian_antivirus_acl.xml&id=0 + ACLs + /pkg.php?xml=dansguardian_site_acl.xml LDAP @@ -88,7 +88,7 @@ /pkg_edit.php?xml=dansguardian_log.xml&id=0 - XMLRPC Sync + Sync /pkg_edit.php?xml=dansguardian_sync.xml&id=0 @@ -112,7 +112,8 @@ Description description - + + on diff --git a/config/dansguardian/dansguardian_header_acl.xml b/config/dansguardian/dansguardian_header_acl.xml index 4d120a7b..9ddb0c23 100755 --- a/config/dansguardian/dansguardian_header_acl.xml +++ b/config/dansguardian/dansguardian_header_acl.xml @@ -8,7 +8,7 @@ /* dansguardian_header_acl.xml part of pfSense (http://www.pfSense.com) - Copyright (C) 2012 Marcello Coutinho + Copyright (C) 2012-2013 Marcello Coutinho All rights reserved. */ @@ -17,7 +17,7 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code MUST retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright @@ -46,54 +46,100 @@ Services: Dansguardian - Access Lists /usr/local/pkg/dansguardian.inc - - Back to Config + + Daemon /pkg_edit.php?xml=dansguardian.xml&id=0 + + General + /pkg_edit.php?xml=dansguardian_config.xml&id=0 + + + Limits + /pkg_edit.php?xml=dansguardian_limits.xml&id=0 + + + Blacklist + /pkg_edit.php?xml=dansguardian_blacklist.xml&id=0 + + + ACLs + /pkg.php?xml=dansguardian_site_acl.xml + + + + LDAP + /pkg.php?xml=dansguardian_ldap.xml + + + Groups + /pkg.php?xml=dansguardian_groups.xml + + + Users + /pkg_edit.php?xml=dansguardian_users.xml + + + IPs + /pkg_edit.php?xml=dansguardian_ips.xml + + + Report and log + /pkg_edit.php?xml=dansguardian_log.xml&id=0 + + + Sync + /pkg_edit.php?xml=dansguardian_sync.xml&id=0 + + + Help + /dansguardian_about.php + Antivirus /pkg_edit.php?xml=dansguardian_antivirus_acl.xml&id=0 + 2 Pics /pkg.php?xml=dansguardian_pics_acl.xml&id=0 + 2 - Phrase + Phrase Lists /pkg.php?xml=dansguardian_phrase_acl.xml + 2 - Site + Site Lists /pkg.php?xml=dansguardian_site_acl.xml + 2 - URL + URL Lists /pkg.php?xml=dansguardian_url_acl.xml + 2 - Extension + Extension Lists /pkg.php?xml=dansguardian_file_acl.xml + 2 - Content + Content Lists /pkg.php?xml=dansguardian_content_acl.xml + 2 Header /pkg.php?xml=dansguardian_header_acl.xml + 2 Searche Engine /pkg.php?xml=dansguardian_search_acl.xml - - - Groups - /pkg.php?xml=dansguardian_groups.xml - - - Users - /pkg_edit.php?xml=dansguardian_users.xml + 2 @@ -104,7 +150,8 @@ Description description - + + on diff --git a/config/dansguardian/dansguardian_ips_header.xml b/config/dansguardian/dansguardian_ips_header.xml index c15e31da..48eb3e68 100644 --- a/config/dansguardian/dansguardian_ips_header.xml +++ b/config/dansguardian/dansguardian_ips_header.xml @@ -9,7 +9,7 @@ /* dansguardian_ips.xml part of the dansguardian for pfSense - Copyright (C) 2012 Marcello Coutinho + Copyright (C) 2012-2013 Marcello Coutinho All rights reserved. */ @@ -18,7 +18,7 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code MUST retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright @@ -64,7 +64,7 @@ Access Lists - /pkg_edit.php?xml=dansguardian_antivirus_acl.xml&id=0 + /pkg_edit.php?xml=dansguardian_site_acl.xml&id=0 LDAP @@ -88,7 +88,7 @@ /pkg_edit.php?xml=dansguardian_log.xml&id=0 - XMLRPC Sync + Sync /pkg_edit.php?xml=dansguardian_sync.xml&id=0 diff --git a/config/dansguardian/dansguardian_ldap.php b/config/dansguardian/dansguardian_ldap.php index c02289ac..d44f3de4 100644 --- a/config/dansguardian/dansguardian_ldap.php +++ b/config/dansguardian/dansguardian_ldap.php @@ -8,7 +8,7 @@ /* dansguardian_ldap.php part of pfSense (http://www.pfSense.com) - Copyright (C) 2012 Marcello Coutinho + Copyright (C) 2012-2013 Marcello Coutinho All rights reserved. */ @@ -17,7 +17,7 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code MUST retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright @@ -107,7 +107,13 @@ if (is_array($config['installedpackages']['dansguardiangroups']['config'])) $ldap_dn = $server['dn']; $ldap_host=$server['dc']; $mask=(empty($server['mask'])?"USER":$server['mask']); - $result = get_ldap_members($group['name'],$server['username'].','.$server['dn'],$server['password']); + if (preg_match("/cn/",$server['username'])) + $ldap_username=$server['username'].",".$server['dn']; + else + $ldap_username=$server['username']; + #$domainuser=split("cn=",$server['username']); + #$ldap_username=preg_replace("/,\./","@",$domainuser[1].preg_replace("/(,|)DC=/i",".",$server['dn'])); + $result = get_ldap_members($group['name'],$ldap_username,$server['password']); foreach($result as $key => $value) { if (preg_match ("/\w+/",$value[0])){ #var_dump($value); diff --git a/config/dansguardian/dansguardian_ldap.xml b/config/dansguardian/dansguardian_ldap.xml index 3411f483..4c2b60f7 100755 --- a/config/dansguardian/dansguardian_ldap.xml +++ b/config/dansguardian/dansguardian_ldap.xml @@ -8,7 +8,7 @@ /* dansguardian_ldap.xml part of pfSense (http://www.pfSense.com) - Copyright (C) 2012 Marcello Coutinho + Copyright (C) 2012-2013 Marcello Coutinho All rights reserved. */ @@ -17,7 +17,7 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code MUST retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright @@ -63,8 +63,8 @@ /pkg_edit.php?xml=dansguardian_blacklist.xml&id=0 - Access Lists - /pkg_edit.php?xml=dansguardian_antivirus_acl.xml&id=0 + ACLs + /pkg.php?xml=dansguardian_site_acl.xml LDAP @@ -88,7 +88,7 @@ /pkg_edit.php?xml=dansguardian_log.xml&id=0 - XMLRPC Sync + Sync /pkg_edit.php?xml=dansguardian_sync.xml&id=0 @@ -109,7 +109,8 @@ username username - + + on @@ -132,7 +133,7 @@ Username - cn=antispam,cn=Users]]> + cn=antispam,cn=Users OR username@mysite.com]]> username input 25 diff --git a/config/dansguardian/dansguardian_limits.xml b/config/dansguardian/dansguardian_limits.xml index 4974bc7d..c8011357 100644 --- a/config/dansguardian/dansguardian_limits.xml +++ b/config/dansguardian/dansguardian_limits.xml @@ -9,7 +9,7 @@ /* dansguardian_limits.xml part of the dansguardian for pfSense - Copyright (C) 2012 Marcello Coutinho + Copyright (C) 2012-2013 Marcello Coutinho All rights reserved. */ @@ -18,7 +18,7 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code MUST retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright @@ -65,8 +65,8 @@ /pkg_edit.php?xml=dansguardian_blacklist.xml&id=0 - Access Lists - /pkg_edit.php?xml=dansguardian_antivirus_acl.xml&id=0 + ACLs + /pkg.php?xml=dansguardian_site_acl.xml LDAP @@ -89,7 +89,7 @@ /pkg_edit.php?xml=dansguardian_log.xml&id=0 - XMLRPC Sync + Sync /pkg_edit.php?xml=dansguardian_sync.xml&id=0 diff --git a/config/dansguardian/dansguardian_log.xml b/config/dansguardian/dansguardian_log.xml index a9b9d0e9..88281dff 100644 --- a/config/dansguardian/dansguardian_log.xml +++ b/config/dansguardian/dansguardian_log.xml @@ -9,7 +9,7 @@ /* dansguardian_log.xml part of the Dansguardian package for pfSense - Copyright (C) 2012 Marcello Coutinho + Copyright (C) 2012-2013 Marcello Coutinho All rights reserved. */ @@ -18,7 +18,7 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code MUST retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright @@ -64,8 +64,8 @@ /pkg_edit.php?xml=dansguardian_blacklist.xml&id=0 - Access Lists - /pkg_edit.php?xml=dansguardian_antivirus_acl.xml&id=0 + ACLs + /pkg.php?xml=dansguardian_site_acl.xml LDAP @@ -89,7 +89,7 @@ - XMLRPC Sync + Sync /pkg_edit.php?xml=dansguardian_sync.xml&id=0 diff --git a/config/dansguardian/dansguardian_phrase_acl.xml b/config/dansguardian/dansguardian_phrase_acl.xml index 74448bee..c32f7720 100755 --- a/config/dansguardian/dansguardian_phrase_acl.xml +++ b/config/dansguardian/dansguardian_phrase_acl.xml @@ -8,7 +8,7 @@ /* dansguardian_phrase_acl.xml part of pfSense (http://www.pfSense.com) - Copyright (C) 2012 Marcello Coutinho + Copyright (C) 2012-2013 Marcello Coutinho All rights reserved. */ @@ -17,7 +17,7 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code MUST retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright @@ -46,54 +46,100 @@ Services: Dansguardian - Access Lists /usr/local/pkg/dansguardian.inc - - Back to Config + + Daemon /pkg_edit.php?xml=dansguardian.xml&id=0 + + General + /pkg_edit.php?xml=dansguardian_config.xml&id=0 + + + Limits + /pkg_edit.php?xml=dansguardian_limits.xml&id=0 + + + Blacklist + /pkg_edit.php?xml=dansguardian_blacklist.xml&id=0 + + + ACLs + /pkg.php?xml=dansguardian_site_acl.xml + + + + LDAP + /pkg.php?xml=dansguardian_ldap.xml + + + Groups + /pkg.php?xml=dansguardian_groups.xml + + + Users + /pkg_edit.php?xml=dansguardian_users.xml + + + IPs + /pkg_edit.php?xml=dansguardian_ips.xml + + + Report and log + /pkg_edit.php?xml=dansguardian_log.xml&id=0 + + + Sync + /pkg_edit.php?xml=dansguardian_sync.xml&id=0 + + + Help + /dansguardian_about.php + Antivirus /pkg_edit.php?xml=dansguardian_antivirus_acl.xml&id=0 + 2 Pics /pkg.php?xml=dansguardian_pics_acl.xml&id=0 + 2 - Phrase + Phrase Lists /pkg.php?xml=dansguardian_phrase_acl.xml + 2 - Site + Site Lists /pkg.php?xml=dansguardian_site_acl.xml + 2 - URL + URL Lists /pkg.php?xml=dansguardian_url_acl.xml + 2 - Extension + Extension Lists /pkg.php?xml=dansguardian_file_acl.xml + 2 - Content + Content Lists /pkg.php?xml=dansguardian_content_acl.xml + 2 Header /pkg.php?xml=dansguardian_header_acl.xml + 2 Searche Engine /pkg.php?xml=dansguardian_search_acl.xml - - - Groups - /pkg.php?xml=dansguardian_groups.xml - - - Users - /pkg_edit.php?xml=dansguardian_users.xml + 2 @@ -104,7 +150,8 @@ Access List Descriptions description - + + on diff --git a/config/dansguardian/dansguardian_pics_acl.xml b/config/dansguardian/dansguardian_pics_acl.xml index bda76a50..c2f4b52c 100644 --- a/config/dansguardian/dansguardian_pics_acl.xml +++ b/config/dansguardian/dansguardian_pics_acl.xml @@ -9,7 +9,7 @@ /* dansguardian_limits.xml part of the dansguardian for pfSense - Copyright (C) 2012 Marcello Coutinho + Copyright (C) 2012-2013 Marcello Coutinho All rights reserved. */ @@ -18,7 +18,7 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code MUST retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright @@ -47,54 +47,100 @@ Services: Dansguardian - Access Lists /usr/local/pkg/dansguardian.inc - - Back to Config + + Daemon /pkg_edit.php?xml=dansguardian.xml&id=0 + + General + /pkg_edit.php?xml=dansguardian_config.xml&id=0 + + + Limits + /pkg_edit.php?xml=dansguardian_limits.xml&id=0 + + + Blacklist + /pkg_edit.php?xml=dansguardian_blacklist.xml&id=0 + + + ACLs + /pkg.php?xml=dansguardian_site_acl.xml + + + + LDAP + /pkg.php?xml=dansguardian_ldap.xml + + + Groups + /pkg.php?xml=dansguardian_groups.xml + + + Users + /pkg_edit.php?xml=dansguardian_users.xml + + + IPs + /pkg_edit.php?xml=dansguardian_ips.xml + + + Report and log + /pkg_edit.php?xml=dansguardian_log.xml&id=0 + + + Sync + /pkg_edit.php?xml=dansguardian_sync.xml&id=0 + + + Help + /dansguardian_about.php + Antivirus /pkg_edit.php?xml=dansguardian_antivirus_acl.xml&id=0 + 2 Pics /pkg.php?xml=dansguardian_pics_acl.xml&id=0 + 2 - Phrase + Phrase Lists /pkg.php?xml=dansguardian_phrase_acl.xml + 2 - Site + Site Lists /pkg.php?xml=dansguardian_site_acl.xml + 2 - URL + URL Lists /pkg.php?xml=dansguardian_url_acl.xml + 2 - Extension + Extension Lists /pkg.php?xml=dansguardian_file_acl.xml + 2 - Content + Content Lists /pkg.php?xml=dansguardian_content_acl.xml + 2 Header /pkg.php?xml=dansguardian_header_acl.xml + 2 Searche Engine /pkg.php?xml=dansguardian_search_acl.xml - - - Groups - /pkg.php?xml=dansguardian_groups.xml - - - Users - /pkg_edit.php?xml=dansguardian_users.xml + 2 @@ -105,7 +151,8 @@ Access List Description description - + + on diff --git a/config/dansguardian/dansguardian_search_acl.xml b/config/dansguardian/dansguardian_search_acl.xml index 86ef67ff..9f9cfa49 100755 --- a/config/dansguardian/dansguardian_search_acl.xml +++ b/config/dansguardian/dansguardian_search_acl.xml @@ -8,7 +8,7 @@ /* dansguardian_search_acl.xml part of pfSense (http://www.pfSense.com) - Copyright (C) 2012 Marcello Coutinho + Copyright (C) 2012-2013 Marcello Coutinho All rights reserved. */ @@ -17,7 +17,7 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code MUST retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright @@ -46,55 +46,101 @@ Services: Dansguardian - Access Lists /usr/local/pkg/dansguardian.inc - - Back to Config + + Daemon /pkg_edit.php?xml=dansguardian.xml&id=0 + + General + /pkg_edit.php?xml=dansguardian_config.xml&id=0 + + + Limits + /pkg_edit.php?xml=dansguardian_limits.xml&id=0 + + + Blacklist + /pkg_edit.php?xml=dansguardian_blacklist.xml&id=0 + + + ACLs + /pkg.php?xml=dansguardian_site_acl.xml + + + + LDAP + /pkg.php?xml=dansguardian_ldap.xml + + + Groups + /pkg.php?xml=dansguardian_groups.xml + + + Users + /pkg_edit.php?xml=dansguardian_users.xml + + + IPs + /pkg_edit.php?xml=dansguardian_ips.xml + + + Report and log + /pkg_edit.php?xml=dansguardian_log.xml&id=0 + + + Sync + /pkg_edit.php?xml=dansguardian_sync.xml&id=0 + + + Help + /dansguardian_about.php + Antivirus /pkg_edit.php?xml=dansguardian_antivirus_acl.xml&id=0 + 2 Pics /pkg.php?xml=dansguardian_pics_acl.xml&id=0 + 2 - Phrase + Phrase Lists /pkg.php?xml=dansguardian_phrase_acl.xml + 2 - Site + Site Lists /pkg.php?xml=dansguardian_site_acl.xml + 2 - URL + URL Lists /pkg.php?xml=dansguardian_url_acl.xml + 2 - Extension + Extension Lists /pkg.php?xml=dansguardian_file_acl.xml + 2 - Content + Content Lists /pkg.php?xml=dansguardian_content_acl.xml + 2 Header /pkg.php?xml=dansguardian_header_acl.xml + 2 Searche Engine /pkg.php?xml=dansguardian_search_acl.xml + 2 - - Groups - /pkg.php?xml=dansguardian_groups.xml - - - Users - /pkg_edit.php?xml=dansguardian_users.xml - @@ -104,7 +150,8 @@ Access List Description description - + + on diff --git a/config/dansguardian/dansguardian_site_acl.xml b/config/dansguardian/dansguardian_site_acl.xml index fcddfea6..7804d9f6 100755 --- a/config/dansguardian/dansguardian_site_acl.xml +++ b/config/dansguardian/dansguardian_site_acl.xml @@ -8,7 +8,7 @@ /* dansguardian_site_acl.xml part of pfSense (http://www.pfSense.com) - Copyright (C) 2012 Marcello Coutinho + Copyright (C) 2012-2013 Marcello Coutinho All rights reserved. */ @@ -17,7 +17,7 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code MUST retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright @@ -46,54 +46,100 @@ Services: Dansguardian - Access Lists /usr/local/pkg/dansguardian.inc - - Back to Config + + Daemon /pkg_edit.php?xml=dansguardian.xml&id=0 + + General + /pkg_edit.php?xml=dansguardian_config.xml&id=0 + + + Limits + /pkg_edit.php?xml=dansguardian_limits.xml&id=0 + + + Blacklist + /pkg_edit.php?xml=dansguardian_blacklist.xml&id=0 + + + ACLs + /pkg.php?xml=dansguardian_site_acl.xml + + + + LDAP + /pkg.php?xml=dansguardian_ldap.xml + + + Groups + /pkg.php?xml=dansguardian_groups.xml + + + Users + /pkg_edit.php?xml=dansguardian_users.xml + + + IPs + /pkg_edit.php?xml=dansguardian_ips.xml + + + Report and log + /pkg_edit.php?xml=dansguardian_log.xml&id=0 + + + Sync + /pkg_edit.php?xml=dansguardian_sync.xml&id=0 + + + Help + /dansguardian_about.php + Antivirus /pkg_edit.php?xml=dansguardian_antivirus_acl.xml&id=0 + 2 Pics /pkg.php?xml=dansguardian_pics_acl.xml&id=0 + 2 - Phrase + Phrase Lists /pkg.php?xml=dansguardian_phrase_acl.xml + 2 - Site + Site Lists /pkg.php?xml=dansguardian_site_acl.xml + 2 - URL + URL Lists /pkg.php?xml=dansguardian_url_acl.xml + 2 - Extension + Extension Lists /pkg.php?xml=dansguardian_file_acl.xml + 2 - Content + Content Lists /pkg.php?xml=dansguardian_content_acl.xml + 2 Header /pkg.php?xml=dansguardian_header_acl.xml + 2 Searche Engine /pkg.php?xml=dansguardian_search_acl.xml - - - Groups - /pkg.php?xml=dansguardian_groups.xml - - - Users - /pkg_edit.php?xml=dansguardian_users.xml + 2 @@ -105,6 +151,7 @@ Access List Description description + on diff --git a/config/dansguardian/dansguardian_sync.xml b/config/dansguardian/dansguardian_sync.xml index f91eae6a..7f714051 100755 --- a/config/dansguardian/dansguardian_sync.xml +++ b/config/dansguardian/dansguardian_sync.xml @@ -9,7 +9,7 @@ /* dansguardian_sync.xml part of the Dansguardian package for pfSense - Copyright (C) 2012 Marcello Coutinho + Copyright (C) 2012-2013 Marcello Coutinho All rights reserved. */ /* ========================================================================== */ @@ -17,7 +17,7 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code MUST retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright @@ -63,8 +63,8 @@ /pkg_edit.php?xml=dansguardian_blacklist.xml&id=0 - Access Lists - /pkg_edit.php?xml=dansguardian_antivirus_acl.xml&id=0 + ACLs + /pkg.php?xml=dansguardian_site_acl.xml LDAP @@ -87,7 +87,7 @@ /pkg_edit.php?xml=dansguardian_log.xml&id=0 - XMLRPC Sync + Sync /pkg_edit.php?xml=dansguardian_sync.xml&id=0 diff --git a/config/dansguardian/dansguardian_url_acl.xml b/config/dansguardian/dansguardian_url_acl.xml index 556e0bab..8adf46c0 100755 --- a/config/dansguardian/dansguardian_url_acl.xml +++ b/config/dansguardian/dansguardian_url_acl.xml @@ -8,7 +8,7 @@ /* dansguardian_url_acl.xml part of pfSense (http://www.pfSense.com) - Copyright (C) 2012 Marcello Coutinho + Copyright (C) 2012-2013 Marcello Coutinho All rights reserved. */ @@ -17,7 +17,7 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code MUST retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright @@ -46,54 +46,100 @@ Services: Dansguardian - Access Lists /usr/local/pkg/dansguardian.inc - - Back to Config + + Daemon /pkg_edit.php?xml=dansguardian.xml&id=0 + + General + /pkg_edit.php?xml=dansguardian_config.xml&id=0 + + + Limits + /pkg_edit.php?xml=dansguardian_limits.xml&id=0 + + + Blacklist + /pkg_edit.php?xml=dansguardian_blacklist.xml&id=0 + + + ACLs + /pkg.php?xml=dansguardian_site_acl.xml + + + + LDAP + /pkg.php?xml=dansguardian_ldap.xml + + + Groups + /pkg.php?xml=dansguardian_groups.xml + + + Users + /pkg_edit.php?xml=dansguardian_users.xml + + + IPs + /pkg_edit.php?xml=dansguardian_ips.xml + + + Report and log + /pkg_edit.php?xml=dansguardian_log.xml&id=0 + + + Sync + /pkg_edit.php?xml=dansguardian_sync.xml&id=0 + + + Help + /dansguardian_about.php + Antivirus /pkg_edit.php?xml=dansguardian_antivirus_acl.xml&id=0 + 2 Pics /pkg.php?xml=dansguardian_pics_acl.xml&id=0 + 2 - Phrase + Phrase Lists /pkg.php?xml=dansguardian_phrase_acl.xml + 2 - Site + Site Lists /pkg.php?xml=dansguardian_site_acl.xml + 2 - URL + URL Lists /pkg.php?xml=dansguardian_url_acl.xml + 2 - Extension + Extension Lists /pkg.php?xml=dansguardian_file_acl.xml + 2 - Content + Content Lists /pkg.php?xml=dansguardian_content_acl.xml + 2 Header /pkg.php?xml=dansguardian_header_acl.xml + 2 Searche Engine /pkg.php?xml=dansguardian_search_acl.xml - - - Groups - /pkg.php?xml=dansguardian_groups.xml - - - Users - /pkg_edit.php?xml=dansguardian_users.xml + 2 @@ -104,7 +150,8 @@ Access List Description description - + + on diff --git a/config/dansguardian/dansguardian_users_header.xml b/config/dansguardian/dansguardian_users_header.xml index 1f15a610..1cc038d5 100644 --- a/config/dansguardian/dansguardian_users_header.xml +++ b/config/dansguardian/dansguardian_users_header.xml @@ -9,7 +9,7 @@ /* dansguardian_users.xml part of the dansguardian for pfSense - Copyright (C) 2012 Marcello Coutinho + Copyright (C) 2012-2013 Marcello Coutinho All rights reserved. */ @@ -18,7 +18,7 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code MUST retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright @@ -63,8 +63,8 @@ /pkg_edit.php?xml=dansguardian_blacklist.xml&id=0 - Access Lists - /pkg_edit.php?xml=dansguardian_antivirus_acl.xml&id=0 + ACLs + /pkg.php?xml=dansguardian_site_acl.xml LDAP @@ -88,7 +88,7 @@ /pkg_edit.php?xml=dansguardian_log.xml&id=0 - XMLRPC Sync + Sync /pkg_edit.php?xml=dansguardian_sync.xml&id=0 diff --git a/config/dansguardian/dansguardianfx.conf.template b/config/dansguardian/dansguardianfx.conf.template index cfc9645e..f5296622 100644 --- a/config/dansguardian/dansguardianfx.conf.template +++ b/config/dansguardian/dansguardianfx.conf.template @@ -29,7 +29,7 @@ */ $dgf= <<