Install Tinyproxy details on Centos VPS, vpstinyproxy

Source: Internet
Author: User
Tags centos vps vps

Install Tinyproxy details on Centos VPS, vpstinyproxy

Tinyproxy is a lightweight HTTP proxy daemon

Yum install-y epel-release

Yum update

Install tinyproxy in yum-y

Sudo nano-c/etc/tinyproxy. conf

Search:

##
Port listening.
#

And change the port number to 8080 (you can change it to another port number) to make it look like:

Port 8080

Search:
# The control is tested according to the order.

Add the text below:
Allow

So it looks like:
192.168.1.1 allowed

To see what your IP address is, visit the http://www.whatismyip.com

Close and save the configuration file now

The next step is to configure your browser as a proxy server. Add the vps ip address to the proxy server address of the browser, and use port 8080 as the port number. To check whether you are currently connected through a proxy server, go to the http://www.whatismyip.com where you will see possible proxy detection under IP address information ".

Use an SSH tunnel to protect TinyProxy traffic

If your computer has an SSH client (if you are using Mac OS X), this is very simple.

Ssh User @ server.remote-tinyproxy-server-host.com-L 1234: localhost: 8888-N

For SSH tunneling, Windows users can use Plink or MobaXterm embedded tunnel interfaces.

---------

You may also want to change some of the following default values:

# The user and group that will run TinyProxy
User nobody
Group nogroup
# Default proxy listening port
Port 8888
# Specify the IP address (Interface) used for outgoing proxy host connection)
Bind 192.168.0.1
# The IP address (Interface) tinyproxy that you want to connect. If you cancel the annotation, It listens to all available network interfaces.
Listen 192.168.0.1
# The connection will be terminated in seconds
Timeout 600
# Record proxy queries (useful for retaining your historical records on the pages you have browsed), sometimes you can clear the browser cache
Log File "/var/log/tinyproxy. log"
# It is a good value for how many clients (connections) 100 can be created for tinyproxy for a client (personal use)
MaxClients 100
# The two values are about how many (minimum and maximum) tinyproxy instances will listen for connections from remote hosts-this should be familiar to people who configure Apache web servers. Please note that, tinyproxy uses process branches instead of threads
MinSpareServers 5
MaxSpareServers 20
# This is the number of site connections that the proxy will listen
# If you open 20 sites in 20 tabs
# You may need to propose this. If you have 10 clients
StartServers 10
# Allow the host to connect to the proxy server (Be careful to only allow access from your network, otherwise you may become an open proxy), and allow some hax0r to do some terrible proxy through you
Allow 127.0.0.1
# Log Level-"error" is generally good, who may like more information can notify-connection and information
LogLevel Error
# Pidfile location
PidFile "/var/run/tinyproxy. pid" # HTTP
RFC requires the "Via" header file, but uses the real host name
# Security concerns. If the following command is enabled
Provided string # used as the host name in the Via header; otherwise
# Server host name.
#
ViaProxyName "tinyproxy

Use Tinyproxy on Ubuntu

Sudo apt-get install tinyproxysudo nano-c/etc/tinyproxy. conf and:

 

103.246.106.24 allowed

 

202.3.77.208 allowed

 

Allow 103.246.106.9

103.246.106.10 allowed

115.248.114.5 allowed

115.248.114.51 allowed

14.139.38.11 allowed

202.3.77.183 allowed

202.3.77.210 allowed

202.3.77.91 allowed

Set a cron task to regularly restart Tinyproxy to save memory
sudo crontab -e

And add the following lines

0 22 * * * root /etc/init.d/Typyproxy restart
Open the port used by Tinyproxy

You can use the following command to open the port using iptables:

/ sbin / iptables -I INPUT -p tcp --dport 8888 -m state --state NEW,ESTABLISHED -j ACCEPT/ sbin / iptables -I OUTPUT -p tcp --sport 8888 -m state --state ESTABLISHED -j ACCEPT

Make sure it works. Use this command

netstat -l
Restart Tinyproxy

Now we only need to restart Tinyproxy to make changes. Just type

sudo /etc/init.d/tinyproxy stopsudo /etc/init.d/tinyproxy start

Or

Sudo/etc/init. d/tinyproxy restart

Check Tinyproxy logs

cat / var / log / tinyproxy / tinyproxy.log

Allow iptables to write logs

sudo iptables -I INPUT 5 -m limit --limit 5 / min -j LOG  - 

    Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.