[Tutorial]Setup your elite private proxy in your VPS in 5 minutes

zx123

Senior Member
Joined
Feb 26, 2009
Messages
1,184
Reaction score
887
I think that a lot of people here use VPS to hosting his websites, so why not install also a private proxy on them??
You can use your private proxy for every thing (scrapebox, facebook etc.)
So let's start.
First of all this guide is for Centos 6 OS, I always use this OS, sometime debian or ubuntu, but I think that a lot of people prefer Centos.
access to your vps
write
Code:
yum update
write
Code:
yum install squid
ok now you have installed the proxy, now we need to edit the config file
the config file is located in /etc/squid/squid.conf
for easy use just rename it (to create a backup)
Code:
cp /etc/squid/squid.conf /etc/squid/squid.conf.original
and after edit it
Code:
vi /etc/squid/squid.conf
and just delete all and put this inside
Code:
http_port 3128


acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl localnet src 10.0.0.0/8    # RFC1918 possible internal network
acl localnet src 172.16.0.0/12    # RFC1918 possible internal network
acl localnet src 192.168.0.0/16    # RFC1918 possible internal network
acl localnet src fc00::/7       # RFC 4193 local private network range
acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines

acl SSL_ports port 443
acl Safe_ports port 80        # http
acl Safe_ports port 21        # ftp
acl Safe_ports port 443        # https
acl Safe_ports port 70        # gopher
acl Safe_ports port 210        # wais
acl Safe_ports port 1025-65535    # unregistered ports
acl Safe_ports port 280        # http-mgmt
acl Safe_ports port 488        # gss-http
acl Safe_ports port 591        # filemaker
acl Safe_ports port 777        # multiling http
acl CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access allow localhost
hierarchy_stoplist cgi-bin ?
coredump_dir /var/spool/squid
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
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_access
auth_param basic childred 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
acl ncsaauth proxy_auth REQUIRED
http_access allow ncsaauth
forwarded_for off
acl ip1 myip 192.168.0.1
tcp_outgoing_address 192.168.0.1 ip1
acl ip2 myip 192.168.0.2
tcp_outgoing_address 192.168.0.2 ip2
acl ip3 myip 192.168.0.3
tcp_outgoing_address 192.168.0.3 ip3
acl ip4 myip 192.168.0.4
tcp_outgoing_address 192.168.0.4 ip4
acl ip5 myip 192.168.0.5
tcp_outgoing_address 192.168.0.5 ip5
request_header_access Allow allow all 
request_header_access Authorization allow all 
request_header_access WWW-Authenticate allow all 
request_header_access Proxy-Authorization allow all 
request_header_access Proxy-Authenticate allow all 
request_header_access Cache-Control allow all 
request_header_access Content-Encoding allow all 
request_header_access Content-Length allow all 
request_header_access Content-Type allow all 
request_header_access Date allow all 
request_header_access Expires allow all 
request_header_access Host allow all 
request_header_access If-Modified-Since allow all 
request_header_access Last-Modified allow all 
request_header_access Location allow all 
request_header_access Pragma allow all 
request_header_access Accept allow all 
request_header_access Accept-Charset allow all 
request_header_access Accept-Encoding allow all 
request_header_access Accept-Language allow all 
request_header_access Content-Language allow all 
request_header_access Mime-Version allow all 
request_header_access Retry-After allow all 
request_header_access Title allow all 
request_header_access Connection allow all 
request_header_access Proxy-Connection allow all 
request_header_access User-Agent allow all 
request_header_access Cookie allow all 
request_header_access All deny all

save and close

"http_port 3128" is the port of your proxy, you can change it
if you use Centos 64bit locate the line
Code:
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_access
and change in
Code:
auth_param basic program /usr/lib64/squid/ncsa_auth /etc/squid/squid_access

Now you need to create the authentication system using ncsa
so write in console
Code:
touch /etc/squid/squid_access
then

Code:
htpasswd /etc/squid/squid_access proxyadmin
"proxyadmin" is the username that you want use to access to it... you can change it
you can use this command also to change the password

now restart the proxy
write
Code:
service squid restart
and for start in automatic every time your VPS reboot write
Code:
chkconfig squid on

Now you have your privare proxy for your personal use.
this is the result
attachment.php

an Elite proxy

On google you can found a lot of tutorial about it, but I think none is very simple like this :D
 
Yep, thats just what i do. It takes me no more than 5 minutes to get it all set up and running

Thanks for the detailed tutorial, should help lots of people
 
Thanks for the tut.. informative, but I have 1 question....

Where do I enter my IP address in the config file?

I have 2 extra IP's I got from my VPS to use for this and want to set both up to use in Scrapebox and Senuke tools.
I saw somewhere how to setup many different IP's but don't remember where..


Also, what other range of ports could I use other than the default 3182?

THANKS

Wylie
 
Its really useful mate. I assume the centos as to be pre instaled in the server. Could be compile some basic and useful unix command for webmaster. thanks
 
I'd love to know how to do this for multiple proxies (getting more from the VPS provider).
Can squid do it or do I need to look elsewhere?
 
This work for any IP associated to your VPS.
Example: if your vps provider give you a VPS with 3 IPs you can just change them when you setup your seo tools etc. Username and password for the proxy is the same for all your IPs
 
So I've got a question - obviously this isn't a good idea to overdo on IPs that you currently host domains on, but is it possible to run CPanel and this proxy service in the background without affecting the websites? (other than the speed, depending on how heavily you're using the proxies).
 
How much can you get? Do get only the number that you paid for to your hosting or does it leach more IPs somehow?
 
Thanks. How can i made not login/pass authentication, but have access only from my home ip?
 
Way to keep it simple. Just what I needed. However, it took me 5 minutes and 24 seconds to set up so the title of this thread is a little misleading
 
Way to keep it simple. Just what I needed. However, it took me 5 minutes and 24 seconds to set up so the title of this thread is a little misleading

here wanna cookie
 
can anyone get this to work fully with pinterest? I can't seem to add boards and other functions.
 
I get error
Code:
ACL name 'all' not defined!
FATAL: Bungled (null) line 180: http_reply_access allow all
Squid Cache (Version 2.7.STABLE9): Terminated abnormally.
 failed!
 
I get error
Code:
ACL name 'all' not defined!
FATAL: Bungled (null) line 180: http_reply_access allow all
Squid Cache (Version 2.7.STABLE9): Terminated abnormally.
 failed!

line 180?? the config file is not 180 lines ... LOL... for someone is hard also follow step by step a tutorial
 
I know, that's why it makes it harder. And btw, dont underestimate
 
Back
Top