Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Install SQUID Proxy Server in VPS - Easy Guide
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Install SQUID Proxy Server in VPS - Easy Guide

If you want to make your own proxy server with CentOS 6, 32/64bit OS, here is the guide....

First, we need to install Squid:

yum update

yum install squid -y

Edit /etc/squid/squid.conf and add the following lines: (to allow access from authenticated persons and disable ipv6)

auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd

auth_param basic children 2

auth_param basic realm My Proxy Server

auth_param basic credentialsttl 24 hours

auth_param basic casesensitive off

acl users proxy_auth REQUIRED

http_access deny !users

http_access allow users

tcp_outgoing_address SERVERIP all

You need to remove this line "http_access deny all" and can change "http_port 3128" to any other port. For example "http_port 8080"

Next, create our authentication file which Squid can use to verify for user authentications:

touch /etc/squid/passwd

chown root.squid /etc/squid/passwd

chmod 640 /etc/squid/passwd

htpasswd /etc/squid/passwd USERNAME

chkconfig --level 2345 squid on

/etc/init.d/squid restart

Thanked by 2hdpixel blogmaster

Comments

  • how can I connect to it?

  • mikhomikho Member, Host Rep

    A tutorial explains what steps needed to reach the goal. What you did here is posting the steps with little explanation.

    Add some text between the commandlines telling us why just this command was needed. Thst would really be of value to the reader.

    Thanks for the effort and I hope to see more posts from you in this category.

  • emre22 said: how can I connect to it?

    Chose your favorite browser and use in preferences, the option of "proxy server" putting there the ip of the vps that you installed squid and the port you are using for (normally 3128). Then, if you installed squid with authentication, when you start browsing it will ask you with a popup window for a username and a password.

    @CentrioHost Thanks for the tutorial. I think that most of squid proxy users want to hide their real ip, so, they probably want to add a forwarded_for off parameter to squid.conf file.

    Thanked by 1emre22
  • Will this work on per IP bound ?

  • SSDBlazeSSDBlaze Member, Host Rep

    Nice tutorial.

    I wrote one up myself a few weeks ago, but props to this one. Better worded :)

  • mzamo636mzamo636 Member
    edited June 2015
    • Adding password for user USERNAME
    • [root@vpdallas ~]# chkconfig --level 2345 squid on
    • [root@vpdallas ~]# /etc/init.d/squid restart
    • Stopping squid: [FAILED]
    • Starting squid: [FAILED]
    • 2015/06/23 09:22:18| Processing Configuration File: /etc/squid/squid.conf (depth 0)
    • FATAL: auth_param basic program /usr/lib/squid/ncsa_auth: (2) No such file or directory
    • Squid Cache (Version 3.1.10): Terminated abnormally.
    • CPU Usage: 0.007 seconds = 0.002 user + 0.005 sys
    • Maximum Resident Size: 23136 KB
    • Page faults with physical i/o: 0

    I followed all the instructions, but I seem to be getting failures.

    EDIT: I ran:

    rpm -ql squid | grep ncsa_auth

    I realized the issue is because my lib folder is:

    /usr/lib64/squid/ncsa_auth

    If anyone else runs into this issue on Centos 6.5 64bit, then just edit /etc/squid/squid.conf

    change /usr/lib/squid/ncsa_auth to /usr/lib64/squid/ncsa_auth

    Then run: sudo /etc/init.d/squid restart

    Bam! Now you'll get:

    [root@vpdallas ~]# sudo /etc/init.d/squid restart

    Stopping squid: [FAILED]

    Starting squid: . [ OK ]

    [root@vpdallas ~]#

    My squid failed to stop as there was nothing to stop, it wouldn't run before :P.

Sign In or Register to comment.