A proxy server is often a necessary thing. Applications of this wonderful tool - weight. For example, visiting a site where your ip address is blocked by the administrator. :)
Tinyproxy will be considered - a small but convenient proxy server. Let's try setting it up by spending no more than five minutes on it. First, install it:
# aptitude install tinyproxy
After that, you need to edit the /etc/tinyproxy.conf file to start using the proxy server. In this article I will describe only some directives. The rest, if necessary, you can change yourself, having studied each in the documentation: man tinyproxy.conf
Settings
XTinyproxy No
- disables the addition of the X-Tinyproxy header to clients.
DisableViaHeader Yes
- Makes the proxy server completely anonymous. If you do not disable the Via header (required, by the way, by the HTTP RFC standard), then information about using Tinyproxy will be visible to the server.
Timeout
. The maximum time in seconds after which an inactive connection will be closed. By default - 600. If you have a stable Internet, then this number can be reduced. For example, 120 seconds will be enough.
MaxClients
. Maximum number of simultaneously connected clients. By default - 100. If you have a small server, and you are the only user, this number can be safely reduced to 20-50.
MinSpareServers
and MaxSpareServers
limit the minimum and maximum number of tinyproxy processes. If the number of processes is less than the minimum value, new ones will be created. If it exceeds the maximum - the extra will be completed.
The default is 5 and 20, respectively. Again, you need to select by experimentation.
StartServers
is responsible for the number of running processes. Should not be less than MinSpareServers.
Next, you need to allow yourself access to the proxy server. In the configuration file you need to find the directive Allow 127.0.0.1 and after it add your ip address, according to the syntax. You can add multiple subnets, etc.
Allow 127.0.0.1 Allow 192.168.0.0/16 Allow 172.16.0.0/12 Allow 10.0.0.0/8
To allow access to the proxy server for anyone, add the line:
Allow 0.0.0.0/0
In tinyproxy, you can enable the filter of visited sites. To do this, uncomment this parameter:
Filter "/ etc / filter"
And in the file / etc / filter set stop words by line.
vk.com odnoklassniki.ru porno yandex
Sites that contain the specified keywords in the url will not open when using tinyproxy.
That's all. Save the changes and restart tinyproxy with the command: service tinyproxy restart.
Connection
Initially, the server runs on port 8888, that is, to connect, use the address 1.1.1.1:8888, where 1.1.1.1 needs to be replaced with your server's ip.
Now try to connect to your proxy server, specifying its address in the browser settings, ftp client, and so on.
Check the proxy server anonymity here: http://ip.spys.ru/
Why did Yandex write to porn?
Something is missing. Proxy refuses to accept connection ....
User nobody
Group nobody
need to comment out to work
Most likely there is no tinyproxy can not create a log file and \ or pid file in the folders specified in the configuration file, and commenting the lines with nobody tinyproxy runs on behalf of the root. Probably not safe. It is necessary to create subfolders with rights for noubodi so that the necessary files are created there.
Thank you of course, but it’s better not to skimp and buy quality anonymous proxies, for example, on proxys.io, a very good proxy service, and at the prices are all normal, they do not bite at least, so you can work