### Initial VM Configuration Scripts Source: https://github.com/icann/resolver-testbed/blob/master/setup-and-running.md These commands initiate the configuration of the gateway-vm and resolvers-vm after they have been started. Each command runs a specific setup script within its respective VM, requiring root login credentials. ```shell sh /root/resolver-testbed-master/config-files/setup-gateway-vm.sh ``` ```shell sh /root/resolver-testbed-master/config-files/setup-resolvers-vm.sh ``` -------------------------------- ### Install VirtualBox on Ubuntu Source: https://github.com/icann/resolver-testbed/blob/master/README.md Installs VirtualBox on Ubuntu systems using the apt package manager. This is a prerequisite for running the testbed's virtual machines. ```bash sudo apt install -y virtualbox ``` -------------------------------- ### Install SSH Server and Utilities on Debian VM Source: https://github.com/icann/resolver-testbed/blob/master/setup-and-running.md Configures a Debian 11 base VM for the resolver testbed. This snippet includes installing the SSH server and standard system utilities, and preparing the VM for cloning. ```shell wget https://github.com/icann/resolver-testbed/archive/master.zip apt install -y unzip unzip master.zip rm master.zip shutdown -h now ``` -------------------------------- ### Fetch and Unzip Resolver Testbed on servers-vm Source: https://github.com/icann/resolver-testbed/blob/master/setup-and-running.md This snippet demonstrates fetching the resolver testbed zip archive from GitHub and unzipping it within the servers-vm. It assumes the VM has internet access and the `fetch` and `unzip` utilities are available. The script `setup-servers-vm.sh` is then executed to complete the server VM setup. ```shell fetch --no-verify-peer https://github.com/icann/resolver-testbed/archive/master.zip unzip master.zip rm master.zip sh /root/resolver-testbed-master/config-files/setup-servers-vm.sh ``` -------------------------------- ### Install Fabric Library Source: https://github.com/icann/resolver-testbed/blob/master/README.md Installs the Fabric library, a dependency for the Resolver Testbed. This command assumes Python 3 and pip3 are available on the system. ```bash pip3 install fabric ``` -------------------------------- ### Install Ansible Utils Collection Source: https://github.com/icann/resolver-testbed/blob/master/auto/README.md Installs the necessary ansible.utils collection, which is a dependency for some of the project's Ansible tasks. This command should be run in your Ansible environment. ```bash ansible-galaxy collection install ansible.utils ``` -------------------------------- ### Fast VM Environment Setup with Ansible Source: https://github.com/icann/resolver-testbed/blob/master/auto/README.md This playbook automates the parallel download of missing Vagrant boxes and parallel startup of unique VMs. It helps speed up environment setup and reloads, bypassing potential Virtual Box locking issues during VM cloning. It can be run repeatedly to ensure a consistent environment. ```ansible ansible-playbook ansible/vagrant_fast_up.yml # or if your machine will not take it because of low number of cores ansible-playbook -f ansible/vagrant_fast_up.yml ``` -------------------------------- ### VM Creation and Network Provisioning (Serial) Source: https://github.com/icann/resolver-testbed/blob/master/auto/README.md Standard Vagrant commands for bringing up virtual machines, fetching images, and initial network/system configuration. This method uses Vagrant's default serial execution, which can be slower for initial setup and reloads compared to the parallel Ansible approach. ```bash vagrant up ansible-playbook ansible/network_provision_* # If system changes are needed after editing files: ansible-playbook ansible/network_provision_* # To apply system configuration changes: vagrant up ``` -------------------------------- ### VirtualBox Network Setup with Ansible Source: https://github.com/icann/resolver-testbed/blob/master/auto/README.md Ansible playbook to set up the configured VirtualBox host-only network interface and DHCP server, based on the configuration in `ansible/host_vars/VBox-host`. ```ansible ansible-playbook ansible/setup_VirtualBox.yml ``` -------------------------------- ### Sign Root Zone with Custom Filenames and Keys using ldns-signzone Source: https://github.com/icann/resolver-testbed/blob/master/auto/ansible/files/scenarios/5/sign.txt This command demonstrates signing the root zone with custom output filenames and specific DNSKEYs. It includes example commented-out lines showing variations in output directory and key naming conventions. ```bash # ldns-signzone -i 20230101000000 -e 20300101000000 -o . -f root_.zone root.zone.2.unsigned K.+008+09646 K.+008+15873 ``` -------------------------------- ### Download and Extract Testbed Software Source: https://github.com/icann/resolver-testbed/blob/master/setup-and-running.md Downloads the resolver testbed software from GitHub using wget and then extracts the archive. The zip file is removed after extraction. ```shell wget https://github.com/icann/resolver-testbed/archive/master.zip unzip master.zip rm master.zip ``` -------------------------------- ### Clone Testbed VMs using Shell Script Source: https://github.com/icann/resolver-testbed/blob/master/setup-and-running.md This command executes a shell script on the control host to clone the necessary VirtualBox VMs for the testbed. It assumes the script `clone-testbed-vms.sh` is present in the `config-files` directory of the resolver-testbed project. ```shell sh config-files/clone-testbed-vms.sh ``` -------------------------------- ### Build Resolvers using Python Script Source: https://github.com/icann/resolver-testbed/blob/master/setup-and-running.md This command utilizes a Python script (`rt.py`) to build all current resolvers within the testbed environment. This process is resource-intensive and can take a significant amount of time. ```python ./rt.py make_resolvers ``` -------------------------------- ### Regular VM Provisioning with Ansible Source: https://github.com/icann/resolver-testbed/blob/master/auto/README.md This command ensures that the VMs are consistently provisioned and updated with the latest configuration changes, maintaining a predictable state. ```ansible ansible-playbook ansible/provision_* ``` -------------------------------- ### Run Ansible Playbooks for Resolver Connectivity Tests Source: https://github.com/icann/resolver-testbed/blob/master/auto/README.md These commands execute Ansible playbooks to test connectivity between resolvers-vm and servers-vm, and between resolvers-vm and root servers. Ensure all relevant VMs are operational and provisioned before running. ```bash ansible-playbook ansible/test_resolvers_servers_connectivity.yml ansible-playbook ansible/test_resolvers_root_connectivity.yml ``` -------------------------------- ### Managing Downloaded Vagrant Boxes Source: https://github.com/icann/resolver-testbed/blob/master/auto/README.md Commands to list and remove downloaded Vagrant box files to free up disk space. This is useful for managing the storage consumed by cached VM images. ```bash vagrant box list vagrant box remove ``` -------------------------------- ### VM Reloading and Resource Updates Source: https://github.com/icann/resolver-testbed/blob/master/auto/README.md Command to reload a Vagrant VM, which shuts it down and brings it back up with updated resource configurations (CPU, memory, interfaces) specified in the Vagrantfile. ```bash vagrant reload ``` -------------------------------- ### Sign Root DNS Zone with ldns-signzone Source: https://github.com/icann/resolver-testbed/blob/master/auto/ansible/files/scenarios/5/sign.txt This command signs the root zone file. It specifies the inception and expiration dates for the signature, the output directory, and the input and output filenames. It also includes specific DNSKEY sets for signing. ```bash ldns-signzone -i 20230101000000 -e 20300101000000 -o . -f root.zone root.zone.unsigned K.+008+09646 K.+008+15873 ``` -------------------------------- ### Sign Subdomain DNS Zones with ldns-signzone Source: https://github.com/icann/resolver-testbed/blob/master/auto/ansible/files/scenarios/5/sign.txt These commands are used to sign various subdomain zone files (e.g., a.zone, b.zone, etc.). Each command specifies signing parameters such as inception and expiration dates, output directory, and associated DNSKEYs. The filenames reflect the subdomain they are signing. ```bash ldns-signzone -i 20230101000000 -e 20300101000000 -o a -f a.zone a.zone.unsigned Ka.+008+01532 ``` ```bash ldns-signzone -i 20230101000000 -e 20300101000000 -o b -f b.zone b.zone.unsigned Kb.+008+63724 ``` ```bash ldns-signzone -i 20230101000000 -e 20300101000000 -o c -f c.zone c.zone.unsigned Kc.+008+24170 ``` ```bash ldns-signzone -i 20230101000000 -e 20300101000000 -o d -f d.zone d.zone.unsigned Kd.+008+12800 ``` ```bash ldns-signzone -i 20230101000000 -e 20300101000000 -o e -f e.zone e.zone.unsigned Ke.+008+36355 ``` ```bash ldns-signzone -i 20230101000000 -e 20300101000000 -o f -f f.zone f.zone.unsigned Kf.+008+42200 ``` ```bash ldns-signzone -i 20230101000000 -e 20300101000000 -o g -f g.zone g.zone.unsigned Kg.+008+40147 ``` ```bash ldns-signzone -i 20230101000000 -e 20300101000000 -o h -f h.zone h.zone.unsigned Kh.+008+27814 ``` ```bash ldns-signzone -i 20230101000000 -e 20300101000000 -o i -f i.zone i.zone.unsigned Ki.+008+31900 ``` ```bash ldns-signzone -i 20230101000000 -e 20300101000000 -o j -f j.zone j.zone.unsigned Kj.+008+33065 ``` ```bash ldns-signzone -i 20230101000000 -e 20300101000000 -o k -f k.zone k.zone.unsigned Kk.+008+19417 ``` ```bash ldns-signzone -i 20230101000000 -e 20300101000000 -o l -f l.zone l.zone.unsigned Kl.+008+10751 ``` ```bash ldns-signzone -i 20230101000000 -e 20300101000000 -o m -f m.zone m.zone.unsigned Km.+008+39182 ``` -------------------------------- ### Sign Subdomain Zones with Custom Server Names using ldns-signzone Source: https://github.com/icann/resolver-testbed/blob/master/auto/ansible/files/scenarios/5/sign.txt These commands illustrate signing subdomain zones for custom server configurations (e.g., a.some-servers, b.some-servers). Each command uses ldns-signzone with specific signing parameters and DNSKEYs tailored for these subdomains. ```bash # ldns-signzone -i 20230101000000 -e 20300101000000 -o a.some-servers -f a.some-servers.zone a.some-servers.zone.unsigned Ka.some-servers.+008+27874 Ka.some-servers.+008+61791 ``` ```bash # ldns-signzone -i 20230101000000 -e 20300101000000 -o b.some-servers -f b.some-servers.zone b.some-servers.zone.unsigned Kb.some-servers.+008+17970 Kb.some-servers.+008+18631 ``` ```bash # ldns-signzone -i 20230101000000 -e 20300101000000 -o c.some-servers -f c.some-servers.zone c.some-servers.zone.unsigned Kc.some-servers.+008+38628 Kc.some-servers.+008+44585 ``` ```bash # ldns-signzone -i 20230101000000 -e 20300101000000 -o d.some-servers -f d.some-servers.zone d.some-servers.zone.unsigned Kd.some-servers.+008+35440 Kd.some-servers.+008+38701 ``` ```bash # ldns-signzone -i 20230101000000 -e 20300101000000 -o e.some-servers -f e.some-servers.zone e.some-servers.zone.unsigned Ke.some-servers.+008+45180 Ke.some-servers.+008+62245 ``` ```bash # ldns-signzone -i 20230101000000 -e 20300101000000 -o f.some-servers -f f.some-servers.zone f.some-servers.zone.unsigned Kf.some-servers.+008+12238 Kf.some-servers.+008+41911 ``` ```bash # ldns-signzone -i 20230101000000 -e 20300101000000 -o g.some-servers -f g.some-servers.zone g.some-servers.zone.unsigned Kg.some-servers.+008+10470 Kg.some-servers.+008+10894 ``` ```bash # ldns-signzone -i 20230101000000 -e 20300101000000 -o h.some-servers -f h.some-servers.zone h.some-servers.zone.unsigned Kh.some-servers.+008+24721 Kh.some-servers.+008+25601 ``` ```bash # ldns-signzone -i 20230101000000 -e 20300101000000 -o i.some-servers -f i.some-servers.zone i.some-servers.zone.unsigned Ki.some-servers.+008+28839 Ki.some-servers.+008+29311 ``` ```bash # ldns-signzone -i 20230101000000 -e 20300101000000 -o j.some-servers -f j.some-servers.zone j.some-servers.zone.unsigned Kj.some-servers.+008+19471 Kj.some-servers.+008+27314 ``` ```bash # ldns-signzone -i 20230101000000 -e 20300101000000 -o k.some-servers -f k.some-servers.zone k.some-servers.zone.unsigned Kk.some-servers.+008+30841 Kk.some-servers.+008+60291 ``` ```bash # ldns-signzone -i 20230101000000 -e 20300101000000 -o l.some-servers -f l.some-servers.zone l.some-servers.zone.unsigned Kl.some-servers.+008+41582 Kl.some-servers.+008+51771 ``` ```bash # ldns-signzone -i 20230101000000 -e 20300101000000 -o m.some-servers -f m.some-servers.zone m.some-servers.zone.unsigned Km.some-servers.+008+38394 Km.some-servers.+008+42494 ``` -------------------------------- ### Destroying Vagrant VMs Source: https://github.com/icann/resolver-testbed/blob/master/auto/README.md Command to destroy all Vagrant-managed virtual machines. An optional '-f' flag can be used to bypass confirmation. Manual cleanup in VirtualBox might be necessary if cloning is used. ```bash vagrant destroy vagrant destroy -f ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.