DNS caching in linux

前端 未结 4 1890
猫巷女王i
猫巷女王i 2020-12-02 07:51

I am confused about DNS caching. I am writing a small forward proxy server and want to use OS DNS cache on a Linux system.

If I understand correctly, then there is D

4条回答
  •  佛祖请我去吃肉
    2020-12-02 08:05

    Here are two other software packages which can be used for DNS caching on Linux:

    • dnsmasq
    • bind

    After configuring the software for DNS forwarding and caching, you then set the system's DNS resolver to 127.0.0.1 in /etc/resolv.conf.

    If your system is using NetworkManager you can either try using the dns=dnsmasq option in /etc/NetworkManager/NetworkManager.conf or you can change your connection settings to Automatic (Address Only) and then use a script in the /etc/NetworkManager/dispatcher.d directory to get the DHCP nameserver, set it as the DNS forwarding server in your DNS cache software and then trigger a configuration reload.

提交回复
热议问题