Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install and configure systemd-resolved on Bookworm AMIs #818

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

mcdonnnj
Copy link
Member

@mcdonnnj mcdonnnj commented Aug 23, 2024

🗣 Description

This pull request modifies our Debian Bookworm based AMIs to use the stub DNS resolver from systemd-resolved.

💭 Motivation and context

This mirrors changes made for COOL AMIs made in cisagov/skeleton-packer#329 and discussed in https://github.com/cisagov/cool-system-internal/issues/140.

🧪 Testing

Automated tests pass. I built and deployed Bookworm AMIs using this change. I verified functionality with the following:

vulnscan1:~$ dig www.example.com

; <<>> DiG 9.18.28-1~deb12u2-Debian <<>> www.example.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47018
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;www.example.com.		IN	A

;; ANSWER SECTION:
www.example.com.	210	IN	A	93.184.215.14

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Fri Aug 23 16:13:22 UTC 2024
;; MSG SIZE  rcvd: 60

vulnscan1:~$ dig +tcp www.example.com

; <<>> DiG 9.18.28-1~deb12u2-Debian <<>> +tcp www.example.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56242
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;www.example.com.		IN	A

;; ANSWER SECTION:
www.example.com.	184	IN	A	93.184.215.14

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (TCP)
;; WHEN: Fri Aug 23 16:13:48 UTC 2024
;; MSG SIZE  rcvd: 60

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

Run this role against any Debian Bookworm instances in the Packer
configuration's Ansible playbook. This keeps these instances consistent
with the baseline configuration in cisagov/skeleton-packer.
@mcdonnnj mcdonnnj self-assigned this Aug 23, 2024
@mcdonnnj mcdonnnj added improvement This issue or pull request will add or improve functionality, maintainability, or ease of use dependencies Pull requests that update a dependency file ansible Pull requests that update Ansible code labels Aug 23, 2024
@mcdonnnj mcdonnnj marked this pull request as ready for review August 23, 2024 16:17
@mcdonnnj mcdonnnj requested a review from a team August 23, 2024 16:17
Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mcdonnnj mcdonnnj added this pull request to the merge queue Aug 27, 2024
Merged via the queue into develop with commit 2143c5d Aug 27, 2024
7 checks passed
@mcdonnnj mcdonnnj deleted the improvement/use_ansible-role-systemd-resolved branch August 27, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ansible Pull requests that update Ansible code dependencies Pull requests that update a dependency file improvement This issue or pull request will add or improve functionality, maintainability, or ease of use
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants