Squidguard redirect info question
-
Hi
We're just setting up pfSense with SquidGuard for a school. We're keen to make the blocking experience as pleasant as possible and want to make a custom block page that (among other things) will facilitate the blocked user to report blocked sites they think should be available. It seems at first glance this would be easiest with a redirect to an external server - however we can't find documentation that tells us what (if any) information is passed with the redirect, nor what the advantages or disadvantages of the different external redirect types are.
Thanks for any input you can give.
Chris
-
This could help you:
https://github.com/bsdperimeter/pfsense-packages/blob/master/config/squidGuard/sgerror.phpThis part displayes an IE error page:
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # IE displayed self-page, if them size > 1024 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ function get_error_page($er_code_id, $err_msg='') { global $err_code; global $cl; global $g; global $config; $str = Array(); header("HTTP/1.1 " . $err_code[$er_code_id]); $str[] = ''; $str[] = ''; if ($config['installedpackages']['squidguarddefault']['config'][0]['deniedmessage']) { $str[] = " ### {$config['installedpackages']['squidguarddefault']['config'][0]['deniedmessage']}: {$err_code[$er_code_id]} "; } else { $str[] = " ### Request denied by {$g['product_name']} proxy: {$err_code[$er_code_id]} "; } if ($err_msg) $str[] = " **Reason:** $err_msg"; $str[] = ' * * * '; if ($cl['a']) $str[] = " **Client address:** {$cl['a']} "; if ($cl['n']) $str[] = " **Client name:** {$cl['n']} "; if ($cl['i']) $str[] = " **Client user:** {$cl['i']} "; if ($cl['s']) $str[] = " **Client group:** {$cl['s']} "; if ($cl['t']) $str[] = " **Target group:** {$cl['t']} "; if ($cl['u']) $str[] = " **URL:** {$cl['u']} "; $str[] = ' * * * '; $str[] = ""; $str[] = ""; return implode("\n", $str); }
You can replce the part above with your page. Install squidguard, modify this file (sgerror.php) and re-save and re-apply squidguard.
Redirect mode for me is: int error page (enter error message)
Redirect is for me "Your are not allowed to watch the following URL"
I am using squid in transparent mode - but it is working with int error page - even if the description says it's not possible.My custom page looks like the attached.