CentOS Open HTTP Proxy tinyproxy

Source: Internet
Author: User

first, Preface

Even if some companies think of the stress test is to use some microsoft, official website out of some software, an IP launched a lot of access. And so one day the hacker attack came to find or Not. Hua Xinjun that knowing this is the key point of stress testing, it should be simulated by hackers to carry out stress testing is the best policy.

Huainputt Network Technology co., Ltd. 2000 began to do anti-ddos, ANTI-CC attack protection, now can be perfect protection cc attacks, 10g attack free protection, You can contact the public number, This article is only a small area of their own site for stress testing, do not use for illegal purposes.

  Let me briefly explain what a CC attack is.

The attacker uses a proxy server to generate a legitimate request to the victim host, implement ddos, and pretend to be called: cc (challengecollapsar).

CC is mainly used to attack the Page. We all have this experience, that is, when visiting the forum, if the forum is larger, more people visit, the speed of the page will be slower, the more people visit, the more pages of the forum, the larger the database, the higher the frequency of access, the use of system resources is Considerable.

A static page does not need the server how much resources, even can say directly from the memory to read out to you, but the forum is not the same, I see a post, the system needs to determine whether I have read the post in the database, if there is, read out the contents of the post, show- At least 2 databases have been accessed here, and if the data size of the database is 200MB, the system is likely to be searching through this 200MB-sized data space, how much CPU resources and time are needed? If I am looking for a keyword, then the time is more substantial, because the previous search can be limited to a very small scope, such as user rights only check the user table, the post content only check the post table, and can immediately stop the query, and search will certainly be all the data to make a judgment, the time spent is quite large.

CC is to take advantage of this feature, to simulate multiple users (how many threads are the number of Users) nonstop access (access to those who need a lot of data operations, is the need for a lot of CPU time of the page). with a general performance test software you can do a lot of simulation of user Concurrency.

Know what is the CC attack, we should be so simulated hackers to their own website cc pressure test?

In the first step, we should have a lot of HTTP proxies to simulate client access. , how do we get the HTTP proxy server first?

1, There are a lot of free HTTP proxy server on the internet, we can first collect some

2, we set up some HTTP proxy servers for stress testing.

Let's introduce the collection of HTTP proxy servers.

Baidu Search "http proxy" will have a lot of websites to provide free HTTP proxy, you just need to copy down, sorting out, using software to verify whether it is available,

For example, This site provides an HTTP proxy,

http://www.kuaidaili.com/

  Verifying the HTTP Proxy

Verification software, The Flower Thorn Agent verification can be,

Online free is not how to use, but also need to set up some of their own,

  Windows Setup HTTP Proxy

Now let's talk about how to turn on HTTP proxy in Windows,centos,ubuntu

Windows has ccproxy free green band cracked online can be searched,

After running, it's like this,

After the proposed set up, to account for the setting of an IP to allow, otherwise it will be scanned by others, others can use your proxy server,

  Linux Ubuntu Open HTTP proxy tinyproxy

Windows system has been using ccproxy, non-windows systems, How to open an HTTP proxy it? Here is a simple software to support the Linux Ubuntu, what to do with the HTTP proxy? such as the CC attack test, Hide your IP or something,

Proxy Server English full name is proxy server, Its function is proxy network users to obtain network Information. The image says: It is the intermediary of the network Information.

second, Build the Environment

* Linux Ubuntu

* Tinyproxy

three, Ubuntu Installation Method

$sudo Apt-get Install Tinyproxy

The Tinyproxy service is automatically opened with root privileges after installation, and the default listening port is 8888

Iv. Start-up Help

$tinyproxy--help

Usage:tinyproxy [options]

Options are:

-d don't daemonize (run in foreground).

-c file Use an alternate configuration FILE.

-h Display This usage information.

-l Display the License.

-v Display version Information.

V. How to start a root user

* Default Boot

$sudo Service Tinyproxy Start

* Restart

$sudo Service Tinyproxy Restart

* Stop

$sudo Service Tinyproxy Stop

six, DIY Configuration

4.1 Default configuration file location

/etc/tinyproxy.conf

(can be found from The/etc/init.d/tinyproxy wrapper script)

4.2 Default Configuration Description

* Switch Uid/gid to Nobody/nogroup when the initialization is complete when the root user starts

* Port default listener is 8888 (this Port does not need to be bound with root Permission)

* Listen on the network card by default

* Logfile (must) Log file, default/usr/var/log/tinyproxy/tinyproxy.log, will be warned when Logfile file does not exist and will not fail to Run.

* Pidfile (must) pid file, default/usr/var/run/tinyproxy/tinyproxy.pid, will fail to run if the Pidfile file does not Exist.

* Startservers Initial start of the proxy server subprocess (default is 10)

Allow allows the IP address of the HTTP proxy to be used with tinyproxy. The default is 127.0.0.1, and if you want to expose the Tinyproxy proxy server, comment out the Allow Line.

4.3 DIY configuration instructions

Tinyproxy can be run with normal user privileges, as long as the listening port is Public. The specific DIY configuration method is as Follows:

--package executable program and default configuration file--

1. $which Tinyproxy

/usr/sbin/tinyproxy

2. $cp/usr/sbin/tinyproxy ~/bin

3. $cp/etc/tinyproxy.conf ~/ETC

--modify configuration--

1. Change the default port 8888 to the one you want (such as the 8990 TCP port above Ljysrv)

2. Comment out allow 127.0.0.1

3. Change logfile To/tmp/tinyproxy.log

4. Change Pidfile To/tmp/tinyproxy.pid

--start--

1. $CD ~/bin

2. $./tinyproxy-c ~/etc/tinyproxy.conf

--close--

1. $killall Tinyproxy

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  Cent os6.5 to install the tinyproxy tutorial,

RPM-UVH http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

Yum Update-y

Yum Install Tinyproxy-y

Vi/etc/tinyproxy/tinyproxy.conf

Port 8888//preset is 8888 port, you can change

Allow 127.0.0.1//change 127.0.0.1 to your own IP

For example your IP is 1.2.3.4, you change to allow 1.2.3.4, that only you can connect this proxy

If you want any IP can face to proxy before allow to hit # comment

Service Tinyproxy Start

After you start the software, you can

Netstat-ntl

Check to see if your proxy port is open, I open the 8167 port,

After erecting the agent, we can use the HTTP proxy software to verify that you can use the agent to save a copy,

After exporting the available agents, that's it.

next, we formally began to use these HTTP agents for CC stress testing, We simulate a day 80~100 million PV traffic to the site for stress testing, but also testing the site database query performance, etc..., please follow us: i77169

CentOS Open HTTP Proxy tinyproxy

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.