Linux Miscellaneous (13): Proxy Server

Source: Internet
Author: User

1. Proxy Server Overview

First, let's know what a proxy server is? The proxy server is another server between the browser and the Web server. With this server, the information sent by the browser will be sent to the proxy server first, and the proxy server will retrieve the webpage content and send it to the client's browser. We usually talk about proxy servers, mainly about how end users look for proxies they need. This topic describes how to set up and configure servers. For an enterprise network, the proxy server can control network access, shield insecure information, and accelerate the network.

Some of our colleagues who like to toss have actually come into contact with proxy servers. For example, if we want to go to a foreign website, there is a Great Wall firewall. Of course, direct access is not allowed. Therefore, the proxy server is used as the stepping stone for access.

2. Specific implementation:

(1) preparations:

First, we need two hosts: one as the proxy and the other as the client.
The proxy machine has two NICs with IP addresses: 192.168.1.155 and 192.168.2.70.
The two IP addresses are not in the same CIDR block, where 192.168.1.155 can access the Internet, while 192.168.2.70 cannot access the Internet.

The IP address of the client is 192.168.2.66, which cannot be linked to the Internet. However, the client can ping one of the proxy's IP addresses 192.168.2.70.

After understanding the above structure, let's take a look at the specific configuration.

(2) Specific Configuration

First, you must install the squid service on the proxy machine to provide the proxy service:

Then we need to set the squid configuration file:

/Etc/squid. conf


(1) Allow all users to access the website;
(2) The maximum number of connections is 100, which is divided into two levels. The first level is 16 and the second level is 256.

After completion, restart the squid service:


The server configuration is complete. Next we will configure the proxy settings of the client:

Before setting the IP address, we cannot ping the Internet because its CIDR block cannot be connected to the Internet.


Open Firefox: Edit ------- Preferences ------- Advanced ------- settings.



The third proxy server is Http proxy. We need to select the IP address of the server Nic In the same network segment as the client: 192.168.2.70, And the backend is 3128. after the settings, you can access other web pages. Remember that the client still cannot access the Internet at this time. In fact, it only reads the cache on the server. This completes the proxy.

Check whether the Internet is accessible:



Summary:

Simple and crude. This is the basic principle of the proxy server. It is a stepping stone for our clients to make accessible web pages that cannot be accessed through the server cache.



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.