Joined: 06 Nov 2002
Location: Toronto, Ontario, 3rd Rock From Sun
|Posted: Sat Feb 21, 2004 3:33 pm Post subject: Dansguardian and Zope
|If you have to install Dansguardian on a host with Zope, but with no Apache close by, then you can use this DTML as a CGI script for displaying the danguardian's "access denied" message:
<H2>ACCESS HAS BEEN DENIED</H2>
<br><em><dtml-var USER></em>, access to the page:<P>
<br>Access to the page:<P>
<strong><a href="<dtml-var DENIEDURL>"><dtml-var DENIEDURL></a></strong>
<P>... has been denied for the following reason:<P>
<strong><font color="#ff0000"><dtml-var REASON></font></strong>
<P>Your username, IP address, date, time and URL have been logged.
<P><table border=1 bgcolor="#FFEE00"><tr><td>You are seeing this error because the page you attempted<br>
to access contains, or is labelled as containing, material that
<br>has been deemed inappropriate.</td></tr></table>
<P><table border=1 bgcolor="#44dd44"><tr><td>If you have any queries contact your ICT Co-ordinator or Network Manager.</td></tr></table>
<P><font size=-3>Powered by <a href="http://dansguardian.org" target="_blank">DansGuardian</a></font>
In ZMI create new DTML in the root, drop the code from above and make the title as "DansGuardian - Access Denied". In/etc/dansguardian/dansguardian.conf refer to that page:
accessdeniedaddress = 'http://MY.ZOPE.HOST:ZPORT/dansguardian_html'
where MY.ZOPE.HOST is the host name for your zope server, and ZPORT is the port it's listening.
Just to remind: make sure you also have defined these dansguardian's own and squid's listening parameters:
filterip = 192.168.0.1
filterport = 8008
proxyip = 192.168.0.1
proxyport = 3128
Change IP addresses and ports to actual values your dansguardian and squid are supposed to listen.
That's it. Enjoy.
"Lisp is a programmable programming language." - John Foderaro, CACM, September 1991