Install DNS Relay using Hyper-V Image
Follow this post to install the DNSFilter Relay via Hyper-V Image.
Consult Hyper-V's documentation for additional support.
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: Hyper-V 22.04, 9.9 GB (vhdx)
- Create a new Hyper-V Virtual Machine (VM)
- Specify Generation 2
- Choose to use an existing virtual hard disk (VHDX format)
- Update the Security settings to support your Hyper-V version, either disable Secure Boot or enable Linux Secure Boot
Configure the Relay file once the VM setup is complete.
- Log in to the VM
Login Credentials:
Username: dnsfilter
Password: ChangeMeNow! -
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):
- Confirm network settings are configured to run with the Relay:
sudo nano /etc/netplan/00-installer-config.yaml
- Choose how the network should obtain an IP:
- Use DHCP (default). This setting will work as long as the network firewall has a permanent DHCP lease for the MAC of the Virtual NIC of the container
-
Assign a Static IP. Update the .yaml values:
- Add # before
dhcp4: true
- Remove # before these lines:
addresses
gateway4
nameservers
addresses
dhcp4
- Update
addresses
to reflect the Static IP e.g.192.168.1.15/24
becomes172.16.0.44/24
- Update
gateway4
to the appropriate network gateway IP e.g.192.168.1.1
becomes172.16.0.1
- Add # before
- Save the file
- Run this command to enable the changes:
sudo netplan generate
sudo netplan apply
- Choose how the network should obtain an IP:
- 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 Relay using this command:
sudo docker ps
The setup is now complete and the Relay will begin filtering DNS traffic.
0
Please sign in to leave a comment.
Comments
0 comments