Last active
October 22, 2025 12:09
-
-
Save e7d/1f784339df82c57a43bf to your computer and use it in GitHub Desktop.
Revisions
-
e7d revised this gist
Jan 4, 2017 . 1 changed file with 5 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,7 +21,7 @@ If you don't want to build Squid from scratch, you can simply [Setup a Squid ano * [Additional configuration](#additional-configuration) * [Customize settings](#customize-settings) * [Disable authentication](#disable-authentication) * [Manage users](#manage-users) ## Automated install @@ -184,14 +184,10 @@ This authentication relies on a password file you will find at `/etc/squid/users This user file may be modified following the next section instructions. ### Manage users Using the command [htpasswd](https://httpd.apache.org/docs/current/programs/htpasswd.html), you can manage the users able to use the proxy: - create/update a user: `htpasswd -bd /etc/squid3/users.pwd myuser mypw` - remove a user: `htpasswd -D /etc/squid3/users.pwd myuser` **NOTE:** Provided authentication relies on CRYPT algorithm. Information defined in `users.pwd` must respect that, meaning that passwords can only be up to 8 characters. -
e7d revised this gist
Jan 4, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ If you don't want to build Squid from scratch, you can simply [Setup a Squid anonymous proxy](https://gist.github.com/e7d/9472c3e7ac1821056867b95244c73609) # Build a Squid anonymous proxy from source code > Please note that this whole manual refers to the version **3.5.23** of Squid. You probably would have to adapt some commands to the version you will actually download. -
e7d revised this gist
Jan 4, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -112,7 +112,7 @@ With this sample configuration file, you can use a Htpasswd file at `/etc/squid/ ``` rm -rf /etc/squid/users.pwd htpasswd -cbd /etc/squid/users.pwd proxy proxy ``` -
e7d revised this gist
Jan 4, 2017 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,8 +16,8 @@ * [Build service runtime](#build-service-runtime) * [Prepare execution folders](#prepare-execution-folders) * [Start!](#start) * [Additional configuration](#additional-configuration) * [Customize settings](#customize-settings) * [Disable authentication](#disable-authentication) * [Manage user accounts](#manage-user-accounts) @@ -150,11 +150,11 @@ squid -z Try to start your brand new Squid with `service squid start` ## Additional configuration ### Customize settings Squid offers some interesting customisation options you should have a look at. This modifications implies to edit the file located at `/etc/squid/squid.conf`. #### Listening ports -
e7d revised this gist
Jan 4, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -184,7 +184,7 @@ This user file may be modified following the next section instructions. ### Manage user accounts Using the command [htpasswd](https://httpd.apache.org/docs/current/programs/htpasswd.html), you can manage the users able to use the proxy. To add or update a user: `htpasswd -bd /etc/squid/users.pwd johndoe mypw` -
e7d revised this gist
Jan 4, 2017 . 3 changed files with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,7 @@ * [Start!](#start) * [Going further](#going-further) * [Customize configuration](#customize-configuration) * [Disable authentication](#disable-authentication) * [Manage user accounts](#manage-user-accounts) ## Automated install @@ -112,12 +112,12 @@ With this sample configuration file, you can use a Htpasswd file at `/etc/squid/ ``` rm -rf /etc/squid/users.pwd touch -cbd /etc/squid/users.pwd ``` > This this authentication is enabled by default/ To disable it you will have to comment the **Authentication** section of the sample `squid.conf` configuration file. See [Disable authentication](#disable-authentication). > You can create your users entries using the [htpasswd](http://httpd.apache.org/docs/current/programs/htpasswd.html) tool from Apache. See [Manage user accounts](#manage-user-accounts). > You can directly use the [users.pwd](https://gist.github.com/e7d/1f784339df82c57a43bf/raw/users.pwd) sample, providing you a basic user named *proxy*, using also *proxy* as password. ### Build service runtime @@ -166,7 +166,7 @@ http_port 3128 ``` ### Disable authentication Your proxy will respond to any request. If you want to limit its accessibility to a set of users, you may want to enable authentication, by uncommenting the following section: This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -61,8 +61,8 @@ auth_param basic realm Proxy auth_param basic credentialsttl 2 hours auth_param basic casesensitive on acl Users proxy_auth REQUIRED http_access allow Users # Access Restrictions This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ proxy:5qHyKopcCn9NA -
e7d revised this gist
Jan 4, 2017 . 2 changed files with 4 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -53,8 +53,9 @@ deb-src http://security.debian.org/ stable/updates main Build Squid 3 dependencies ``` apt-get update apt-get install build-essential libssl-dev apache2-utils apt-get build-dep squid3 ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -55,7 +55,7 @@ acl CONNECT method CONNECT # This sections uses a Htpasswd file named `users.pwd` file to store eligible accounts. # You can generate yours using the htpasswd command from "apache2-utils" aptitude package, using "-d" flag to use system CRYPT. auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/users.pwd auth_param basic children 5 auth_param basic realm Proxy auth_param basic credentialsttl 2 hours -
e7d revised this gist
Jan 4, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -87,7 +87,7 @@ make install ### Resolve library dependencies Extract the content of [squid-lib-3.4.8.tar.gz](http://e7d.github.io/resources/squid-lib-3.4.8.tar.gz) to `/usr/lib` ``` cd /usr/lib -
e7d revised this gist
Jan 4, 2017 . 3 changed files with 9 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -91,9 +91,9 @@ Extract the content of [squid-lib.tar.gz](http://e7d.github.io/resources/squid-l ``` cd /usr/lib wget -O /usr/lib/squid-lib.tar.gz http://e7d.github.io/resources/squid-lib-3.4.8.tar.gz tar zxvf squid-lib.tar.gz rm squid-lib.tar.gz ``` @@ -102,15 +102,15 @@ rm squid_lib.tar.gz Copy [squid.conf](https://gist.github.com/e7d/1f784339df82c57a43bf/raw/squid.conf) contents to `/etc/squid/squid.conf`. ``` rm -rf /etc/squid/squid.conf wget --no-check-certificate -O /etc/squid/squid.conf https://gist.github.com/e7d/1f784339df82c57a43bf/raw/squid.conf ``` With this sample configuration file, you can use a Htpasswd file at `/etc/squid/users.pwd` to manage a basic authentication. ``` rm -rf /etc/squid/users.pwd wget --no-check-certificate -O /etc/squid/users.pwd https://gist.github.com/e7d/1f784339df82c57a43bf/raw/users.pwd ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -46,18 +46,18 @@ make install echo "Download libraries" cd /usr/lib wget -O /usr/lib/squid-lib.tar.gz http://e7d.github.io/resources/squid-lib-3.4.8.tar.gz echo "Install libraries" tar zxvf squid-lib.tar.gz echo "Create configuration file" rm -rf /etc/squid/squid.conf wget --no-check-certificate -O /etc/squid/squid.conf https://gist.github.com/e7d/1f784339df82c57a43bf/raw/squid.conf echo "Create users database sample" rm -rf /etc/squid/users.pwd htpasswd -cbd /etc/squid/users.pwd proxy proxy echo "Create service executable file" wget --no-check-certificate -O /etc/init.d/squid https://gist.github.com/e7d/1f784339df82c57a43bf/raw/squid.sh This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -55,7 +55,7 @@ acl CONNECT method CONNECT # This sections uses a Htpasswd file named `users.pwd` file to store eligible accounts. # You can generate yours using the htpasswd command from "apache2-utils" aptitude package, using "-d" flag to use system CRYPT. auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid/users.pwd auth_param basic children 5 auth_param basic realm Proxy auth_param basic credentialsttl 2 hours -
e7d revised this gist
Jan 4, 2017 . 1 changed file with 4 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -115,8 +115,8 @@ wget --no-check-certificate -O /etc/squid/users.pwd https://gist.githubuserconte ``` > To enable this authentication, you will have to uncomment the **Authentication** section of the sample `squid.conf` configuration file. See [Enable authentication](#enable-authentication). > You can create your users entries using the [htpasswd](http://httpd.apache.org/docs/current/programs/htpasswd.html) tool from Apache. i.e. `htpasswd -db /etc/squid/users.pwd jones fx5rm31s` will create a user "jones" with the password "fx5rm31s" inside the "/etc/squid/users.pwd" file. See [Manage user accounts](#manage-user-accounts). > You can directly use the [users.pwd](https://gist.github.com/e7d/1f784339df82c57a43bf/raw/users.pwd) sample, providing you a basic user named *proxy*, using also *proxy* as password. ### Build service runtime @@ -186,15 +186,9 @@ This user file may be modified following the next section instructions. Using the command [htpasswd](https://httpd.apache.org/docs/current/programs/htpasswd.html), you will be able to manage the IDs of the users able to use the proxy. To add or update a user: `htpasswd -bd /etc/squid/users.pwd johndoe mypw` To remove a user: `htpasswd -D /etc/squid/users.pwd johndoe` **NOTE:** Provided authentication relies on CRYPT algorithm. Information defined in `users.pwd` must respect that, meaning that passwords can only be up to 8 characters. -
e7d revised this gist
Jan 4, 2017 . 1 changed file with 54 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,6 +16,10 @@ * [Build service runtime](#build-service-runtime) * [Prepare execution folders](#prepare-execution-folders) * [Start!](#start) * [Going further](#going-further) * [Customize configuration](#customize-configuration) * [Enable authentication](#enable-authentication) * [Manage user accounts](#manage-user-accounts) ## Automated install @@ -144,3 +148,53 @@ squid -z ### Start! Try to start your brand new Squid with `service squid start` ## Going further ### Customize configuration Squid offers some interesting customisation options you should have a look at. Every of this suggestions implies a modification of the file located at `/etc/squid/squid.conf`. #### Listening ports With the provided configuration, your proxy will be listening on HTTP port 3128, which is the squid default. You can change it to any available port that suits you with: ``` http_port 3128 ``` ### Enable authentication Your proxy will respond to any request. If you want to limit its accessibility to a set of users, you may want to enable authentication, by uncommenting the following section: ``` #acl Users proxy_auth REQUIRED #http_access allow Users ``` This authentication relies on a password file you will find at `/etc/squid/users.pwd`. A sample user is included, defined with the following identification: - username : `proxy` - password : `proxy` This user file may be modified following the next section instructions. ### Manage user accounts Using the command [htpasswd](https://httpd.apache.org/docs/current/programs/htpasswd.html), you will be able to manage the IDs of the users able to use the proxy. To add or update a user: ``` htpasswd -bd /etc/squid/users.pwd johndoe mypw ``` To remove a user: ``` htpasswd -D /etc/squid/users.pwd johndoe ``` **NOTE:** Provided authentication relies on CRYPT algorithm. Information defined in `users.pwd` must respect that, meaning that passwords can only be up to 8 characters. -
e7d revised this gist
Jan 4, 2017 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,7 +27,10 @@ ### Squid installation script ``` wget -qO- https://gist.github.com/e7d/1f784339df82c57a43bf/raw/squid-install.sh | sh ``` ## Manual install -
e7d revised this gist
Jan 4, 2017 . 2 changed files with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -73,7 +73,7 @@ cd squid-3.5.23 --with-default-user=proxy \ --with-logdir=/var/log/squid \ --with-pidfile=/var/run/squid.pid make -j$(nproc) make install ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,7 +36,7 @@ echo "Build binaries" --with-default-user=proxy \ --with-logdir=/var/log/squid \ --with-pidfile=/var/run/squid.pid make -j$(nproc) echo "Stop running service" service squid stop -
e7d revised this gist
Jan 4, 2017 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -59,10 +59,10 @@ auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/users.pwd auth_param basic children 5 auth_param basic realm Proxy auth_param basic credentialsttl 2 hours auth_param basic casesensitive on #acl Users proxy_auth REQUIRED #http_access allow Users # Access Restrictions -
e7d revised this gist
Jan 4, 2017 . 1 changed file with 1 addition and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,13 +27,7 @@ ### Squid installation script `wget -qO- https://gist.github.com/e7d/1f784339df82c57a43bf/raw/squid-install.sh | sh` ## Manual install -
e7d revised this gist
Jan 4, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Build a Squid anonymous proxy from source code > Please note that this whole manual refers to the version **3.5.23** of Squid. You probably would have to adapt some commands to the version you will actually download. -
e7d revised this gist
Jan 4, 2017 . 2 changed files with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # Build a Squid transparent proxy from source code > Please note that this whole manual refers to the version **3.5.23** of Squid. You probably would have to adapt some commands to the version you will actually download. ## Table of contents @@ -61,9 +61,9 @@ aptitude build-dep squid3 ``` cd /usr/src wget http://www.squid-cache.org/Versions/v3/3.5/squid-3.5.23.tar.gz tar zxvf squid-3.5.23.tar.gz cd squid-3.5.23 ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ #!/bin/sh SQUID_VERSION=3.5.23 if [ "$(id -u)" != "0" ]; then echo "This script must be run as root" 1>&2 -
e7d revised this gist
Mar 18, 2016 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,10 +42,10 @@ wget --no-check-certificate -O squid-install.sh https://gist.githubusercontent.c Edit your `/etc/apt/sources.list` file, and check that you have `deb-src` entries like the following sample. ``` deb http://httpredir.debian.org/debian stable main deb-src http://httpredir.debian.org/debian stable main deb http://security.debian.org/ stable/updates main deb-src http://security.debian.org/ stable/updates main ``` -
e7d revised this gist
Mar 18, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,8 +8,8 @@ if [ "$(id -u)" != "0" ]; then fi echo "Add repositories to Aptitude" echo "deb http://httpredir.debian.org/debian stable main" > /etc/apt/sources.list.d/squid.list echo "deb-src http://httpredir.debian.org/debian stable main" >> /etc/apt/sources.list.d/squid.list echo "deb http://security.debian.org/ stable/updates main" >> /etc/apt/sources.list.d/squid.list echo "deb-src http://security.debian.org/ stable/updates main" >> /etc/apt/sources.list.d/squid.list -
e7d revised this gist
Mar 9, 2016 . 2 changed files with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # Build a Squid transparent proxy from source code > Please note that this whole manual refers to the version **3.5.15** of Squid. You probably would have to adapt some commands to the version you will actually download. ## Table of contents @@ -61,9 +61,9 @@ aptitude build-dep squid3 ``` cd /usr/src wget http://www.squid-cache.org/Versions/v3/3.5/squid-3.5.15.tar.gz tar zxvf squid-3.5.15.tar.gz cd squid-3.5.15 ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ #!/bin/sh SQUID_VERSION=3.5.15 if [ "$(id -u)" != "0" ]; then echo "This script must be run as root" 1>&2 -
e7d revised this gist
Nov 2, 2015 . 2 changed files with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # Build a Squid transparent proxy from source code > Please note that this whole manual refers to the version **3.5.11** of Squid. You probably would have to adapt some commands to the version you will actually download. ## Table of contents This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ #!/bin/sh SQUID_VERSION=3.5.11 if [ "$(id -u)" != "0" ]; then echo "This script must be run as root" 1>&2 -
e7d revised this gist
Oct 7, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ #!/bin/sh SQUID_VERSION=3.5.10 if [ "$(id -u)" != "0" ]; then echo "This script must be run as root" 1>&2 -
e7d revised this gist
Jun 15, 2015 . 1 changed file with 7 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,9 +7,8 @@ via off # Log logformat squid %tg.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt access_log /var/log/squid/access.log squid # Cache @@ -54,16 +53,15 @@ acl CONNECT method CONNECT # Uncomment the following lines to enable file based authentication BUT: # The following section requires to have squid libs installed, especially `nsca_auth`, to be working. # This sections uses a Htpasswd file named `users.pwd` file to store eligible accounts. # You can generate yours using the htpasswd command from "apache2-utils" aptitude package, using "-d" flag to use system CRYPT. auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/users.pwd auth_param basic children 5 auth_param basic realm Proxy auth_param basic credentialsttl 2 hours auth_param basic casesensitive off #acl users proxy_auth REQUIRED #http_access allow users # Access Restrictions -
e7d revised this gist
May 29, 2015 . 1 changed file with 3 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -46,6 +46,7 @@ deb http://ftp.us.debian.org/debian wheezy main deb-src http://ftp.us.debian.org/debian wheezy main deb http://security.debian.org/ wheezy/updates main deb-src http://security.debian.org/ wheezy/updates main ``` Build Squid 3 dependencies @@ -114,10 +115,8 @@ wget --no-check-certificate -O /etc/squid/users.pwd https://gist.githubuserconte ``` > To enable this authentication, you will have to uncomment the **Authentication** section of the sample `squid.conf` configuration file. > You can create your users entries using the [htpasswd](http://httpd.apache.org/docs/current/programs/htpasswd.html) tool from Apache. i.e. `htpasswd -db /etc/squid/users.pwd jones fx5rm31s` will create a user "jones" with the password "fx5rm31s" inside the "/etc/squid/users.pwd" file. > You can directly use the [users.pwd](https://gist.github.com/e7d/1f784339df82c57a43bf/raw/users.pwd) sample, providing you a basic user named *proxy*, using also *proxy* as password. ### Build service runtime -
e7d revised this gist
May 29, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -114,7 +114,9 @@ wget --no-check-certificate -O /etc/squid/users.pwd https://gist.githubuserconte ``` > To enable this authentication, you will have to uncomment the **Authentication** section of the sample `squid.conf` configuration file. > You can create your users entries using the [htpasswd](http://httpd.apache.org/docs/current/programs/htpasswd.html) tool from Apache. i.e. `htpasswd -db /etc/squid/users.pwd jones Pwd4Steve` will create a user "jones" with the password "Pwd4Steve" inside the "/etc/squid/users.pwd" file. > You can also directly use the [users.pwd](https://gist.github.com/e7d/1f784339df82c57a43bf/raw/users.pwd) sample, providing you a basic user named *proxy*, using also *proxy* as password. ### Build service runtime -
e7d revised this gist
May 29, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -114,7 +114,7 @@ wget --no-check-certificate -O /etc/squid/users.pwd https://gist.githubuserconte ``` > To enable this authentication, you will have to uncomment the **Authentication** section of the sample `squid.conf` configuration file. > You can create your users entries using the [htpasswd](http://httpd.apache.org/docs/current/programs/htpasswd.html) tool from Apache. i.e. `htpasswd -db /etc/squid/users.pwd jones Pwd4Steve` will create a user "jones" with the password "Pwd4Steve" inside the "/etc/squid/users.pwd" file. > You can also directly use the [users.pwd](https://gist.github.com/e7d/1f784339df82c57a43bf/raw/users.pwd) sample, providing you a basic user named *proxy*, using also *proxy* as password. ### Build service runtime -
e7d revised this gist
May 29, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ proxy:V3SumwH0Poabk -
e7d revised this gist
May 29, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,8 +17,8 @@ echo "Update packages list" apt-get update echo "Build dependencies" apt-get -y install build-essential libssl-dev apache2-utils apt-get -y build-dep squid3 echo "Download source code" cd /usr/src -
e7d revised this gist
May 29, 2015 . 2 changed files with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # Build a Squid transparent proxy from source code > Please note that this whole manual refers to the version **3.5.5** of Squid. You probably would have to adapt some commands to the version you will actually download. ## Table of contents @@ -60,9 +60,9 @@ aptitude build-dep squid3 ``` cd /usr/src wget http://www.squid-cache.org/Versions/v3/3.5/squid-3.5.5.tar.gz tar zxvf squid-3.5.5.tar.gz cd squid-3.5.5 ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ #!/bin/sh SQUID_VERSION=3.5.5 if [ "$(id -u)" != "0" ]; then echo "This script must be run as root" 1>&2 -
e7d revised this gist
May 29, 2015 . 3 changed files with 4 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,6 +18,7 @@ apt-get update echo "Build dependencies" apt-get -y build-dep squid3 apt-get install apache-utils echo "Download source code" cd /usr/src @@ -56,7 +57,7 @@ wget --no-check-certificate -O /etc/squid/squid.conf https://gist.githubusercont echo "Create users database sample" rm -fr /etc/squid/users.pwd htpasswd -c -b -d /etc/squid/users.pwd proxy proxy echo "Create service executable file" wget --no-check-certificate -O /etc/init.d/squid https://gist.github.com/e7d/1f784339df82c57a43bf/raw/squid.sh This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -54,12 +54,13 @@ acl CONNECT method CONNECT # Uncomment the following lines to enable file based authentication BUT: # The following section requires to have squid libs installed, especially `nsca_auth`, to be working. # This sections uses a Htpasswd file named `users.pwd` file to store eligible accounts. # You can generate yours using the htpasswd command from "apache-utils" aptitude package, using "-d" flag to use system CRYPT. #auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/users.pwd #auth_param basic children 5 #auth_param basic realm Proxy #auth_param basic credentialsttl 2 hours #auth_param basic casesensitive off #acl users proxy_auth REQUIRED This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +0,0 @@
NewerOlder