In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "what is the practical interview question and answer of Squid proxy server in linux". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
The following is the contents of the interview questions and answers
1. What is a proxy server? What is the use of proxy servers in computer networks?
Answer: proxy servers refer to physical machines or applications that act as middleware between the client and the resource provider or server. The client looks for files, pages or data from the proxy server, and the proxy server can handle all complex transactions between the client and the server to meet the needs of client generation.
Proxy servers are the backbone of WWW, and most of them are Web proxies. A proxy server can handle complex communication transactions between the client and the server. In addition, it provides anonymous information on the Internet, which means that your identity and browsing traces are secure. Agents can configure which sites customers are allowed to see and which sites are blocked.
2. What is Squid?
Answer: Squid is an application released under the GNU/GPL protocol that can be used as both a proxy server and a Web cache daemon. Squid mainly supports protocols like HTTP and FTP, but it can also support other protocols such as HTTPS,SSL,TLS. Its feature is that the Web cache daemon makes the Internet faster by caching Web and DNS data from frequently visited websites. Squid supports all major platforms, including Linux,UNIX, Microsoft's Windows and Apple's Mac.
3. What is the default port for Squid? How to modify its operating port?
Answer: the default port for Squid runtime is 3128. We can edit its configuration file to change its default port to a port that is not used by the user, and the path is / etc/squid/squid.conf, recommended as follows.
Open the'/ etc/squid/squid.conf' file with your editor.
# nano / etc/squid/squid.conf
Now change it to another port that is not in use and save exit.
Http_port 3128
Restart the Squid agent service, as shown below.
# service squid restart
4. Your company management asked you to block some domain names through the Squid proxy server. What do you do?
Answer: the shielded domain name is a functional module implemented in the configuration file. We only need to perform a small manual configuration, which is recommended as follows.
a. Create a file named 'blacklist'' in the'/ etc/squid' directory.
# touch / etc/squid/blacklist
b. Open the file with a nano editor.
# nano / etc/squid/blacklist
c. Write the domain name you want to block into this file as one domain name per line.
.facebook.com.twitter.com.gmail.com.yahoo.com...
d. Save the exit and open the Squid configuration file from'/ etc/squid/squid.conf'.
# nano / etc/squid/squid.conf
e. Add the following line to the configuration file.
Acl BLACKLIST dstdom_regex-I "/ etc/squid/blacklist" http_access deny blacklist
f. Save the configuration file and exit, and restart the Squid service to take effect.
# service squid restart
5. What are media scope restrictions (Media Range Limitation) and partial downloads in Squid?
Answer: media scoping is a special feature of Squid that fetches only the data you need from the server, not the entire file. This function well realizes that when users watch videos on various video streaming sites such as YouTube and Metacafe, they can click the progress bar in the video to select the progress, so the whole video does not have to be loaded, except for some needed parts.
The characteristic of Squid partial download function is that it can be downloaded in the form of small packets when updating Windows, and can be paused. It is precisely because of this feature that the Windows machine that is downloading files can resume downloading without having to worry about data loss. Squid's media scope restrictions and partial downloads are available only after a copy of the complete file has been stored. In addition, when a user visits another page, unless Squid is specifically configured, some of the downloaded files are deleted and not left in the cache.
6. What is a reverse proxy for Squid?
Answer: reverse proxy is a feature of Squid, which is used to speed up the Internet access of end users. The following abbreviation 'RS'' represents the original server that contains the resource, while the proxy server is called 'PS'. On its first visit, it gets the data it provides from RS and stores a copy of it on PS at a configured time. In this way, each time the data requested from the PS is equivalent to being obtained from the original server. This will reduce the network congestion, reduce the utilization rate of CPU, reduce the utilization of network resources, and thus alleviate the load pressure of the original actual server. However, RS cannot count the total traffic, because PS shares some of the tasks of the original server. 'The X-Forwarded-For HTTP' information can be used to record the original IP address of a client that connects to RS through a HTTP proxy or load balancer.
It is technically feasible to use a single Squid server as both a forward proxy server and a reverse proxy server.
7. Since Squid can be used as a Web cache daemon, can the cache be deleted? How do I delete it?
Answer: of course! As a Web cache daemon, Squid can speed up the access to web pages, and it is very simple to clear the cache.
a. First stop the Squid proxy service, and then remove the cache from the'/ var/lib/squid/cache' directory.
# service squid stop# rm-rf / var/lib/squid/cache/*
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.