Author Topic: [SOLVED] How to edit access denied page?  (Read 18177 times)

mat1_8

  • Zen Monk
  • **
  • Posts: 99
  • Karma: +0/-1
    • View Profile
[SOLVED] How to edit access denied page?
« on: April 23, 2013, 11:49:55 am »
Hi,

I am using dansguardian and would like to change the way the access denied page looks. Kindly can someone tell me the path to the html file please? Thank you
« Last Edit: April 29, 2013, 12:00:50 pm by mat1_8 »

Sam Graf

  • Guest

mat1_8

  • Zen Monk
  • **
  • Posts: 99
  • Karma: +0/-1
    • View Profile
Re: How to edit access denied page?
« Reply #2 on: April 23, 2013, 02:01:22 pm »
Thanks :)

mat1_8

  • Zen Monk
  • **
  • Posts: 99
  • Karma: +0/-1
    • View Profile
Re: How to edit access denied page?
« Reply #3 on: April 24, 2013, 02:54:38 pm »
Hi,

Somehow I am managing to edit the access denied page. Just to be clear, the access denied page is regarding categories that are being blocked. In this case I have downloaded dansguardian blacklist and choosing which categories will be blacklisted.

The default access denied page does not show which category is being blocked. For example if I blacklist facebook.com, the access denied page does not show in which category facebook.com is (social networking). Is there a way to make an access denied page but showing which category is being blocked please? I think this may require some programming? Thanks

mat1_8

  • Zen Monk
  • **
  • Posts: 99
  • Karma: +0/-1
    • View Profile
Re: How to edit access denied page?
« Reply #4 on: April 24, 2013, 04:01:21 pm »
Hi,

I have found out that from Dansguardian website, its own HTML template file can display the category of the website. The problem is that if a website is blocked, the HTML error page being displayed is of Squid and not of Dansguardian (which I would like to display).

The other thing which I am thinking of is to copy the Dansguardian HTML file and use it instead of Squid HTML file. The only problem is that Squid has many languages and I am only interested in the English language. When I tried to edit the ERR_ACCESS_DENIED file, no changes were made so I think I was not editing the proper file. Kindly can someone please tell me the exact path that Squid uses by default? Thanks

mat1_8

  • Zen Monk
  • **
  • Posts: 99
  • Karma: +0/-1
    • View Profile
Re: How to edit access denied page?
« Reply #5 on: April 24, 2013, 04:33:10 pm »
Ok a little update. I managed to edit the actual template file being in use. The actual path is /usr/share/squid3/errors /English. I copied the dansguardian HTML file instead of the squid html file and the webpage is coming up BUT the categories are blank. Guys I really need your help in this please...has someone ever configured such thing before? Thanks

mat1_8

  • Zen Monk
  • **
  • Posts: 99
  • Karma: +0/-1
    • View Profile
Re: How to edit access denied page?
« Reply #6 on: April 25, 2013, 08:24:27 am »
Is there a way to pass traffic through dansgurdian (for website filtering) instead of squid please? In a sense that traffic is passing through dansguardian BUT for some reason or another the access denied page displayed is of squid and NOT of dansguardian.

christian

  • Guest
Re: How to edit access denied page?
« Reply #7 on: April 25, 2013, 08:30:16 am »
has someone ever configured such thing before?

Not me... because 2.2 page does report category so I'm happy with this  ;)

mat1_8

  • Zen Monk
  • **
  • Posts: 99
  • Karma: +0/-1
    • View Profile
Re: How to edit access denied page?
« Reply #8 on: April 25, 2013, 08:30:58 am »
Lucky you :P lol

mat1_8

  • Zen Monk
  • **
  • Posts: 99
  • Karma: +0/-1
    • View Profile
Re: How to edit access denied page?
« Reply #9 on: April 25, 2013, 08:32:36 am »
The strange thing is that when the website blocks a virus such as EICAR, the category is displayed automatically by dansguardian but when another website is blocked such as facebook.com, the error page displayed is of squid without a category :S.

christian

  • Guest
Re: How to edit access denied page?
« Reply #10 on: April 25, 2013, 08:33:16 am »
In a sense that traffic is passing through dansguardian BUT for some reason or another the access denied page displayed is of squid and NOT of dansguardian.

This is not "for some reason" but on purpose  ::)
What you access with your browser is Squid (HTTP proxy)
filtering in squid has been delegated (that's Zentyal design choice) to Dansguardian and result is sent back to squid which is communicating with your browser.

mat1_8

  • Zen Monk
  • **
  • Posts: 99
  • Karma: +0/-1
    • View Profile
Re: How to edit access denied page?
« Reply #11 on: April 25, 2013, 08:39:19 am »
Oh I see hmm now in my case I wish that it would stop at dansguardian instead of going back to squid :S.

Christian just to double check with you. I do not know how much familiar you are with Zentyal 3.0. What I have done is that I have downloaded dansgurdian blacklist, went to HTTP proxy -> categorized lists -> browsed for the zipped version of the blacklist which I have downloaded and imported the file successfully.

Then I created different filter profiles and chose which categories are blacklisted. Have I followed good procedures please? Thanks

christian

  • Guest
Re: How to edit access denied page?
« Reply #12 on: April 25, 2013, 08:46:19 am »
I'm not familiar with 3.0 and can't help further.
HTTP proxy in 3.0 offer more capability and flexibility in term of filtering, indeed, but there is no technical documentation thus I'm almost blind with what happens under the hood as I don't want to do any reverse engineering with this version.

What you did looks ok. What you could check looking at guardianship and squid is whether filtering is done relying on same process for all filtering features. Is content filtering always done by Dansguadian (first point) and is it confirmed that when you import or create such list, it impact "content filtering" or is it rather URL filtering which might be done by Squid itself, therefore no category or different "error" page.

Or wait for someone having investigated this deeper ;)

mat1_8

  • Zen Monk
  • **
  • Posts: 99
  • Karma: +0/-1
    • View Profile
Re: How to edit access denied page?
« Reply #13 on: April 25, 2013, 08:50:29 am »
Hmm it makes sense well I think have to wait for someone to respond then. Right now I am still experimenting so if I manage will post and update thanks :)

mat1_8

  • Zen Monk
  • **
  • Posts: 99
  • Karma: +0/-1
    • View Profile
Re: How to edit access denied page?
« Reply #14 on: April 25, 2013, 11:44:45 am »
Anyone?