Skip to content

(B) Shared Services Patterns

Brendan O'Connor edited this page Jan 24, 2024 · 25 revisions

Pattern B-01: Containerized DNS Server (Technitium)

Prerequisites:

Step 1: using the Master Controller, navigate to the /usr/local/e2e-patterns/dns/ repo.

cd /usr/local/e2e-patterns/dns/

Step 2: run the build script. This script will deploy a Node Controller and will install Technitium on it.

python3 build-e2ep-tanium-dns.py

Pattern B-01A: Change the Password of the DNS Server

Prerequisites:

Step 1: using the Master Controller, navigate to the /usr/local/e2e-patterns/dns/ repo.

cd /usr/local/e2e-patterns/dns/

Step 2: run the change password script (note: first time login to Tanium uses admin admin credentials)

python3 build-e2ep-change-password.py USERNAME OLDPASSWORD NEWPASSWORD

Example:

python3 build-e2ep-change-password.py admin admin N3wPassword

Pattern B01-B: Change default password using config file

Prerequisites:

Step 1: using the Master Controller, navigate to the /usr/local/e2e-patterns/dns/ repo.

cd /usr/local/e2e-patterns/dns/

Step 2: run the change password script

python3 build-e2ep-change-password-with-config.py

Pattern B-01C: Create Zone

Prerequisites:

Step 1: using the Master Controller, navigate to the /usr/local/e2e-patterns/dns/ repo.

cd /usr/local/e2e-patterns/dns/

Step 2: run the zone script

python3 build-e2ep-dns-zone.py USERNAME PASSWORD DNSZONE

Example:

python3 build-e2ep-dns-zone.py admin N3wPassword e2e.local

Step 3 (bug): login to the Technitium UI and manually add A record for the DNS server IP

  1. Select Zone Tab
  2. Click the link for your zone
  3. Click Add Record button
  4. Name: @
  5. Type: A (default) 06: TTL: 3600 (default)
  6. IP Address: enter the IP address of your DNS server
  7. Add reverse (PTR) record: Yes (check box)
  8. Create reverse zone for PTR record: Yes (check box)
  9. Overwrite existing records: (optional)
  10. Comments: (optional)

Pattern B-01D: Create Zone using config file

Prerequisites:

Step 1: using the Master Controller, navigate to the /usr/local/e2e-patterns/dns/ repo.

cd /usr/local/e2e-patterns/dns/

Step 2: run the zone script

python3 build-e2ep-dns-zone-with-config.py

Step 3 (bug): login to the Technitium UI and manually add A record for the DNS server IP

  1. Select Zone Tab
  2. Click the link for your zone
  3. Click Add Record button
  4. Name: @
  5. Type: A (default) 06: TTL: 3600 (default)
  6. IP Address: enter the IP address of your DNS server
  7. Add reverse (PTR) record: Yes (check box)
  8. Create reverse zone for PTR record: Yes (check box)
  9. Overwrite existing records: (optional)
  10. Comments: (optional)

Pattern B-01E: Add Record to the DNS Zone

Prerequisites:

Step 1: using the Master Controller, navigate to the /usr/local/e2e-patterns/dns/ repo.

cd /usr/local/e2e-patterns/dns/

Step 2: add record using the following syntax:

python3 build-e2ep-dns-add-record.py USERNAME PASSWORD DNSZONE DOMAINNAME IPADDRESS

Example:

python3 build-e2ep-dns-add-record.py admin N3wPassword e2e.local test123 172.16.0.85

nslookup example:

root@photon-machine [ /usr/local/e2e-patterns/dns ]# nslookup test123.e2e.local
Server:         172.16.0.9
Address:        172.16.0.9#53

Name:   test123.e2e.local
Address: 172.16.0.85

Pattern B-01F: Add Record to DNS Zone using config file

Prerequisites:

Use this script to add records to the Tanium server.

Step 1: using the Master Controller, navigate to the /usr/local/e2e-patterns/dns/ repo.

cd /usr/local/e2e-patterns/dns/

Step 2: add record using the following syntax:

build-e2ep-dns-add-record-with-config.py DOMAINNAME IPADDRESS

Example:

python3 build-e2ep-dns-add-record-with-config.py test123 172.16.0.85

nslookup example:

root@photon-machine [ /usr/local/e2e-patterns/dns ]# nslookup test123.e2e.local
Server:         172.16.0.9
Address:        172.16.0.9#53

Name:   test123.e2e.local
Address: 172.16.0.85