DNS caching in Amazon Linux 2023

0

I am trying to figure out how to cache DNS queries on EC2 machine running Amazon Linux 2023 as for my usage there are too many repeated queries to APIs which causes very high GuardDuty bill and could be faster.

There is a guide for dnsmasq usage, but it isn't working as there is no dhclient present on AL2023.

AL2023 uses systemd resolved, but seems that dnsstublistener is turned off (/usr/lib/systemd/resolved.conf.d/resolved-disable-stub-listener.conf states "Amazon Linux systems do not use the stub listener by default, so we disable it in order to reduce the runtime footprint and to avoid triggering https://bugzilla.redhat.com/show_bug.cgi?id=2115094") and I'm unable to turn it on in nice way, even /run/systemd/resolve/stub-resolv.conf doesn't contain a valid dns records for 127.0.0.53 and enabling dns stubs in /etc/resolv.conf gives no effect.

What would be the correct way to cache DNS queries locally on AL2023 ec2 machines?

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