Use squid to prohibit access/only allow access to the specified URL, squid is prohibited

Source: Internet
Author: User

Use squid to prohibit access/only allow access to the specified URL, squid is prohibited

Install squid

Yum install squid-y

Back up squid. conf

Cp squid. conf squid. conf-list

 

Vi squid. conf

Input:

Acl denyWeb dstdomain "/etc/squid/denyWeb. list"

Http_access deny denyWeb

You can also write as follows:

Squid. conf has a line of code:

Change http_access deny all to http_access allow all. Otherwise, all websites cannot be accessed;

 

Save:

Wq!

 

Edit denyWeb. list

Vi denyWeb. list

Restart:

Service squid restart

 

Open the IE browser and press alr + o

 

The default value of squid is 3128. You can modify the value of http_port in squid. conf;

When you access the website you are not allowed to access, you will find that the website cannot be accessed.

 

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.