And so, today I will tell you how to configure http proxy server with a single administration SAMS.
A proxy server is required when you want to restrict access to Internet resources, cut traffic to users (quota) as well as it helps protect clients from network attacks.
Sams in particular Web form for Administration.
For the installation we will need the following packages Sams:
#aptitude install squid
#aptitude install libpcre3
Additionally, you may need the packages:
squidguard–to use redirector squidguard
PHP5-ldap to authenticate users to Active Directory | Lightweight Directory Access Protocol (LDAP) If you want to
PHP–fpdf to generate pdf reports
Their installation has again through console commands:
#aptitude install squidguard
#aptitude install php5-ldap
#aptitude install php–fpdf
Next, you need to actually download the Sams.
We’ll be rocking the .deb packages, although of course you can put and from source.
This package is for 32 bit systems
This package under 64 bit.
Also download the docks and actually based form.
Next, you need to actually unpack the packages.
First unpack the Sams and retouch it to daemon was started.
#dpkg-i sams_1.0.5_amd64.deb–if you want to
Next, you will need to adjust/etc/init.d/sams and/etc/sams.conf
In/etc/init.d/sams, change the SAMS_ENABLE value from FALSE to TRUE.
In/etc/sams.conf, you must correct the MYSQLUSER and MYSQLPASSWORD to yours.
Next, you create the mysql DATABASE under the Sams.
# mysql-u root-p < sams_db.sql
#mysql–u root-p < squid_db.sql
Next, you will configure your Apache2.
To do this, go to/etc/php5/apache2/php.ini
Vlûčaem safe mod
safe_mode = On
safe_mode_exec_dir = “/usr/share/sams/bin“
Next, we are going to be fumbling with a snout Samsa.
In principle, then do not create a link to a directory in the directory with/var/www/Sams
And you will need to create it manually.
Next, you must modify the source Web forms the static GetHostName function. (I chose to simply zakoentit′ the premennuû)
The thing is that when you update the php engine was used with the function so that the static GetHostName must be replaced with any other for example GetName.
Files that need to be replaced:
After replacing the Web Settings form Sams will be available at the address http://192.168.0.224/sams
If you saw the type of Access that you want to specify the right forbiden to Sams.
#chown www-data: www-data/usr/share/sams
Next you need to choose a proper way to authorize user on the proxy server.
Consider ip and ncsa.
When I authorize my users by ip address–you simply create them via based form sams pointing in user–data like ip address 192.168.0.100 and a mask of 255.255.255.255.
Then click Reconfigure Sams and presto-user passes.
In this case, Ezer has a dialog box asking to enter the login password.
In order to get this window you must first correct the squid/config manually
and add there
auth_param basic program/usr/lib/squid/ncsa_auth/etc/squid/ncsa.sams
auth_param basic children 5
auth_param basic realm Squid proxy caching web server
auth_param basic credentialsttl 2 hours
then restart the squid and Sams.
The further you again create users. Web form rusificirovanna so there is no problems with it.
That’s probably all the friends, will ask the questions that I can answer.