Install DNS Relay using VirtualBox
Follow this post to install the DNSFilter Relay via VirtualBox. We recommend configuring two separate Relay Virtual Machine (VM) instances that listen on different LAN IPs. These different DNS IPs can then be sent out via DHCP.
By default, the VM runs two docker instances of the Relay which load balance traffic requests. Every hour a system cron job checks for a new docker container, and, if it exists, updates one, followed by the other. This upgrade should be without interruption.
Consult VirtualBox's documentation for setting details and requirements.
Prerequisites for setup
- Recommended specs: 64-bit 2-core CPU; 2GB of RAM
- Open these ports at the NSG level:
- Port 53: Used for DNS (Domain Name System) traffic
- Port 853: Used for DNS over TLS (DoT) traffic
- Port 443: Used for HTTPS (Hypertext Transfer Protocol Secure) traffic
- Create a Site in the DNSFilter dashboard to associate the Relay with. Copy the Site Secret Key from the Relay Install tab to complete the installation
Setup the Relay
- Download the Image: Virtual Box 22.04, 4.47 GB (ova)
Login Credentials:
Username: dnsfilter
Password: ChangeMeNow! - Import the Image file into VirtualBox
- Change the VM to use a bridged network interface instead of NAT
-
Update the default password using this command:
passwd
- Use our in-app config tool to edit the relay.conf file or manually edit the relay.conf file using this command:
sudo nano /etc/relay/relay.conf
- Edit these fields (crtl+o):
- Name. Must match the Site name set in the DNSFilter dashboard
- Site Secret Key. Copied from the dashboard
- Save these changes (return/enter) and exit the file (crtl+x)
- Edit these fields (crtl+o):
- Run these commands:
sudo systemctl enable docker.service
sudo systemctl start docker.service
- Restart the VM
- Run the
ifconfig
command to make sure it is picking up the correct IP - Test the connection. Troubleshoot any errors as needed
-
Start the docker relay with this command:
sudo docker start relay1 relay2
- Confirm the status of the relays using this command:
sudo docker ps
The setup is now complete and the Relay will begin filtering DNS traffic.
Please sign in to leave a comment.
Comments
0 comments