Author Topic: Squid3 & dansguardian transparent proxy  (Read 269 times)

Govo

  • Veteran
  • ***
  • Posts: 125
    • View Profile
Squid3 & dansguardian transparent proxy
« on: May 06, 2015, 02:13:35 am »
Hi
Just want to post this here future reference hope LMCE team don't mind, and for any one looking for transparent proxy the below works, I have it working on Linuxmce 10.4

remember I  am not responsible  if your machine breaks. but again I just want some were to future reference.

I respect the fact that squid in been worked on for the new up coming releases. as per http://wiki.linuxmce.org/index.php/Squid
and well done to the dev's.

heres my quick notes to get it working  (some wording is taken from http://wiki.linuxmce.org/index.php/Installing_Dansguardian & http://wiki.linuxmce.org/index.php/Squid  )

thanks to these wiki pages they helped a lot

sudo apt-get install squid3
edit squid3 config 
nano /etc/squid3/squid.conf
replace 
http_port 3128 to http_port 3128 transparent
Find the "acl localhost src" line and insert the following line below: "acl dcerouterlocalnet src 192.168.80.0/24"
Find the following line: # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
Under the line is one that reads "http_access allow localhost". Below this you need to insert a line allowing your local LAN; "http_access allow dcerouterlocalnet. Now save the file, and exit.


apt-get install dansguardian
nano /etc/dansguardian/dansguardian.conf
change filter port to  8081 and proxyip = 192.168.80.1
save

/etc/init.d/apache2 restart
/etc/init.d/dansguardian stop
/etc/init.d/dansguardian start
sudo /etc/init.d/squid3 restart

download and edit file /usr/pluto/bin/Network_Firewall.sh from  linuxmce  system
Add the below line  in # Set some default firewall parameters before opening ports
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8081

The normal firewall forwarding rule would not work even if  you enable it, so my work around was to setup upon booting the core.
Change permission to user to override file when uploading. Lmc will reset permission on reboot
chown  user name goes  here   -R /usr/pluto/bin/Network_Firewall.sh   upload and then reboot

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3140
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Squid3 & dansguardian transparent proxy
« Reply #1 on: May 06, 2015, 10:47:29 am »
govo,

nice work, but we already have that implemented in LinuxMCE. Check with Alblasco1702. Might be, that it is in 1204ff available only.

Govo

  • Veteran
  • ***
  • Posts: 125
    • View Profile
Re: Squid3 & dansguardian transparent proxy
« Reply #2 on: May 07, 2015, 11:35:48 pm »
Hi posde

Thanks for the reply, but I can confirm its not in 10,4, however when I ran update to upgrade firefox, I do see these options in the lmce-admin for a proxy  and web filter but  when you  click them, you get the below error.

{ScriptTRColor}
 
Not a valid section

I guessing these are for the release of 12.4
.


Cheers
Gov


posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3140
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Squid3 & dansguardian transparent proxy
« Reply #3 on: May 08, 2015, 10:20:42 am »
phenigma just confirmed to me that Albalasco seems to have completed the stuff, but it isn't in the repo yet. And he is currently AWOL

Govo

  • Veteran
  • ***
  • Posts: 125
    • View Profile
Re: Squid3 & dansguardian transparent proxy
« Reply #4 on: May 08, 2015, 06:32:07 pm »
Brilliant, thanks for the reply.

phenigma

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1191
    • View Profile
Re: Squid3 & dansguardian transparent proxy
« Reply #5 on: May 10, 2015, 01:04:15 am »
:(  I'm hoping we can get this all resolved soon.  However we won't be adding it to the 1004 release specifically (if we can get it perfect in 1204 you might twist my arm but the chances are slim).  Govo thank you for the info to get it working in 1004 now!  :D

-Jason

Govo

  • Veteran
  • ***
  • Posts: 125
    • View Profile
Re: Squid3 & dansguardian transparent proxy
« Reply #6 on: May 15, 2015, 08:55:59 pm »
No problem at all.