Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to resolve the dns configuration problem of squid

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

How to analyze the dns configuration problem of squid, in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

Today, I checked that squid's support for dns is as follows:

1. If dns server sends the domain name with ttl, then the ttl shall prevail. Generally, dns server will have support for ttl. Now the default ttl for dnsmasq I use is 0.

2. If dns server does not send ttl (ttl=0), squid will follow its own configuration positive_dns_ttl, which defaults to 6 hours.

3. A negative_dns_ttl configured in the original squid is confirmed to be mismatched. This configuration refers to how long it will take for squid to retrieve the domain name if it cannot get the domain name (error).

My previous situation was that neither positive_dns_ttl nor dns server's ttl was configured with negative_dns_ttl, so squid is subject to the default positive_dns_ttl, that is, 6 hours, which is too long for the web server. My current solution is to change the ttl of dns server to 60.

Second, the squid configuration has not been modified. Because it is also possible to directly modify the positive_dns_ttl configuration item of squid.

Some friends may use bind to do dns,bind. The default ttl may not be 0, so if the configuration with positive_dns_ttl does not work, just change the TTL value.

Attached: the method of detecting the ttl value of dns server

On a linux machine, modify / etc/resolv.conf to point the dns to the dns to be tested, and then execute

Dig test.com

If the dns can parse test.com, it will return a series of data, one of which indicates the TTL value, which will be known as soon as you try.

This is the answer to the question about how to parse the dns configuration of squid. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report