Installing and Configuring Squid(HTTP Proxy) on Debian

Discussion in 'Guides' started by Syed, Oct 18, 2012.

Thread Status:
Not open for further replies.
Installing and Configuring Squid(HTTP Proxy) on Debian
  1. Unread #1 - Oct 18, 2012 at 10:26 AM
  2. Syed
    Joined:
    Jan 22, 2009
    Posts:
    9,857
    Referrals:
    1
    Sythe Gold:
    11
    Sythe Awards 2012 Winner Gohan has AIDS (3) ??? Rust Player I'm LAAAAAAAME (2) Shitting Rainbow (2)

    Syed Hero
    Retired Sectional Moderator $50 USD Donor New

    Installing and Configuring Squid(HTTP Proxy) on Debian

    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.

    [​IMG]

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

    [​IMG]
     
  3. Unread #2 - Oct 18, 2012 at 10:33 AM
  4. purevictor
    Joined:
    Jul 24, 2007
    Posts:
    22
    Referrals:
    0
    Sythe Gold:
    0

    purevictor Newcomer
    Banned

    Installing and Configuring Squid(HTTP Proxy) on Debian

    ... or ssh -D 9000 root@host then set ur socks proxy to localhost:9000
     
  5. Unread #3 - Oct 18, 2012 at 10:56 AM
  6. Syed
    Joined:
    Jan 22, 2009
    Posts:
    9,857
    Referrals:
    1
    Sythe Gold:
    11
    Sythe Awards 2012 Winner Gohan has AIDS (3) ??? Rust Player I'm LAAAAAAAME (2) Shitting Rainbow (2)

    Syed Hero
    Retired Sectional Moderator $50 USD Donor New

    Installing and Configuring Squid(HTTP Proxy) on Debian

    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.
     
  7. Unread #4 - Oct 20, 2012 at 12:56 PM
  8. Gohan
    Joined:
    Mar 16, 2007
    Posts:
    23,695
    Referrals:
    16
    Sythe Gold:
    248
    Discord Unique ID:
    100075291572998144
    Spam Forum Participant Rust Player

    Gohan Legend
    Retired Sectional Moderator Cracker Head $25 USD Donor Prince Yobabo

    Installing and Configuring Squid(HTTP Proxy) on Debian

    Great guide, this should get more recognition.
     
  9. Unread #5 - Dec 24, 2012 at 5:59 AM
  10. iJava
    Joined:
    Nov 21, 2011
    Posts:
    1,197
    Referrals:
    11
    Sythe Gold:
    485
    Discord Unique ID:
    220055593568829441

    iJava .Previously known as RSGoldRush
    $200 USD Donor New

    Installing and Configuring Squid(HTTP Proxy) on Debian

    Great guide, you should explain it a bit more rather than C+P.
     
  11. Unread #6 - Dec 24, 2012 at 2:41 PM
  12. RuneScapeJJ
    Joined:
    Aug 14, 2011
    Posts:
    1,522
    Referrals:
    1
    Sythe Gold:
    0
    Potamus

    RuneScapeJJ Guru
    $25 USD Donor New

    Installing and Configuring Squid(HTTP Proxy) on Debian

    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.
     
  13. Unread #7 - Dec 25, 2012 at 5:28 AM
  14. Syed
    Joined:
    Jan 22, 2009
    Posts:
    9,857
    Referrals:
    1
    Sythe Gold:
    11
    Sythe Awards 2012 Winner Gohan has AIDS (3) ??? Rust Player I'm LAAAAAAAME (2) Shitting Rainbow (2)

    Syed Hero
    Retired Sectional Moderator $50 USD Donor New

    Installing and Configuring Squid(HTTP Proxy) on Debian

    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
     
< Make €5 in 60 Seconds! | Guide For Becoming an M.D. Everything you need to Know + More >

Users viewing this thread
1 guest
Thread Status:
Not open for further replies.


 
 
Adblock breaks this site