[Guide] Setup Squid and SquidGuard with Ubuntu Server 14.04.1 LTS


Recommended Posts

After reading a lot of guides on how to set this up, I never found one guide that didn't leave something out that made me have to search for some answers.. I've made a very straightforward and simple guide on how to setup Squid/SquidGuard on a network.. If you have any questions or something in the guide is left out/wrong, please let me know.

How to setup a Squid Server with SquidGuard 
Protecting your Network from Ads/Spyware/Malware
Follow this guide at your own risk! I will not be held responsible for any damages

For this guide, we are going to use Ubuntu 14.04.1 LTS, I will assume that you have the knowledge on how to install an Ubuntu Server on hardware or a VM. Also, set a static IP for the server.

Just follow these commands, and you’ll be up and running!

1. sudo apt-get update
2.  sudo apt-get upgrade
3. sudo apt-get install squid3
4. sudo nano /etc/squid3/squid.conf
5. You can actually just copy and paste this into the squid.conf, everything is commented out..  Just change the hostname to the hostname of the server.. 
visible_hostname your-machines-hostname
http_port 3128
cache_dir ufs /var/spool/squid 1000 16 256
cache_access_log /var/log/squid/access.log
6. Add this also to your squid.conf “intranet” is just the name of the group you are making to allow access to the squid server. Make sure you use your IP range and correct subnet. You can make additional groups if needed, either to allow or deny them. The next is giving access to the group, “intranet”.
acl intranet 10.50.0.0/32
http_access allow intranet
7. sudo service restart squid3

Now, you have a fully working squid server that is going to only allow the IP range of 10.50.0.0/32. If someone tries to connect to the proxy server in a different IP range, they will be blocked by the proxy. You can use this to limit access to certain departments and groups as well as set up times which they can allow internet access.. That is for a more in-depth guide. 
To test your proxy with Firefox, go to options, Advance, Network, Connection Settings. Enter your proxy’s IP and proxy’s port number. Default port number is 3128 as we set in the squid.conf. If you want to use a different port number, edit it in the squid.conf under “http_port”. 


Now, it’s time to install SquidGuard!
1.    sudo apt-get install squidguard
2.    sudo mkdir /opt/3rdparty
We are going to use the list from shalalist.de for “testing”, since it’s 100% free for non-commerical.  For a bigger and much more through blacklist, I use http://urlblacklist.com/. It’s free to try once, and has different pricing tiers for person/school/business.
3.    sudo wget http://www.shallalist.de/Downloads/shallalist.tar.gz
4.    sudo tar xzf shallalist.tar.gz
5.    sudo cp -a /opt/3rdparty/BL/porn/var/lib/squidguard/db
sudo cp -a /opt/3rdparty/BL/adv/var/lib/squidguard/db
sudo cp -a /opt/3rdparty/BL/spyware /var/lib/squidguard/db
6.    Add this to  /etc/squid3/squid.conf , type “sudo nano /etc/squid3/squid.conf”
url_rewrite_program /usr/bin/squidGuard
7.    sudo squidGuard -C all
8.    chown -R proxy:proxy /var/lib/squidguard/db
9.    Add this to my /etc/squid3/squid.conf  type, “sudo nano /etc/squid3/squid.conf”
url_rewrite_program /usr/bin/squidGuard

Now, we need to edit the squidGuard.conf

I recommend to make a backup of your squidGuard.conf then making a new one..
1. sudo cp /etc/squidguard/squidGuard.conf /etc/squidGuard.conf.bak
2. sudo rm /etc/squidguard/squidGuard.conf
3.sudo nano /etc/suqidgurd/squidGuard.conf
Copy and paste this,
#
# CONFIG FILE FOR SQUIDGUARD
#
dbhome /usr/local/squidGuard/db
logdir /usr/local/squidGuard/logs
dest porn {
domainlist porn/domains
urllist porn/urls
}
dest adv {
domainlist adv/domains
urllist adv/urls
}
dest spyware {
domainlist spyware/domains
urllist spyware/urls
}
acl {
default {
pass !porn !adv !spyware all
redirect http://localhost/block.html
}
}
You can test your squidguard by doing a dry run
sudo echo "http://www.pornhub.com 10.50.55.10/- - GET" | squidGuard -c /etc/squidguard/squidGuard.conf –d

