Cell PhonesComputersConsumer ElectronicsGraphic Design & Video EditingHome Theater & AudioIndustrial TechnologyInternet

Monitoring Internet Usage With LightSquid and pfSense

Updated on March 14, 2014
skear profile image

Sam works as a Network Analyst for an algorithmic trading firm. He obtained his Bachelors Degree in Information Technology from UMKC.

LightSquid provides an easy and free method of monitoring internet usage on your network. LightSquid is a Squid log analyzer that runs on pfSense. By parsing through the proxy access logs the package is able to produce web based reports that detail the URLs accessed by each user on the network.

This package works well for both small and large networks. The reports have some useful features that allow you to see bandwidth usage, URL access by date and time, and top site reports.

Since LightSquid runs directly on your pfSense router it is both centralized and stealth. Users on the network have no way of knowing their traffic is being logged and analyzed using this method.

Requirements for LightSquid

Lightsquid works by analyzing Squids access logs so you must already have a Squid proxy set up in order to use Lightsquid. I always set up my proxies in transparent mode, this way all of the users traffic automatically passes through the proxy creating logs for Lightsquid to look at.

Lightsquid expects the Squid logs to be stored in the default location (/var/squid/log), so if you have Squid configured to store them somewhere else you will need to rervert to the original log location.

Installing LightSquid

Lightsquid can easily be installed through the pfSense package manager. To access the package manager click on packages in the system menu. Click the plus symbol on the right side of the package to start the installation.

When the installation is complete there will be a new entry in status menu called proxy report.

LightSquid can be installed through the package manager in pfSense.
LightSquid can be installed through the package manager in pfSense.

Configuration

LightSquid is very easy to configure, the default installations options are perfectly sufficient. At the very least I would recommend setting the refresh cycle to something reasonable for your needs.

To change the settings for LightSquid click on proxy report which is found under the status menu.

Below is an explanation of each of the settings that are available.

Language - The language setting can be used to change what language the LightSquid reports are displayed in.

Bar color - This setting lets you change the color of the bars in the reports.

Report scheme - Think of this as the theme for the appearance of the reports. The base theme is clean and simple but I like the NovoSea scheme the best.

IP resolve method - LightSquid attempts to resolve the IP address into domain names. You can change the method it uses to resolve the IPs with this setting. In my experience DNS seems to work the best.

Refresh sheduler - This setting affects how often the Squid logs are analyzed. Decreasing the value will make the reports stay more up to date but will consume more system resources. Be careful not to set the refresh cycle to occur too frequently, if the system can't finish one update before another one is requested you will eventually crash the system.

Skip url - If there are any URLs that you don't want to show up in the reports you can list them here.

Viewing the Reports

To view the LightSquid reports click on proxy report under the status menu, then click on the LightSquid report tab. The reports are very intuitive to navigate through. After you select a day you will see a list of clients that accessed the proxy on that day.

Once you select a host from the list you will see all of the URLs accessed by that client. Clicking the clock icon at the top of the page will show you the time of day that each URL was accessed.

Click thumbnail to view full-size
LightSquid reports all you to drill down by day of the month.Once you have selected a day you can select a host to review reports for.You can also view reports for individual users.The URL report for a host/user can be sorted by access time.
LightSquid reports all you to drill down by day of the month.
LightSquid reports all you to drill down by day of the month.
Once you have selected a day you can select a host to review reports for.
Once you have selected a day you can select a host to review reports for.
You can also view reports for individual users.
You can also view reports for individual users.
The URL report for a host/user can be sorted by access time.
The URL report for a host/user can be sorted by access time.

Troubleshooting

Error attempting to access the reports

If you are getting an error when you attempt to view the reports you may need to manually update them, this is very common if you attempt to view the reports soon after LightSquid is first installed. To start a manual update click "refresh now" , then "refresh full".

Sometimes it takes a while for the initial reports to be generated, if you have a large amount of accumulated Squid logs it can take even longer so be patient.

You can manually refresh the LightSquid reports from the settings page.
You can manually refresh the LightSquid reports from the settings page.

The reports don't contain any data

If your reports don't contain any data first make sure that squid is enabled and running in transparent mode. Also make sure that logging is enabled in Squid and the log store directory is set to /var/squid/log.

You can SSH into pfSense and check the squid log directory to verify that log files are actually being created. If the Squid log files exist in the correct directory and reports are not working then something is wrong with LIghtSquid.

If all else fails try re-installing LightSquid.

Check the Squid settings to make sure logging is turned on.
Check the Squid settings to make sure logging is turned on.

© 2011 Sam Kear

Comments

    0 of 8192 characters used
    Post Comment

    • Ryan 2 years ago

      Sadly LightSquid is not available in 2.1-RELEASE.

    • Tom 2 years ago

      Make sure to delete browser cache after installing Lightsquid or it will always error out. Works good with 2.1.3

    • skear profile image
      Author

      Sam Kear 2 years ago from Kansas City

      @Tom

      Thanks for sharing this tip.

    • Nico 22 months ago

      Works fine with version 2.1 for me.

    • Alvin 20 months ago

      Hi!

      I installed Lighsquid in pfSense and it is already working fine including the reports.

      However, it seems that the report is not updating its content even if I did manual refresh. What could possibly be wrong with the Lightsquid?

    • Roshan 16 months ago

      Hi,

      Does squid works with dual wan and fail over ?

      when squid install it always work with only default gateway.

    • JOE 6 months ago

      Yes @roshan. It worked fine for me. I have a dual WAN with failover and load balancing

    • Rolf 3 months ago

      Hi,

      i installed LightSquid and it worked fine. I also see the menue item in the Status-menue. If i wnat to change anything there it sys I should set it up first under the services menue. But I can't see a menue item there. I also rebooted the pfsense...

      any ideas?

    Click to Rate This Article