Harvey's Virtual Environment

How To Setup Local DNS Using Proxmox

Description:

In this video Harvey shows you how to create a local DNS Server using Proxmox. We hope you like this video if you did please leave a like and consider subscribing as we are very close to 4,000 subscribers!

Links

Commands

Part 1 - Installing Pihole

After the Pihole container is created through the proxmox web interface making sure it has a Static IP Address login to the container and run the following command to update the system to the latest version:

				
					apt-get update && apt-get upgrade -y
				
			

Once that process is finished we need to install curl using the following command:

				
					apt-get install curl -y
				
			

Now we are ready to run the automated script to install Pihole! Using the following command to do so:

				
					curl -sSL https://install.pi-hole.net | bash
				
			

Follow all of the onscreen steps making sure to select the admin web interface and so on. This is shown in the video. Then once you’ve finished the setup it will give you a IP Address to login to Pihole and a pre-generated password. In this case I change it using the following command:

				
					pihole -a -p
				
			
Part 2 - Installing NGINX Proxy Manager (NPM)

To install npm we first need to install docker and docker compose with the following command:

				
					apt-get install docker.io docker-compose -y
				
			

Once done we need to open a new file that we are going to compose our YAML inside naming it ‘docker-compose.yaml’ using the following command:

				
					nano docker-compose.yaml
				
			

Inside the file paste the following inside:

				
					version: '3.3'
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
				
			

Once pasted do the keyboard combination ‘Control + X’ then the key ‘Y’ then the ‘Enter’ Key. Then we can run the docker compose file to create the NPM container using the following command:

				
					docker-compose up -d
				
			

This process might take a few moments but once the container is created run the following command to find out the ip address

				
					hostname -I
				
			

Type this IP Address into the browser with port 81 on the end it may look like this example:

http://192.168.0.242:81

You should then reach the web page. Follow the rest of the video on instructions on how to configure NPM and Pihole to work together.