Squid Statistics and Info Web Interface


I have been looking for a squid statistics web interface for a long time, and i finally got one. It was fairly easy to install and configure.

The name of the app is SARG and can be downloaded freely from http://sarg.sourceforge.net/sarg.php

Depending on your architecture, the installation command is

rpm -Uvh http://pkgs.repoforge.org/sarg/sarg-2.3.1-1.el6.rft.x86_64.rpm

Before using it, you might wish to configure the output generation of sarg by

vi /etc/sarg/sarg.conf

and change the output_dir /var/www/html/squid/OUT-ONE to your www directory

To use, run the following in a terminal or add it to cron to run it daily

sarg

This command will generate html files for stats in the specified output_dir

That’s all folks.

Screenshot of SARG Generated files:

Read More

Top 5 things to do with a Linux VPS


Virtual Private Server(VPS). As usual, my best vps provider is Linode.

1. Run your own proxy server

Ever got frustrated that you were not be able to access something like spotify or BBC iplayer just because you were not a UK/EU resident? The answer is short and simple..and EFFECTIVE! Get yourself a personal VPS based in London for $20 a month from Linode and install SQUID Proxy on top of it.

2. Run your own web server

Running your own web server might have a lot more advantages than running it on a shared hosting provider.  If you read my older posts, you would realise that gulshan.beejan.com is running on top of Cherokee. Why? Because it’s so easy to manage, lightweight and fast.

3. Configure a reverse SSH tunnel.

Now what’s that?! Well.. it will help you access your office linux computers securely without having to bother about configuring the firewall. For more click here.

4. Make the VPS a remote backup server

With the help of a little bash scripting and the use of NFS drives, you can easily make your VPS a backup server. I usually back up this VPS to my Dedicated Server to make sure that everything is there even after the most painful crashes.

5. Run a ShoutCast Server

If you are willing to go for your own Live Radio, a VPS and ShoutCast is the best combination to go for. Configuration is quite simple.. which reminds me, I need to blog about it sometime soon!

If you have any top things to do.. feel free to post through comments : )

Read More

Squid Proxy Authentication


I run a squid proxy on one of my Linode vps. Configuration for username and password authentication was done as follows while logged in as root:

1. Install script via:

yum install squid

on CentOS or Red Hat based Linux flavors, or

apt-get update
apt-get install squid

on Debian Linux flavors.

2. Create a password file and chmod for file permission

touch /etc/squid/squid_passwd

chmod o+r /etc/squid/squid_passwd

3. Add a user for the proxy server

htpasswd /etc/squid/squid_passwd test

4. Find the ncsa_auth file

find / -name ncsa_auth

5. Edit the squid.conf file

vi /etc/squid/squid.conf

6. Add the following lines to the squid.conf file

auth_param basic program <location-of-ncsa_auth-file> /etc/squid/squid_passwd

acl ncsa_users proxy_auth REQUIRED

http_access allow ncsa_users

7. Reload squid

service squid restart (in RH based)

/etc/init.d/squid restart (in Debian Based)

Read More