Skip to main content

Using Pi-hole for your local DNS.

 Quick steps to configure local DNS with Pi-hole.

1. Login into the Pi-hole server.

I am using portainer so it will look like this:

Pi-hole command screen in portainer

2. Execute the following commands:

Go to the following directory  "/etc/dnsmasq.d".

command:
cd /etc/dnsmasq.d

Create the following file "02-lan.conf" with the following line added "addn-hosts=/etc/pihole/lan.list"

command:
echo "addn-hosts=/etc/pihole/lan.list" > ./02-lan.conf

Go to the directory "/etc/pihole".

command:
cd /etc/pihole

Create the following file "lan.list". And add the dns entries for your lan my example.

command:
vim lan.list (or use the editor of your choise)

The entries made. The format is "IP <TAB> name1 <TAB> name2 ...".

192.168.0.1     router.lan
192.168.0.10    nas.lan
192.168.0.11    plex.lan
192.168.0.12    docker.lan      portainer.lan

Quit and save .

press "ESC" followed by ":wq" "ENTER"

Execute the following command.

command:
pihole restartdns reload

3. Test your configuration.

with a bowser:
try your domain name in a browser

or command prompt:
ping domain name  from command prompt



Comments

Popular posts from this blog

How to migrate a dataset from one pool to another in TrueNAS CORE ?

The migration steps. 1. Stopping the services that use the dataset. (recommended). 2. Replicating the dataset to the new pool. 3. Verify that all data is replicated. 4. Put in operation the new dataset. 5. Delete the old dataset when satisfied (or not).   The video tutorial can be found by clicking on the title or the picture below. How to migrate a dataset from one pool to another in TrueNAS CORE 1. Stopping the services that use the dataset (recommended). Go to the services tab and what I do if not certain of which services are used by the dataset I let only running the services from which I am cetain that they do not use the dataset. Also, control jails and Virtual Machines to be sure that they do not use the dataset. In the video I do not stop the services to show it is possible. 2. Replicate the dataset to the new pool. a. go to Tasks --> Replication Tasks b. add new replication task c. select source location (example select on this system source /mnt/volume1/VM iso) d. sel...

Using docker on FreeNas (TrueNAS Core)

In this tutorial we will go over the installation of docker in FreeNas (if using jails is not enough). The first step will be to install a host for docker in a virtual machine. In the documentation for FreeNas they propose to use Ubuntu. My actual version of FreeNAS is FreeNAS-11.3-U4.1.(now TrueNAS CORE 12). The video tutorial can be found here https://hometinylab.blogspot.com/2021/01/follow-up-on-using-docker-on-truenas.html  . The major job will be to install a virtual machine on the FreeNAS platform. Select Virtual Machines in the FreeNAS menu. In the list you will see the existing docker instance running. Know click on the ADD button and we will create a second one for this tutorial. Step 1 Because we are using Ubuntu 20.04 has guest operating system we will select linux . Know we need to name the machine, for this tutorial it will be dockerblog . It is always handy to use the description field docker on Ubuntu for blog tutorial . All what follows we will keep has is....

Using docker containers on XCP-ng with Xen Orchestra CE step by step

1. Create a VM In my tutorial I am cloning one existing VM. To install docker and to prepare the xcp-ng host watch the following video .  Or you could also continue to read it is up to you. 2. Inside the VM you have to install docker, openssh-server and ncat? For ubuntu: $ sudo apt install docker.io $ sudo apt install openssh-server $ sudo apt install ncat To use docker has non-root add the user to the docker group inside your VM like this. $ sudo usermod -aG docker $(whoami) Do not forget to logout and login are it may not work with your account To check if docker is running  type the following $ systemctl status docker 3. Then in your XCP-ng host you have to install xscontainer Like this:  $ yum install xscontainer  Followed by executing  $ xe-toolstack-restart to restart the toolstack and use the following command  $ xscontainer-prepare-vm -v vmuuid -u christophe 4. Test your VM with container tab $ sudo docker run hello-world 5. To install portainer exe...