Browse Source

e2guardian: add package

Signed-off-by: Luka Perkov <luka@openwrt.org>
Luka Perkov 10 years ago
parent
commit
a1438cc5a8

+ 78
- 0
net/e2guardian/Makefile View File

@@ -0,0 +1,78 @@
1
+#
2
+# Copyright (C) 2015 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=e2guardian
11
+PKG_VERSION:=3.0.4
12
+PKG_RELEASE:=1
13
+
14
+PKG_LICENSE:=GPL-2.0
15
+PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
16
+
17
+PKG_SOURCE:=v$(PKG_VERSION).tar.gz
18
+PKG_SOURCE_URL:=https://github.com/e2guardian/e2guardian/archive/
19
+PKG_MD5SUM:=f8ffac7ac4f040b672cc4e62121bf4c5
20
+
21
+PKG_BUILD_PARALLEL:=1
22
+PKG_INSTALL:=1
23
+
24
+include $(INCLUDE_DIR)/uclibc++.mk
25
+include $(INCLUDE_DIR)/package.mk
26
+
27
+define Package/e2guardian
28
+  SECTION:=net
29
+  DEPENDS:=+libpthread $(CXX_DEPENDS) +zlib +libpcre
30
+  CATEGORY:=Network
31
+  SUBMENU:=Web Servers/Proxies
32
+  TITLE:=E2Guardian
33
+  URL:=http://e2guardian.org/cms/
34
+endef
35
+
36
+define Package/e2guardian/conffiles
37
+/etc/e2guardian/e2guardianf1.conf
38
+/etc/config/e2guardian
39
+endef
40
+
41
+CONFIGURE_VARS += \
42
+	INCLUDES="" \
43
+	CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \
44
+	LIBS="-lpthread"
45
+
46
+CONFIGURE_ARGS += \
47
+		--with-sysconfsubdir=e2guardian \
48
+		--with-proxyuser=root \
49
+		--with-proxygroup=root \
50
+		--enable-pcre=yes
51
+
52
+define Build/Configure
53
+	$(call Build/Configure/Default,$CONFIGURE_ARGS)
54
+endef
55
+
56
+define Package/e2guardian/install
57
+	$(INSTALL_DIR) $(1)/usr/sbin
58
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2guardian $(1)/usr/sbin/
59
+
60
+	$(INSTALL_DIR) $(1)/etc
61
+	$(CP) $(PKG_INSTALL_DIR)/etc/e2guardian $(1)/etc/
62
+	$(INSTALL_CONF) ./files/e2guardianf1.conf $(1)/etc/e2guardian/e2guardianf1.conf
63
+
64
+	$(INSTALL_DIR) $(1)/etc/config
65
+	$(INSTALL_CONF) ./files/e2guardian.config $(1)/etc/config/e2guardian
66
+
67
+	$(INSTALL_DIR) $(1)/usr/share/e2guardian
68
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/e2guardian/transparent1x1.gif $(1)/usr/share/e2guardian/
69
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/e2guardian/blockedflash.swf $(1)/usr/share/e2guardian/
70
+
71
+	$(INSTALL_DIR) $(1)/usr/share/e2guardian/languages/ukenglish
72
+	$(CP) $(PKG_INSTALL_DIR)/usr/share/e2guardian/languages/ukenglish/* $(1)/usr/share/e2guardian/languages/ukenglish/
73
+
74
+	$(INSTALL_DIR) $(1)/etc/init.d/
75
+	$(INSTALL_BIN) ./files/e2guardian.init $(1)/etc/init.d/e2guardian
76
+endef
77
+
78
+$(eval $(call BuildPackage,e2guardian))

+ 70
- 0
net/e2guardian/files/e2guardian.config View File

@@ -0,0 +1,70 @@
1
+config e2guardian 'e2guardian'
2
+	option config_file '/etc/e2guardian/e2guardianf1.conf'
3
+	option languagedir '/usr/share/e2guardian/languages'
4
+	option language 'ukenglish'
5
+	option loglevel '2'
6
+	option logexceptionhits '2'
7
+	option logfileformat '1'
8
+	option loglocation '/dev/null'
9
+	option maxuploadsize '-1'
10
+	option filterip ''
11
+	option filterports '8080'
12
+	option proxyip '127.0.0.1'
13
+	option proxyport '3128'
14
+	option proxytimeout '20'
15
+	option proxyexchange '20'
16
+	option pcontimeout '55'
17
+	option accessdeniedaddress 'http://YOURSERVER.YOURDOMAIN/cgi-bin/e2guardian.pl'
18
+	option usecustombannedimage 'on'
19
+	option custombannedimagefile '/usr/share/e2guardian/transparent1x1.gif'
20
+	option usecustombannedflash 'on'
21
+	option custombannedflashfile '/usr/share/e2guardian/blockedflash.swf'
22
+	option filtergroups '1'
23
+	option filtergroupslist '/etc/e2guardian/lists/filtergroupslist'
24
+	option bannediplist '/etc/e2guardian/lists/bannediplist'
25
+	option exceptioniplist '/etc/e2guardian/lists/exceptioniplist'
26
+	option perroomdirectory '/etc/e2guardian/lists/bannedrooms/'
27
+	option showweightedfound 'on'
28
+	option weightedphrasemode '2'
29
+	option urlcachenumber '1000'
30
+	option urlcacheage '900'
31
+	option scancleancache 'on'
32
+	option phrasefiltermode '2'
33
+	option preservecase '0'
34
+	option hexdecodecontent 'off'
35
+	option forcequicksearch 'off'
36
+	option reverseaddresslookups 'off'
37
+	option reverseclientiplookups 'off'
38
+	option logclienthostnames 'off'
39
+	option createlistcachefiles 'on'
40
+	option prefercachedlists 'off'
41
+	option maxcontentfiltersize '256'
42
+	option maxcontentramcachescansize '2000'
43
+	option maxcontentfilecachescansize '20000'
44
+	option filecachedir '/tmp'
45
+	option deletedownloadedtempfiles 'on'
46
+	option initialtrickledelay '20'
47
+	option trickledelay '10'
48
+	option downloadmanager '/etc/e2guardian/downloadmanagers/default.conf'
49
+	option contentscannertimeout '60'
50
+	option contentscanexceptions 'off'
51
+	option recheckreplacedurls 'off'
52
+	option forwardedfor 'off'
53
+	option usexforwardedfor 'off'
54
+	option logconnectionhandlingerrors 'on'
55
+	option logchildprocesshandling 'off'
56
+	option maxchildren '180'
57
+	option minchildren '20'
58
+	option minsparechildren '16'
59
+	option preforkchildren '10'
60
+	option maxsparechildren '32'
61
+	option maxagechildren '500'
62
+	option maxips '0'
63
+	option ipcfilename '/tmp/.dguardianipc'
64
+	option urlipcfilename '/tmp/.dguardianurlipc'
65
+	option ipipcfilename '/tmp/.dguardianipipc'
66
+	option nodaemon 'off'
67
+	option nologger 'off'
68
+	option logadblocks 'off'
69
+	option loguseragent 'off'
70
+	option softrestart 'off'

+ 192
- 0
net/e2guardian/files/e2guardian.init View File

@@ -0,0 +1,192 @@
1
+#!/bin/sh /etc/rc.common
2
+# Copyright (C) 2015 OpenWrt.org
3
+
4
+START=90
5
+STOP=10
6
+
7
+USE_PROCD=1
8
+PROG=/usr/sbin/e2guardian
9
+CONFIGFILE="/tmp/e2guardian/e2guardian.conf"
10
+
11
+validate_e2guardian_section() {
12
+	uci_validate_section e2guardian e2guardian "${1}" \
13
+		'config_file:string' \
14
+		'accessdeniedaddress:string' \
15
+		'bannediplist:string' \
16
+		'contentscanexceptions:string' \
17
+		'contentscannertimeout:uinteger' \
18
+		'createlistcachefiles:string' \
19
+		'custombannedflashfile:string' \
20
+		'custombannedimagefile:string' \
21
+		'deletedownloadedtempfiles:string' \
22
+		'downloadmanager:string' \
23
+		'exceptioniplist:string' \
24
+		'filecachedir:string' \
25
+		'filtergroups:uinteger' \
26
+		'filtergroupslist:string' \
27
+		'filterip:ipaddr' \
28
+		'filterports:port:8080' \
29
+		'forcequicksearch:string' \
30
+		'forwardedfor:string' \
31
+		'hexdecodecontent:string' \
32
+		'initialtrickledelay:uinteger' \
33
+		'ipcfilename:string' \
34
+		'ipipcfilename:string' \
35
+		'languagedir:string' \
36
+		'language:string' \
37
+		'logadblocks:string' \
38
+		'logchildprocesshandling:string' \
39
+		'logclienthostnames:string' \
40
+		'logconnectionhandlingerrors:string' \
41
+		'logexceptionhits:range(0,2)' \
42
+		'logfileformat:range(1,6)' \
43
+		'loglevel:range(0,3)' \
44
+		'loglocation:string' \
45
+		'loguseragent:string' \
46
+		'maxagechildren:uinteger' \
47
+		'maxchildren:uinteger' \
48
+		'maxcontentfilecachescansize:uinteger' \
49
+		'maxcontentfiltersize:uinteger' \
50
+		'maxcontentramcachescansize:uinteger' \
51
+		'maxips:uinteger' \
52
+		'maxsparechildren:uinteger' \
53
+		'maxuploadsize:integer' \
54
+		'minchildren:uinteger' \
55
+		'minsparechildren:uinteger' \
56
+		'nodaemon:string' \
57
+		'nologger:string' \
58
+		'pcontimeout:range(5,300)' \
59
+		'perroomdirectory:string' \
60
+		'phrasefiltermode:range(0,3)' \
61
+		'prefercachedlists:string' \
62
+		'preforkchildren:uinteger' \
63
+		'preservecase:range(0,2)' \
64
+		'proxyexchange:range(20,300)' \
65
+		'proxyip:ipaddr' \
66
+		'proxyport:port:3128' \
67
+		'proxytimeout:range(5,100)' \
68
+		'recheckreplacedurls:string' \
69
+		'reverseaddresslookups:string' \
70
+		'reverseclientiplookups:string' \
71
+		'scancleancache:string' \
72
+		'showweightedfound:string' \
73
+		'softrestart:string' \
74
+		'trickledelay:uinteger' \
75
+		'urlcacheage:uinteger' \
76
+		'urlcachenumber:uinteger' \
77
+		'urlipcfilename:string' \
78
+		'usecustombannedflash:string' \
79
+		'usecustombannedimage:string' \
80
+		'usexforwardedfor:string' \
81
+		'weightedphrasemode:range(0,2)'
82
+}
83
+
84
+start_service() {
85
+
86
+	local config_file accessdeniedaddress bannediplist contentscanexceptions contentscannertimeout \
87
+		createlistcachefiles custombannedflashfile custombannedimagefile deletedownloadedtempfiles \
88
+		downloadmanager exceptioniplist filecachedir loglocation \
89
+		filtergroups filtergroupslist filterip filterports forcequicksearch forwardedfor hexdecodecontent \
90
+		initialtrickledelay ipcfilename ipipcfilename language languagedir logadblocks logchildprocesshandling \
91
+		logclienthostnames logconnectionhandlingerrors logexceptionhits logfileformat loglevel loguseragent \
92
+		maxagechildren maxchildren maxcontentfilecachescansize maxcontentfiltersize maxcontentramcachescansize \
93
+		maxips maxsparechildren maxuploadsize minchildren minsparechildren nodaemon nologger \
94
+		pcontimeout perroomdirectory phrasefiltermode prefercachedlists preforkchildren preservecase proxyexchange \
95
+		proxyip proxyport proxytimeout recheckreplacedurls reverseaddresslookups reverseclientiplookups scancleancache \
96
+		showweightedfound softrestart trickledelay urlcacheage urlcachenumber urlipcfilename usecustombannedflash \
97
+		usecustombannedimage usexforwardedfor weightedphrasemode
98
+
99
+	validate_e2guardian_section e2guardian || {
100
+		echo "validation failed"
101
+		return 1
102
+	}
103
+
104
+	mkdir -p $(dirname $CONFIGFILE)
105
+	ln -sf $config_file $(dirname $CONFIGFILE)
106
+
107
+	echo "accessdeniedaddress = " $accessdeniedaddress > $CONFIGFILE
108
+	echo "bannediplist = " $bannediplist >> $CONFIGFILE
109
+	echo "contentscanexceptions = " $contentscanexceptions >> $CONFIGFILE
110
+	echo "contentscannertimeout = " $contentscannertimeout >> $CONFIGFILE
111
+	echo "createlistcachefiles = " $createlistcachefiles >> $CONFIGFILE
112
+	echo "custombannedflashfile = " $custombannedflashfile >> $CONFIGFILE
113
+	echo "custombannedimagefile = " $custombannedimagefile >> $CONFIGFILE
114
+	echo "deletedownloadedtempfiles = " $deletedownloadedtempfiles >> $CONFIGFILE
115
+	echo "downloadmanager = " $downloadmanager >> $CONFIGFILE
116
+	echo "exceptioniplist = " $exceptioniplist >> $CONFIGFILE
117
+	echo "filecachedir = " $filecachedir >> $CONFIGFILE
118
+	echo "filtergroups = " $filtergroups >> $CONFIGFILE
119
+	echo "filtergroupslist = " $filtergroupslist >> $CONFIGFILE
120
+	echo "filterip = " $filterip >> $CONFIGFILE
121
+	echo "filterports = " $filterports >> $CONFIGFILE
122
+	echo "forcequicksearch = " $forcequicksearch >> $CONFIGFILE
123
+	echo "forwardedfor = " $forwardedfor >> $CONFIGFILE
124
+	echo "hexdecodecontent = " $hexdecodecontent >> $CONFIGFILE
125
+	echo "initialtrickledelay = " $initialtrickledelay >> $CONFIGFILE
126
+	echo "ipcfilename = " $ipcfilename >> $CONFIGFILE
127
+	echo "ipipcfilename = " $ipipcfilename >> $CONFIGFILE
128
+	echo "language = " $language >> $CONFIGFILE
129
+	echo "languagedir = " $languagedir >> $CONFIGFILE
130
+	echo "logadblocks = " $logadblocks >> $CONFIGFILE
131
+	echo "logchildprocesshandling = " $logchildprocesshandling >> $CONFIGFILE
132
+	echo "logclienthostnames = " $logclienthostnames >> $CONFIGFILE
133
+	echo "logconnectionhandlingerrors = " $logconnectionhandlingerrors >> $CONFIGFILE
134
+	echo "logexceptionhits = " $logexceptionhits >> $CONFIGFILE
135
+	echo "logfileformat = " $logfileformat >> $CONFIGFILE
136
+	echo "loglevel = " $loglevel >> $CONFIGFILE
137
+	echo "loglocation = " $loglocation >> $CONFIGFILE
138
+	echo "loguseragent = " $loguseragent >> $CONFIGFILE
139
+	echo "maxagechildren = " $maxagechildren >> $CONFIGFILE
140
+	echo "maxchildren = " $maxchildren >> $CONFIGFILE
141
+	echo "maxcontentfilecachescansize = " $maxcontentfilecachescansize >> $CONFIGFILE
142
+	echo "maxcontentfiltersize = " $maxcontentfiltersize >> $CONFIGFILE
143
+	echo "maxcontentramcachescansize = " $maxcontentramcachescansize >> $CONFIGFILE
144
+	echo "maxips = " $maxips >> $CONFIGFILE
145
+	echo "maxsparechildren = " $maxsparechildren >> $CONFIGFILE
146
+	echo "maxuploadsize = " $maxuploadsize >> $CONFIGFILE
147
+	echo "minchildren = " $minchildren >> $CONFIGFILE
148
+	echo "minsparechildren = " $minsparechildren >> $CONFIGFILE
149
+	echo "nodaemon = " $nodaemon >> $CONFIGFILE
150
+	echo "nologger = " $nologger >> $CONFIGFILE
151
+	echo "pcontimeout = " $pcontimeout >> $CONFIGFILE
152
+	echo "perroomdirectory = " $perroomdirectory >> $CONFIGFILE
153
+	echo "phrasefiltermode = " $phrasefiltermode >> $CONFIGFILE
154
+	echo "prefercachedlists = " $prefercachedlists >> $CONFIGFILE
155
+	echo "preforkchildren = " $preforkchildren >> $CONFIGFILE
156
+	echo "preservecase = " $preservecase >> $CONFIGFILE
157
+	echo "proxyexchange = " $proxyexchange >> $CONFIGFILE
158
+	echo "proxyip = " $proxyip >> $CONFIGFILE
159
+	echo "proxyport = " $proxyport >> $CONFIGFILE
160
+	echo "proxytimeout = " $proxytimeout >> $CONFIGFILE
161
+	echo "recheckreplacedurls = " $recheckreplacedurls >> $CONFIGFILE
162
+	echo "reverseaddresslookups = " $reverseaddresslookups >> $CONFIGFILE
163
+	echo "reverseclientiplookups = " $reverseclientiplookups >> $CONFIGFILE
164
+	echo "scancleancache = " $scancleancache >> $CONFIGFILE
165
+	echo "showweightedfound = " $showweightedfound >> $CONFIGFILE
166
+	echo "softrestart = " $softrestart >> $CONFIGFILE
167
+	echo "trickledelay = " $trickledelay >> $CONFIGFILE
168
+	echo "urlcacheage = " $urlcacheage >> $CONFIGFILE
169
+	echo "urlcachenumber = " $urlcachenumber >> $CONFIGFILE
170
+	echo "urlipcfilename = " $urlipcfilename >> $CONFIGFILE
171
+	echo "usecustombannedflash = " $usecustombannedflash >> $CONFIGFILE
172
+	echo "usecustombannedimage = " $usecustombannedimage >> $CONFIGFILE
173
+	echo "usexforwardedfor = " $usexforwardedfor >> $CONFIGFILE
174
+	echo "weightedphrasemode = " $weightedphrasemode >> $CONFIGFILE
175
+
176
+	procd_open_instance
177
+	procd_set_param command $PROG -N -c "$CONFIGFILE"
178
+	procd_set_param file $CONFIGFILE
179
+	procd_set_param respawn
180
+	procd_close_instance
181
+}
182
+
183
+stop_service()
184
+{
185
+	e2guardian -s | awk -F':' '{ print $2}' | xargs kill -9
186
+}
187
+
188
+service_triggers()
189
+{
190
+	procd_add_reload_trigger "e2guardian"
191
+	procd_add_validation validate_e2guardian_section
192
+}

+ 426
- 0
net/e2guardian/files/e2guardianf1.conf View File

@@ -0,0 +1,426 @@
1
+# e2guardian filter group config file for version 3.0.4
2
+
3
+
4
+# Filter group mode
5
+# This option determines whether members of this group have their web access
6
+# unfiltered, filtered, or banned.
7
+#
8
+# 0 = banned
9
+# 1 = filtered
10
+# 2 = unfiltered (exception)
11
+#
12
+# Only filter groups with a mode of 1 need to define phrase, URL, site, extension,
13
+# mimetype and PICS lists; in other modes, these options are ignored to conserve
14
+# memory.
15
+#
16
+# Defaults to 0 if unspecified.
17
+# Unauthenticated users are treated as being in the first filter group.
18
+groupmode = 1
19
+
20
+# Filter group name
21
+# Used to fill in the -FILTERGROUP- placeholder in the HTML template file, and to
22
+# name the group in the access logs
23
+# Defaults to empty string
24
+#groupname = ''
25
+groupname = ''
26
+
27
+# Content filtering files location
28
+bannedphraselist = 'etc/e2guardian/lists/bannedphraselist'
29
+weightedphraselist = 'etc/e2guardian/lists/weightedphraselist'
30
+exceptionphraselist = 'etc/e2guardian/lists/exceptionphraselist'
31
+bannedsitelist = 'etc/e2guardian/lists/bannedsitelist'
32
+greysitelist = 'etc/e2guardian/lists/greysitelist'
33
+bannedsslsitelist = 'etc/e2guardian/lists/bannedsslsitelist'
34
+greysslsitelist = 'etc/e2guardian/lists/greysslsitelist'
35
+exceptionsitelist = 'etc/e2guardian/lists/exceptionsitelist'
36
+bannedurllist = 'etc/e2guardian/lists/bannedurllist'
37
+greyurllist = 'etc/e2guardian/lists/greyurllist'
38
+exceptionurllist = 'etc/e2guardian/lists/exceptionurllist'
39
+exceptionregexpurllist = 'etc/e2guardian/lists/exceptionregexpurllist'
40
+bannedregexpurllist = 'etc/e2guardian/lists/bannedregexpurllist'
41
+picsfile = 'etc/e2guardian/lists/pics'
42
+contentregexplist = 'etc/e2guardian/lists/contentregexplist'
43
+urlregexplist = 'etc/e2guardian/lists/urlregexplist'
44
+refererexceptionsitelist = 'etc/e2guardian/lists/refererexceptionsitelist'
45
+refererexceptionurllist = 'etc/e2guardian/lists/refererexceptionurllist'
46
+embededreferersitelist = 'etc/e2guardian/lists/embededreferersitelist'
47
+embededrefererurllist = 'etc/e2guardian/lists/embededrefererurllist'
48
+urlredirectregexplist = 'etc/e2guardian/lists/urlredirectregexplist'
49
+
50
+# local versions of lists (where LOCAL_LISTS enabled)
51
+#localbannedsitelist = 'etc/e2guardian/lists/localbannedsitelist'
52
+#localgreysitelist = 'etc/e2guardian/lists/localgreysitelist'
53
+#localexceptionsitelist = 'etc/e2guardian/lists/localexceptionsitelist'
54
+#localbannedurllist = 'etc/e2guardian/lists/localbannedurllist'
55
+#localgreyurllist = 'etc/e2guardian/lists/localgreyurllist'
56
+#localexceptionurllist = 'etc/e2guardian/lists/localexceptionurllist'
57
+#localbannedsslsitelist = 'etc/e2guardian/lists/localbannedsslsitelist'
58
+#localgreysslsitelist = 'etc/e2guardian/lists/localgreysslsitelist'
59
+#localbannedsearchlist = 'etc/e2guardian/lists/localbannedsearchlist'
60
+
61
+!! Not compiled !! authexceptionsitelist = 'etc/e2guardian/lists/authexceptionsitelist'
62
+!! Not compiled !! authexceptionurllist = 'etc/e2guardian/lists/authexceptionurllist'
63
+
64
+# Filetype filtering
65
+#
66
+# Allow bannedregexpurllist with grey list mode
67
+# bannedregexpheaderlist and bannedregexpurllist
68
+#
69
+# bannedregexwithblanketblock = off
70
+#
71
+# Blanket download blocking
72
+# If enabled, all files will be blocked, unless they match the
73
+# exceptionextensionlist or exceptionmimetypelist.
74
+# These lists do not override virus scanning.
75
+# Exception lists defined above override all types of filtering, including
76
+# the blanket download block.
77
+# Defaults to disabled.
78
+# (on | off)
79
+#
80
+blockdownloads = off
81
+exceptionextensionlist = 'etc/e2guardian/lists/exceptionextensionlist'
82
+exceptionmimetypelist = 'etc/e2guardian/lists/exceptionmimetypelist'
83
+#
84
+# Use the following lists to block specific kinds of file downloads.
85
+# The two exception lists above can be used to override these.
86
+#
87
+bannedextensionlist = 'etc/e2guardian/lists/bannedextensionlist'
88
+bannedmimetypelist = 'etc/e2guardian/lists/bannedmimetypelist'
89
+#
90
+# In either file filtering mode, the following list can be used to override
91
+# MIME type & extension blocks for particular domains & URLs (trusted download sites).
92
+#
93
+exceptionfilesitelist = 'etc/e2guardian/lists/exceptionfilesitelist'
94
+exceptionfileurllist = 'etc/e2guardian/lists/exceptionfileurllist'
95
+
96
+# POST protection (web upload and forms)
97
+# does not block forms without any file upload, i.e. this is just for
98
+# blocking or limiting uploads
99
+# measured in kibibytes after MIME encoding and header bumph
100
+# use 0 for a complete block
101
+# use higher (e.g. 512 = 512Kbytes) for limiting
102
+# use -1 for no blocking
103
+#maxuploadsize = 512
104
+#maxuploadsize = 0
105
+maxuploadsize = -1
106
+
107
+# Categorise without blocking:
108
+# Supply categorised lists here and the category string shall be logged against
109
+# matching requests, but matching these lists does not perform any filtering
110
+# action.
111
+#logsitelist = 'etc/e2guardian/lists/logsitelist'
112
+#logurllist = 'etc/e2guardian/lists/logurllist'
113
+#logregexpurllist = 'etc/e2guardian/lists/logregexpurllist'
114
+
115
+# Outgoing HTTP header rules:
116
+# Optional lists for blocking based on, and modification of, outgoing HTTP
117
+# request headers.  Format for headerregexplist is one modification rule per
118
+# line, similar to content/URL modifications.  Format for
119
+# bannedregexpheaderlist is one regular expression per line, with matching
120
+# headers causing a request to be blocked.
121
+# Headers are matched/replaced on a line-by-line basis, not as a contiguous
122
+# block.
123
+# Use for example, to remove cookies or prevent certain user-agents.
124
+headerregexplist = 'etc/e2guardian/lists/headerregexplist'
125
+bannedregexpheaderlist = 'etc/e2guardian/lists/bannedregexpheaderlist'
126
+addheaderregexplist = 'etc/e2guardian/lists/addheaderregexplist'
127
+
128
+# Weighted phrase mode
129
+# Optional; overrides the weightedphrasemode option in e2guardian.conf
130
+# for this particular group.  See documentation for supported values in
131
+# that file.
132
+#weightedphrasemode = 0
133
+
134
+# Naughtiness limit
135
+# This the limit over which the page will be blocked.  Each weighted phrase is given
136
+# a value either positive or negative and the values added up.  Phrases to do with
137
+# good subjects will have negative values, and bad subjects will have positive
138
+# values.  See the weightedphraselist file for examples.
139
+# As a guide:
140
+# 50 is for young children,  100 for old children,  160 for young adults.
141
+naughtynesslimit = 50
142
+
143
+# Search term blocking
144
+# Search terms can be extracted from search URLs and filtered using one or
145
+# both of two different methods.
146
+
147
+# Method 1 is that developed by Protex where specific
148
+# search terms are contained in a bannedsearchlist.
149
+# (localbannedsearchlist and bannedsearchoveridelist can be used to suppliment
150
+# and overide this list as required.)
151
+# These lists contain banned search words combinations on each line.
152
+# Words are separated by '+' and must be in sorted order within a line.
153
+#    so to block 'sexy girl' then the list must contain the line
154
+#    	girl+sexy
155
+#    and this will block both 'sexy girl' and 'girl sexy'
156
+# To use this method, the searchregexplist must be enabled and the bannedsearchlist(s) defined
157
+
158
+# Method 2 is uses the
159
+# bannedphraselist, weightedphraselist and exceptionphraselist, with a separate
160
+# threshold for blocking than that used for normal page content.
161
+# To do this, the searchregexplist must be enabled and searchtermlimit
162
+# must be grater than 0.
163
+
164
+#
165
+# Search engine regular expression list (need for both options)
166
+# List of regular expressions for matching search engine URLs.  It is assumed
167
+# that the search terms themselves will be contained in the
168
+# of output of each expression.
169
+#searchregexplist = 'etc/e2guardian/lists/searchregexplist'
170
+#
171
+# Banned Search Term list(s) for option 1
172
+#bannedsearchlist = 'etc/e2guardian/lists/bannedsearchlist'
173
+#bannedsearchoveridelist = 'etc/e2guardian/lists/bannedsearchoveridelist'
174
+
175
+
176
+# Search term limit (for Option 2)
177
+# The limit over which requests will be blocked for containing search terms
178
+# which match the weightedphraselist.  This should usually be lower than the
179
+# 'naughtynesslimit' value above, because the amount of text being filtered
180
+# is only a few words, rather than a whole page.
181
+# This option must be uncommented if searchregexplist is uncommented.
182
+# A value of 0 here indicates that search terms should be extracted,
183
+# but no phrase filtering should be performed on the resulting text.
184
+#searchtermlimit = 0
185
+#
186
+# Search term phrase lists (for Option 2)
187
+# If the three lines below are uncommented, search term blocking will use
188
+# the banned, weighted & exception phrases from these lists, instead of using
189
+# the same phrase lists as for page content.  This is optional but recommended,
190
+# as weights for individual phrases in the "normal" lists may not be
191
+# appropriate for blocking when those phrases appear in a much smaller block
192
+# of text.
193
+# Please note that all or none of the below should be uncommented, not a
194
+# mixture.
195
+#bannedsearchtermlist = 'etc/e2guardian/lists/bannedsearchtermlist'
196
+#weightedsearchtermlist = 'etc/e2guardian/lists/weightedsearchtermlist'
197
+#exceptionsearchtermlist = 'etc/e2guardian/lists/exceptionsearchtermlist'
198
+
199
+# Category display threshold
200
+# This option only applies to pages blocked by weighted phrase filtering.
201
+# Defines the minimum score that must be accumulated within a particular
202
+# category in order for it to show up on the block pages' category list.
203
+# All categories under which the page scores positively will be logged; those
204
+# that were not displayed to the user appear in brackets.
205
+#
206
+# -1 = display only the highest scoring category
207
+# 0 = display all categories (default)
208
+# > 0 = minimum score for a category to be displayed
209
+categorydisplaythreshold = 0
210
+
211
+# Embedded URL weighting
212
+# When set to something greater than zero, this option causes URLs embedded within a
213
+# page's HTML (from links, image tags, etc.) to be extracted and checked against the
214
+# bannedsitelist and bannedurllist. Each link to a banned page causes the amount set
215
+# here to be added to the page's weighting.
216
+# The behaviour of this option with regards to multiple occurrences of a site/URL is
217
+# affected by the weightedphrasemode setting.
218
+#
219
+# NB: Currently, this feature uses regular expressions that require the PCRE library.
220
+# As such, it is only available if you compiled DansGuardian with '--enable-pcre=yes'.
221
+# You can check compile-time options by running 'e2guardian -v'.
222
+#
223
+# Set to 0 to disable.
224
+# Defaults to 0.
225
+# WARNING: This option is highly CPU intensive!
226
+embeddedurlweight = 0
227
+
228
+# Enable PICS rating support
229
+#
230
+# Defaults to disabled
231
+# (on | off)
232
+enablepics = off
233
+
234
+# Temporary Denied Page Bypass
235
+# This provides a link on the denied page to bypass the ban for a few minutes.  To be
236
+# secure it uses a random hashed secret generated at daemon startup.  You define the
237
+# number of seconds the bypass will function for before the deny will appear again.
238
+# To allow the link on the denied page to appear you will need to edit the template.html
239
+# or e2guardian.pl file for your language.
240
+# 300 = enable for 5 minutes
241
+# 0 = disable ( defaults to 0 )
242
+# -1 = enable but you require a separate program/CGI to generate a valid link
243
+bypass = 0
244
+
245
+# Temporary Denied Page Bypass Secret Key
246
+# Rather than generating a random key you can specify one.  It must be more than 8 chars.
247
+# '' = generate a random one (recommended and default)
248
+# 'Mary had a little lamb.' = an example
249
+# '76b42abc1cd0fdcaf6e943dcbc93b826' = an example
250
+bypasskey = ''
251
+
252
+# Infection/Scan Error Bypass
253
+# Similar to the 'bypass' setting, but specifically for bypassing files scanned and found
254
+# to be infected, or files that trigger scanner errors - for example, archive types with
255
+# recognised but unsupported compression schemes, or corrupt archives.
256
+# The option specifies the number of seconds for which the bypass link will be valid.
257
+# 300 = enable for 5 minutes
258
+# 0 = disable (default)
259
+# -1 = enable, but require a separate program/CGI to generate a valid link
260
+infectionbypass = 0
261
+
262
+# Infection/Scan Error Bypass Secret Key
263
+# Same as the 'bypasskey' option, but used for infection bypass mode.
264
+infectionbypasskey = ''
265
+
266
+# Infection/Scan Error Bypass on Scan Errors Only
267
+# Enable this option to allow infectionbypass links only when virus scanning fails,
268
+# not when a file is found to contain a virus.
269
+# on = enable (default and highly recommended)
270
+# off = disable
271
+infectionbypasserrorsonly = on
272
+
273
+# Disable content scanning
274
+# If you enable this option you will disable content scanning for this group.
275
+# Content scanning primarily is AV scanning (if enabled) but could include
276
+# other types.
277
+# (on|off) default = off.
278
+disablecontentscan = off
279
+
280
+# Enable Deep URL Analysis
281
+# When enabled, DG looks for URLs within URLs, checking against the bannedsitelist and
282
+# bannedurllist. This can be used, for example, to block images originating from banned
283
+# sites from appearing in Google Images search results, as the original URLs are
284
+# embedded in the thumbnail GET requests.
285
+# (on|off) default = off
286
+deepurlanalysis = off
287
+
288
+# reportinglevel
289
+#
290
+# -1 = log, but do not block - Stealth mode
291
+#  0 = just say 'Access Denied'
292
+#  1 = report why but not what denied phrase
293
+#  2 = report fully
294
+#  3 = use HTML template file (accessdeniedaddress ignored) - recommended
295
+#
296
+# If defined, this overrides the global setting in e2guardian.conf for
297
+# members of this filter group.
298
+#
299
+reportinglevel = 3
300
+
301
+# accessdeniedaddress is the address of your web server to which the cgi
302
+# e2guardian reporting script was copied. Only used in reporting levels
303
+# 1 and 2.
304
+#
305
+# This webserver must be either:
306
+#  1. Non-proxied. Either a machine on the local network, or listed as an
307
+#     exception in your browser's proxy configuration.
308
+#  2. Added to the exceptionsitelist. Option 1 is preferable; this option is
309
+#     only for users using both transparent proxying and a non-local server
310
+#     to host this script.
311
+#
312
+# If defined, this overrides the global setting in e2guardian.conf for
313
+# members of this filter group.
314
+#
315
+#accessdeniedaddress = 'http://YOURSERVER.YOURDOMAIN/cgi-bin/e2guardian.pl'
316
+
317
+# sslaccessdeniedaddress is the address of your web server to which the static page
318
+# e2guardian reporting was copied. Only used in reporting levels 3 (avoid blank page)
319
+# Work only in firefox with ssldeniedrewrite off
320
+
321
+# sslaccessdeniedaddress = 'http://YOURSERVER.YOURDOMAIN/denyssl.htm'
322
+
323
+# Break SSL protocol and redirect to another HTTPS website for denied page (sslaccessdeniedaddress url)
324
+
325
+#ssldeniedrewrite = 'on'
326
+
327
+# HTML Template override
328
+# If defined, this specifies a custom HTML template file for members of this
329
+# filter group, overriding the global setting in e2guardian.conf. This is
330
+# only used in reporting level 3.
331
+#
332
+# The default template file path is <languagedir>/<language>/template.h
333
+# e.g. share/e2guardian/languages/ukenglish/template.html when using 'ukenglish'
334
+# language.
335
+#
336
+# This option generates a file path of the form:
337
+# <languagedir>/<language>/<htmltemplate>
338
+# e.g. share/e2guardian/languages/ukenglish/custom.html
339
+#
340
+#htmltemplate = 'custom.html'
341
+
342
+# Non standard delimiter (only used with accessdeniedaddress)
343
+# To help preserve the full banned URL, including parameters, the variables
344
+# passed into the access denied CGI are separated using non-standard
345
+# delimiters. This can be useful to ensure correct operation of the filter
346
+# bypass modes. Parameters are split using "::" in place of "&", and "==" in
347
+# place of "=".
348
+# Default is enabled, but to go back to the standard mode, disable it.
349
+
350
+#nonstandarddelimiter = off
351
+
352
+# Email reporting - original patch by J. Gauthier
353
+
354
+# Use SMTP
355
+# If on, will enable system wide events to be reported by email.
356
+# need to configure mail program (see 'mailer' in global config)
357
+# and email recipients
358
+# default usesmtp = off
359
+#!! Not compiled !!usesmtp = off
360
+
361
+# mailfrom
362
+# who the email would come from
363
+# example: mailfrom = 'e2guardian@mycompany.com'
364
+#!! Not compiled !!mailfrom = ''
365
+
366
+# avadmin
367
+# who the virus emails go to (if notify av is on)
368
+# example: avadmin = 'admin@mycompany.com'
369
+#!! Not compiled !!avadmin = ''
370
+
371
+# contentdmin
372
+# who the content emails go to (when thresholds are exceeded)
373
+# and contentnotify is on
374
+# example: contentadmin = 'admin@mycompany.com'
375
+#!! Not compiled !!contentadmin = ''
376
+
377
+# avsubject
378
+# Subject of the email sent when a virus is caught.
379
+# only applicable if notifyav is on
380
+# default avsubject = 'e2guardian virus block'
381
+#!! Not compiled !!avsubject = 'e2guardian virus block'
382
+
383
+# content
384
+# Subject of the email sent when violation thresholds are exceeded
385
+# default contentsubject = 'e2guardian violation'
386
+#!! Not compiled !!contentsubject = 'e2guardian violation'
387
+
388
+# notifyAV
389
+# This will send a notification, if usesmtp/notifyav is on, any time an
390
+# infection is found.
391
+# Important: If this option is off, viruses will still be recorded like a
392
+# content infraction.
393
+#!! Not compiled !!notifyav = off
394
+
395
+# notifycontent
396
+# This will send a notification, if usesmtp is on, based on thresholds
397
+# below
398
+#!! Not compiled !!notifycontent = off
399
+
400
+# thresholdbyuser
401
+# results are only predictable with user authenticated configs
402
+# if enabled the violation/threshold count is kept track of by the user
403
+#!! Not compiled !!thresholdbyuser = off
404
+
405
+#violations
406
+# number of violations before notification
407
+# setting to 0 will never trigger a notification
408
+#!! Not compiled !!violations = 0
409
+
410
+#threshold
411
+# this is in seconds. If 'violations' occur in 'threshold' seconds, then
412
+# a notification is made.
413
+# if this is set to 0, then whenever the set number of violations are made a
414
+# notifaction will be sent.
415
+#!! Not compiled !!threshold = 0
416
+
417
+#SSL certificate checking
418
+# Check that ssl certificates for servers on https connections are valid
419
+# and signed by a ca in the configured path
420
+sslcertcheck = off
421
+
422
+#SSL man in the middle
423
+# Forge ssl certificates for all sites, decrypt the data then re encrypt it
424
+# using a different private key. Used to filter ssl sites
425
+sslmitm = off
426
+