• Log in or sign up for an account here: https://www.sythe.org/login

Installing and Configuring Squid(HTTP Proxy) on Debian

Status
Not open for further replies.

Syed

Hero

Retired Sectional Moderator
$50 USD Donor New
Joined
Jan 22, 2009
Sythe Gold
11
Messages
9,857
Location
USA
Sythe Awards 2012 Winner
Sythe Awards 2010 Winner
Gohan has AIDS
Discord Verified
Discord Voice
I'm LAAAAAAAME
Rust Player
Shitting Rainbow
Sythe Awards 2016 Winner
This is a very simplified guide, I'm assuming that you're doing this on a fresh install of Debian Squeeze, this should however work for Wheezy and Sid, maybe even Lenny as well. Also assuming this is for personal proxy use and not some sort of proxy service.

Code:
apt-get update && apt-get upgrade

That updates your apt repositories located in /etc/apt/sources.list and upgrades your current packages.

Oh also, because I prefer nano, install that.

Code:
apt-get install nano

Now to install squid.

Code:
apt-get install squid

You've installed and downloaded squid, it's running now. To verify it's running do:
Code:
ps aux | grep squid

You should get this as an output, or something similar.

Code:
root     29961  0.0  0.2   4852   576 ?        Ss   19:04   0:00 /usr/sbin/squid                                    -D -YC
proxy    29963  0.0  1.7   7116  4644 ?        S    19:04   0:00 (squid) -D -YC
root     29978  0.0  0.2   1772   568 pts/0    R+   19:06   0:00 grep squid

Open the squid config file with your favorite text editor(mine is nano) located in /etc/squid/squid.conf

If you have nano installed, do: Ctrl + W 'acl localnet src'

Code:
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network

If you have a dynamic IP it may be easier to add your networks' range. So for singular IP it would be:

Code:
acl mynetwork src 192.25.24.35

For a dynamic IP range(less secure):

Code:
acl mynetwork src 192.25.24.0/192.25.24.99

Then find:

Code:
http_access allow localhost

And add under:

Code:
http_access allow mynetwork

Also since we're using it as a proxy, we don't want our own IP forwarded, find this, uncomment and change on to off.

Code:
#Default:
# forwarded_for on

Now save and exit, Ctrl + X and then y(if you're using nano). Then:

Code:
service squid restart

Now you should be good to go, add it as a proxy in firefox. The port is 3128 by default.

61e55878b7a5509758ff5f1a61210ad7


Check if the proxy works by going on http://whatismyip.com

43ca5060630609a79c5d46d536c64af5
 
Sythe Awards 2012 Winner
Sythe Awards 2010 Winner
Gohan has AIDS
Discord Verified
Discord Voice
I'm LAAAAAAAME
Rust Player
Shitting Rainbow
Sythe Awards 2016 Winner
... or ssh -D 9000 root@host then set ur socks proxy to localhost:9000

That does work on Linux, and it's encrypted. Some people prefer that.

Although I like faster speeds, and imho squid is easier to configure for windows users. Anyway that's always an option.

If anyone does want to use the method purevictor mentions, google 'ssh proxy putty', it's more secure, but considerably slower.

Edit: Also this way, you don't have to start putty each time, it's server-side, so just open firefox and go.
 
Great guide, you should explain it a bit more rather than C+P.
 
Potamus
First serious post of Syed I've seen.
Good guide but I would like to know what each command does as mentioned before. I got Linux Mint 14 on one of my PC's now and it's pretty interesting to play around with.
 
Sythe Awards 2012 Winner
Sythe Awards 2010 Winner
Gohan has AIDS
Discord Verified
Discord Voice
I'm LAAAAAAAME
Rust Player
Shitting Rainbow
Sythe Awards 2016 Winner
apt-get is the default package installer for a couple Distros, notably Ubuntu and Debian

ps aux lists all current open applications

grep is a search function, so ps aux | grep sex would search the output of ps aux for any mention of "sex"

The rest of the guide is editing the file /etc/squid/squid.conf
 
Status
Not open for further replies.
Runescape Gamblingrunescape gambling
Back
Top