You should see, 
squidGuard ready for requests 
squidGuard stopped 
If there are errors, it will tell you.. The most likely errors you’ll run into are permission issues.. If it gives you permission issues with your database, make sure that you set the user and group named “proxy” ownership. You can tell that by “sudo ls -l /var/lib/squidguard/db*”

You can now use the Firefox browser you setup to use with your proxy server to make sure you are blocking porn and ads. For better protection, I recommend using the blacklist from,  http://urlblacklist.com/

Yes I need this. We've got one set up and it looks like a botched up job. I'll be following this guide to set and test a proxy. 

Cheers

Thanks! 

Shouldn't this be in the guide section and not in visualization

Ah, I thought it would be best in the networking section.. Maybe the mods will move it.. Thanks.  

why did you put it under vitalization subsection?

It looks like it is under Home  Technical Help & Support  Internet, Network & Security  [Guide] Setup Squid and SquidGuard with Ubuntu Server 14.04.1 LTS like I intended it to me..  

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Microsoft Weekly: 5 years of Windows 11, more support for Windows 10, and expensive Xbox by Taras Buria This week's news recap is here, with Microsoft giving Windows 10 one more year of support, Windows 11 getting new taskbar settings in preview updates, Steam Machine prices, higher XBOX prices, and many more. Quick links: Windows 10 and 11 Windows Insider Program Updates are available Reviews are in Gaming news Great deals to check Windows 11 and Windows 10 Here, we talk about everything happening around Microsoft's latest operating system in the Stable channel and preview builds: new features, removed features, controversies, bugs, interesting findings, and more. And, of course, you may find a word or two about older versions. On June 24, 2026, Windows 11 turned five. The controversial operating system was released half a decade ago, and during these years, it received a fair share of criticism (such as poor Windows Search and its web results), which Microsoft is now actively addressing with regular preview updates that deliver missing, long-requested features. With Windows 12 nowhere to be seen on the horizon, it will be interesting to see if Windows 11 can stay on the market for as long as Windows 10 did. Speaking of Windows 10 and staying on the market, this week, Microsoft quietly prolonged the Extended Security Updates program for Windows 10, allowing users to get one more year of security updates if they do not want or cannot upgrade to Windows 11. Finally, Microsoft released this month's non-security update for Windows 11. KB5095093 arrived with a traditionally long list of new features, including point-in-time restore, new Windows Update settings, quieter Windows Widgets, new accessibility features, File Explorer updates and performance improvements, and more. Windows Insider Program Here is what Microsoft released for Windows Insiders this week: Builds Canary Channel Build 29617.1000 and build 28120.2374 These builds bring new accessibility features, new Windows Update controls, audio improvements, and more. Dev Channel Build 26300.8758 This build includes redesigned taskbar settings, File Explorer improvements, and more. Beta Channel Build 26220.8754 and build 28020.2366 This small update fixes the OneDrive bug in File Explorer, tweaks system sounds in dark mode, and more. Updates are available This section covers software, firmware, and other notable updates (released and coming soon) delivering new features, security fixes, improvements, patches, and more from Microsoft and third parties. If you use AI-powered browsing history search in Microsoft Edge, the company has bad news. A new update on the Microsoft 365 Roadmap revealed that Microsoft is discontinuing the feature. Despite using on-device models for natural search, some users found it creepy, claiming that Microsoft lacks trust in features like this. While the ability to find pages without using 100% precise words may sound cool, customers argued that it was nothing but another feature to bloat the browser with more AI. Good riddance? PowerToys received several updates this week. For one, Microsoft released version 0.100.1 with several improvements and bug fixes for the recently arrived version 0.100. A couple of days later, Microsoft dropped another update, this time fixing memory leaks in Command Palette Dock. In addition, the company is working on a new module that will make it easier to switch between windows within one application using the Alt + ` shortcut. The new module should make it to the stable release somewhere soon. Here are other updates and releases you may find interesting: New Ventoy update adds Windows 11's mandatory update support and more Microsoft updates Visual Studio Code with chat cost tracking and multi-agent chats Microsoft is building an AI datacenter that "uses less water than a fast food restaurant" Microsoft adds new AI study and teaching tools for free to Microsoft 365 Education Researchers claim Microsoft's quantum breakthrough is flawed by basic Python errors Microsoft is bringing a much-needed Recap app to Teams Microsoft's fast coding model, MAI-Code-1-Flash, comes to Copilot Business and Enterprise Here are the latest drivers and firmware updates released this week: AMD Radeon Software 26.6.2 with FSR 4.1 support for RDNA 3 graphics card. However, the driver contained a bug, which prevented installations on Windows 10 PCs. AMD fixed that with a quick hotfix update. Reviews are in Here is the hardware and software we reviewed this week This week, Steven Parker published several reviews. He shared his experience with the Creative Sound Blaster AE-X PCIe, a high-quality sound card with a headphone amp, low-latency communications, great build quality, and DSD256. However, it is on the pricier side of the spectrum, and it lacks EMI shielding. Check out the full review here. The second review is about the TerraMaster F4-425 Pro, an octa-core Intel NAS with a stand-out feature: built-in AI (OpenClaw). We also published a few Hands On reviews, which you can view below: We check out the SKG PS700 Neck Massager SKG Hand Massager with Heat OS500 hands on Hands-on with BOOX Tappy: cute little reading accessory Hands on with the ProtoArc EM25 affordable ergonomic mouse On the gaming side Learn about upcoming game releases, Xbox rumors, new hardware, software updates, freebies, deals, discounts, and more. If you plan to purchase a new Xbox, it's time to act now. This week, Microsoft announced yet another Xbox price increase. Starting August 1, 2026, all Xbox Series X|S models with 512 GB of storage will cost $100 more. As for the 1TB models, they are going up in price by a whopping $150. Finally, Microsoft is discontinuing the 2TB Xbox Series X. To make up for that, Microsoft announced a few programs to make its consoles more accessible. Those include BNPL, interest-free financing, pre-owned consoles, certified refurbished consoles, and more. Valve also shared some not-so-welcome news. The company has finally announced prices of the upcoming Steam Machine console, and if you plan to buy one, get ready to spend a whopping $1,049 on the 512GB configuration. The Steam Machine is now available for preorder, with shipments scheduled for June 29, 2026. Grand Theft Auto VI also received its official price tag. Rockstar Games announced that the long-anticipated game will launch at $79.99 for the base edition and $99.99 for the ultimate edition. The latter includes an exclusive collection of premium vehicles, weapons, apparel, and action threaded across all aspects of Jason and Lucia’s story." Those who preorder the game will get extra bonuses, including a Vintage Vice City Pack of cosmetic items as well as a free month of GTA+. NVIDIA announced new games for its GeForce NOW streaming service. Those include Dark Scrolls, SAND: Raiders of Sophie, Deer & Boy, EMPULSE, and more. Steam is running its annual Summer Sale, during which you can purchase plenty of various games with big discounts. It runs until July 9, so in case you missed it, you can still get some games at a lower price. Also, you can get two games for free in the Epic Games Store, plus more deals are available in this week's Weekend PC Game Deals issue. This link will take you to other issues of the Microsoft Weekly series. You can also support Neowin by registering for a free member account or subscribing for extra member benefits, along with an ad-free tier option.
    • Text extractor hasn't been working great on 0.99.1 but I am now updating to this version, hopefully it's better!
    • Yet you did exactly what they wanted you to do - is it better now without "Europrats"? BTW, UK had joined EU (EEC back then) and was one of the leading member states, it never joined Schengen Zone though 😉
    • Weekend PC Game Deals: Steam Summer Sale 2026 Edition by Pulasthi Ariyasinghe Weekend PC Game Deals is where the hottest gaming deals from all over the internet are gathered into one place every week for your consumption. So kick back, relax, and hold on to your wallets. The Epic Games Store's freebie offer brought two more games to keep this week too. What you can grab this time are copies of RollerCoaster Tycoon 3 Complete Edition and Voidwrought. Roller Coaster Tycoon 3 is an enhanced version of the classic title that comes with enhancements like widescreen and 1080p resolution support. Its two expansion packs are included here too. Meanwhile, Voidwrought is a 2D action-platformer with tight platforming and high-speed combat against cosmic horrors. The double giveaway is slated to last until July 2. On the same day, I Have No Mouth, and I Must Scream and River City Girls 2 will take the same freebie spot. The Humble Store introduced a couple of new game bundles earlier this week. The Going Rogue collection begins with Rogue Legacy, UnderMine, and None Shall Intrude in the starting tier for $5. If you pay the $10 it's asking to complete the bundle, you also get copies of Brutal Orchestra, Moros Protocol, Nightmare Reaper, Home Behind 2, and Lynked: Banner of the Spark. If it's fighting games you're looking for, the new Arc System Works Evo bundle is carrying plenty. The three tiers of this bundle that go up to $20 carry games like Melty Blood Actress Again Current Code, GUILTY GEAR Xrd REV 2, KILL la KILL - IF, Blazblue Cross Tag Battle, Guilty Gear -STRIVE-, Blazblue CentralFiction, and more. Big Deals One of the biggest sale events of the year, the Steam Summer Sale, has just kicked off, and that means almost every PC game available is now featuring discounts. We have plenty of games for you to look over in our special hand-picked big deals list for the weekend below: Baldur's Gate 3 – $44.99 on Steam Anno 117: Pax Romana – $41.99 on Steam S.T.A.L.K.E.R. 2: Heart of Chornobyl – $41.99 on Steam Indiana Jones and the Great Circle – $41.99 on Steam NINJA GAIDEN 4 – $41.99 on Steam Dying Light: The Beast – $39.59 on Steam Ghost of Tsushima DIRECTOR'S CUT – $35.99 on Steam Battlefield 6 – $34.99 on Steam Cities: Skylines II – $34.99 on Steam The Elder Scrolls IV: Oblivion Remastered – $34.99 on Steam The Outer Worlds 2 – $34.99 on Steam Borderlands 4 – $34.99 on Steam Sid Meier's Civilization VII – $34.99 on Steam Mafia: The Old Country – $34.99 on Steam Split Fiction – $32.49 on Steam Assassin’s Creed Shadows – $31.49 on Steam HELLDIVERS 2 – $29.99 on Steam Diablo IV – $29.99 on Steam ARC Raiders – $29.99 on Steam Forza Horizon 5 – $29.99 on Steam Sekiro: Shadows Die Twice - GOTY Edition – $29.99 on Steam No Rest for the Wicked – $27.99 on Steam Metaphor: ReFantazio – $27.99 on Steam Ready or Not – $24.99 on Steam Kingdom Come: Deliverance II – $23.99 on Steam No Man's Sky – $23.99 on Steam Marvel’s Spider-Man Remastered – $23.99 on Steam DOOM: The Dark Ages – $23.09 on Steam Mewgenics – $22.49 on Steam Persona 3 Reload – $20.99 on Steam Hades II – $20.99 on Steam Two Point Museum – $20.09 on Steam Mount & Blade II: Bannerlord – $19.99 on Steam God of War – $19.99 on Steam Warhammer 40,000: Rogue Trader – $19.99 on Steam Returnal – $19.79 on Steam Warhammer 40,000: Space Marine 2 – $17.99 on Steam Cyberpunk 2077 – $17.99 on Steam Avatar: Frontiers of Pandora – $17.99 on Steam Star Wars Outlaws – $17.49 on Steam REPLACED – $15.99 on Steam Days Gone – $15.99 on Steam Age of Mythology: Retold – $14.99 on Steam Crusader Kings III – $14.99 on Steam Red Dead Redemption 2 – $14.99 on Steam Half-Life: Alyx – $14.99 on Steam Grand Theft Auto V Enhanced – $14.99 on Steam EA SPORTS FC 26 – $13.99 on Steam The Crew Motorfest – $13.99 on Steam Sea of Thieves: 2026 Edition – $13.99 on Steam Age of Empires IV: Anniversary Edition – $13.99 on Steam Dead Cells – $12.49 on Steam Schedule I – $11.99 on Steam BioShock: The Collection – $11.99 on Steam Fable Anniversary – $11.54 on Steam Hearts of Iron IV – $9.99 on Steam Kerbal Space Program – $9.99 on Steam Tom Clancy's Ghost Recon Wildlands – $9.99 on Steam The Riftbreaker – $8.99 on Steam Stardew Valley – $8.99 on Steam Total War: WARHAMMER III – $8.99 on Steam Sons Of The Forest – $8.99 on Steam Assassin's Creed Origins – $8.99 on Steam Risk of Rain 2 – $8.24 on Steam Tom Clancy’s The Division 2 – $7.49 on Steam Call of Duty: Modern Warfare® II – $6.99 on Steam CONTROL Ultimate Edition – $5.99 on Steam Dead Space – $5.99 on Steam The Quarry – $5.99 on Steam RV There Yet? – $5.59 on Steam Euro Truck Simulator 2 – $4.99 on Steam Terraria – $4.99 on Steam PEAK – $4.95 on Steam Detroit: Become Human – $3.99 on Steam Far Cry 3 – $3.99 on Steam A Plague Tale: Innocence – $3.99 on Steam The Witcher 3: Wild Hunt – $3.99 on Steam Assetto Corsa Competizione – $3.99 on Steam PAYDAY 2 – $2.99 on Steam Wreckfest – $2.99 on Steam Rain World – $2.49 on Steam Watch_Dogs 2 – $2.49 on Steam Planet Zoo – $2.24 on Steam Bendy and the Dark Revival – $1.99 on Steam CARRION – $1.99 on Steam The Binding of Isaac: Rebirth – $1.49 on Steam Plague Inc: Evolved – $1.49 on Steam Don't Starve Together – $1.49 on Steam Metro 2033 Redux – $0.99 on Steam Hotline Miami – $0.99 on Steam RollerCoaster Tycoon 3 Complete Edition – $0 on Epic Store Voidwrought – $0 on Epic Store DRM-free Specials The GOG store is in the middle of its own summer sale. Here are some highlights from the DRM-free store: Clair Obscur: Expedition 33 - $39.99 on GOG Hollow Knight: Silksong - $14.99 on GOG Resident Evil Bundle - $12.49 on GOG Tomb Raider I-III Remastered Starring Lara Croft - $11.99 on GOG Alpha Protocol - $9.99 on GOG Vampire: The Masquerade - Bloodlines™ - $9.99 on GOG Fallout: New Vegas Ultimate Edition - $9.99 on GOG Disco Elysium - The Final Cut - $9.99 on GOG Dino Crisis Bundle - $8.49 on GOG Cold Fear - $8.25 on GOG Star Trek: Armada II - $7.49 on GOG Star Trek: Starfleet Command III - $7.49 on GOG Warhammer: Dark Omen - $7.49 on GOG Hollow Knight - $7.49 on GOG Mortal Kombat Trilogy - $6.49 on GOG Soldier of Fortune: Platinum Edition - $6.49 on GOG Heroes of Might and Magic 3: Complete - $4.99 on GOG SWAT 4: Gold Edition - $4.99 on GOG RollerCoaster Tycoon 2: Triple Thrill Pack - $4.99 on GOG Stranglehold - $4.99 on GOG ANSTOSS 3: Der Fußballmanager - $4.79 on GOG Firewatch - $3.99 on GOG Emperor: Rise of the Middle Kingdom - $2.99 on GOG Myst Masterpiece Edition - $2.99 on GOG Settlers 3: Ultimate Collection - $2.49 on GOG World in Conflict: Complete Edition - $2.49 on GOG Keep in mind that availability and pricing for some deals could vary depending on the region. That's it for our pick of this weekend's PC game deals, and hopefully, some of you have enough self-restraint not to keep adding to your ever-growing backlogs. As always, there are an enormous number of other deals ready and waiting all over the interwebs, as well as on services you may already subscribe to if you comb through them, so keep your eyes open for those, and have a great weekend.
    • Yup, that's a doozy right there 😄
  • Recent Achievements

    • Week One Done
      flexorcist earned a badge
      Week One Done
    • One Month Later
      Woland13 earned a badge
      One Month Later
    • Week One Done
      Woland13 earned a badge
      Week One Done
    • One Year In
      bernmeister earned a badge
      One Year In
    • Week One Done
      Scoobystu earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      502
    2. 2
      +Edouard
      226
    3. 3
      PsYcHoKiLLa
      158
    4. 4
      Steven P.
      75
    5. 5
      FloatingFatMan
      71
  • Tell a friend

    Love Neowin? Tell a friend!