Custom Access Denied Page – PfSense Squid Proxy


If like me you want to customise your Squid Proxy error page then , you have come to the correct place.

Before we start, i have already setup transparent proxy on port 80 and WPAD to cover the HTTPS stuff. Go do that then come back, ( i can’t be bothered right now to do a tutorial for that, maybe another day)

Great, your back …. so here we go.

I’m currently using PfSense 2.3.4-RELEASE (amd64) and Squid 0.4.36_3.

When i am using my Windows 10 machine, i will enable SSH on PfSense and use WinSCP to connect.
In PfSense go to
System –> Advanced –> Admin Access , then enabled SSH.

Now with WinSCP go to (on the PfSense box)
/usr/local/etc/squid/errors/en

you will see something like

now you can customise all these squid alerts if you like, but at the moment I am only interested in the one that says

ERR_ACCESS_DENIED

as this is the one that I will be using to stop my kids going on agar.io and slither.io and roblox.com during the week when they should be doing homework.

WARNING: You will need to replace these files anytime PfSense updates squid as they get overwritten.

Anyways, you can just download one of these files to your local system and start editing it with any HTML editor.

You can get creative here, you don’t need me to tell you how to edit HTML.. 🙂

But you will need to read the squid documentation as there are going to be some variables you might want to edit , like

or this

 

once that is done, save it and upload it to the PfSense box. All done.
Go test your new alert page …