Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Ubuntu – Squid Proxy Setup

Posted on January 18, 2016January 18, 2016 By David Kittell
sudo apt-get --assume-yes remove --purge squid squid3 && sudo apt-get --assume-yes autoremove && rm -r /etc/squid && rm -r /etc/squid3 &&  rm -r  /var/spool/squid
sudo apt-get --assume-yes -f install squid3
cd /etc/squid3/
sudo cp /etc/squid3/squid.conf /etc/squid3/squid.conf.original
sudo cat squid.conf.original | egrep -v -e '^[[:blank:]]*#|^$' > squid.conf
sudo chmod a-w /etc/squid3/squid.conf.original
sudo sed -i 's|http_port 3128|http_port 8888|' /etc/squid3/squid.conf

sudo service squid3 restart
acl bad_sites dstdomain '/etc/squid3/bad-url.acl'
#acl bad_sites dstdomain .msn.com

http_access deny bad_sites
http_access allow all !bad_sites

http_port 8888
https_port 8888

cache_dir ufs /etc/squid3/cache 100 10 20 
coredump_dir /var/spool/squid3
refresh_pattern ^ftp:		1440	20%	10080
refresh_pattern ^gopher:	1440	0%	1440
refresh_pattern -i (/cgi-bin/|\?) 0	0%	0
refresh_pattern .		0	20%	4320
cache_effective_user proxy
cache_effective_group proxy
cache_mgr webmaster@localhost
.yahoo.com
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code UNIX Shell Scripts

Post navigation

Previous post
Next post

Related Posts

Ubuntu – Install GUI Desktop From Terminal

Posted on March 18, 2016March 18, 2016

sudo apt-get –assume-yes update && sudo apt-get –assume-yes upgrade && sudo apt-get –assume-yes autoremove sudo apt-get –assume-yes install ubuntu-desktop build-essential sudo chown -R [user-name]:[user-name] /home/[user-name] sudo startx Make sure that you do the chown command otherwise you may not be able to login. Example would be this for username demo…

Read More

Bash – Running In Docker?

Posted on October 26, 2020August 17, 2024

docker=$(cat /proc/self/cgroup | awk -F/ ‘$2 == "docker"’) if [ ! -z "$docker" ]; then echo "Running in Docker" else echo "Not running in Docker" fi Originally Posted on October 26, 2020Last Updated on August 17, 2024 All information on this site is shared with the intention to help. Before…

Read More

New Line

Posted on March 4, 2013March 10, 2016

Often we forget what code we need to use to create a new line (line break), hopefully this will help. n = CR (Carriage Return) Used as a new line character in Unix r = LF (Line Feed) Used as a new line character in Mac OS nr = CR…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes