Jump to content

FreeNAS 11.3 + Pi Hole - installation

I wanted to install Pi-Hole for awhile, but I could not find an upto date guide.

 

The guides that do exist refer to previous versions of FreeNAS and previous versions of Unbuntu, and I found that it took a lot of looking in different places to find what I was looking for to complete an install, so had to wait until I had an afternoon to spend on it

 

I thought I would throw this together as a single place to find everything to actually get this up and running on FreeNAS 11.3.  This guide is for people with 11.3, running through the web interface.

 

I used as a baseline this video: (hope this ok): https://www.youtube.com/watch?v=z2q0FYqWaVo&t

 

 

I did this because, it is easier to watch what to do and then refer to the parts that are different set out below.

 

When creating a VM in FreeNAS 11.3 it is slightly different.  You will note that when you go through the process that it will do a lot of the things shown in the video as a step by step process now (a little easier really - for instance it creates a CDROM for you so you don't need to do any of that).

 

First thing to do is make sure that your CPU can run virtualisation, old CPUs cannot, secondly that you have virtualisation turned on in the bios - I did not you can find videos on how to turn on Virtualisation quite easily and it is of course different for different bios.

 

Then watch the video linked and get the media that you will need, Ubuntu ISO - i used the server version used in the video (but the latest version).

 

Once that is done, in FreeNAS, go to Virtual Machines, click ADD and then follow the steps:

 

1. Operating System, Linux (if you want an easier life and are following the video)

2. Name: PiHole (or whatever you want)

3. Description. Adblocker (or whatever you want)

UEFI is fine.

Start on boot and enable VNC should be ticket already, leave them there.

 

Next

 

1. Virtual CPUs, I left mine as 1 it seems fine.

2. Memory Size: I did 1024 MiB - I have 16gb in the machine so thought this would be fine.

 

Next

 

Create a New Disk Image should be ticket

ZVOL location - I used the top level storage pool

SIZE: 10 GiB - is what I used.

 

Next

 

Network Interface: I didn't touch any of this

 

Next

 

Installation Media - go to the ISO that you downloaded.

You do not need to upload an image file

 

Next

 

Confirm options and submit to create the VM.

 

Click on the Virtual Machines on the left panel (if not taken back automatically)

 

And you should see your VM there, it will have a button STATE mine was off by default.  Turn it on.

 

Click on the little arrow on the far right where your VM is listed to open up more information

Along the bottom will be a bunch of options, one of which will be <--> VNC

Click on that.

 

That should open up a new window that will be your VM.

You should get the option to Install - so go ahead and install Ubuntu Server (if you are following the video)

 

Once the installation and the updates are complete - you need to reboot

However, that doesn't work properly - you get a message about unmounting the CDROM, so close this tab.

 

Go back to FreeNAS and in the place where <--> VNC was located click on RESTART

 

Once restarted click on VNC - BE QUICK as it will go back into the installation process if you do not pick an option.

 

For me it was a bit of a pain.  I had to pick Boot Manager, go into a UEFI screen, go to Boot Manager and select Unbuntu.


Once that was done, Unbuntu Loaded.  At this point I would recommend following the video to do the updates.

 

Once you log in with your username and password (which you created when you installed).

 

The video then explains that you need a static IP address for Pi-Hole, and says type in: ifconfig to get your network details - however, after a little looking, I believe the right command is: ip address (if any linux/unbuntu gurus out there know a better command please post it up)

 

It appears that ifconfig is a bit outdated, you can make it work by installing the net-tools, but the above will be fine.

 

What I did next was write down the information it displayed:

IP: 123.123.1.123
Subnet: 255.255.255.0
Broadcast: 123.123.1.255
Network Adpt: enp0

 

I have obviously changed my ip address, yours will be whatever showed up earlier.

 

The next issue with the video is that: sudo nano /etc/network/interfaces no longer works.

 

I found that the command: ls /etc/netplan (that is lowercase L)

Which will list the configuration file that you will need to amend which is in the Netplan directory.

 

Then you can: sudo nano /etc/netplan/FILENAME.yaml

 

Once you are in to that file use the up/down arrow keys to move around.

 

Mine looked like this:

 

Network:

  Ethernets:

    enp0:

       DHCP: true

   version 2

 

I changed DHCP: false

and added several lines

So it looked like the below - now the spacing is important here, as I understand it, and I am not sure that this post will show the spacing you actually need, so I will add an image as well showing the spacing.

 

Tab does not work, it has to be space bar.  You get an error if you use tab. 

 

The square brackets [ are required, they are not there for any illustrative purposes.

 

1444560918_StaticConfig.PNG.41bd00b58c92ad43b9be09d3be0e333f.PNG

 

Network:

  Ethernets:

    enp0:

       DHCP: false

       addresses: [123.123.1.123/24] - (this will be your network IP and the static IP address that you want for Pi-Hole will be the final 3 digits within your network - you need to choose one that is not in use)

       gateway4: 123.123.1.1

       nameservers:

           addresses: [8.8.8.8,8.8.4.4] - (these are the google DNS servers)

  version 2

 

Then CTRL + X to exit, it will ask you if you wish to save type Y and then it will tell you the file already exists, press enter to overwrite that file.

 

Now that you have a static IP address, you can return to the video for instructions on how to install Pi-Hole.  The rest seems to work fine and Pi-Hole installed and I was able to access pi-hole following the video.

 

There you go, I hope that makes life easier for someone, cause I have spent most of my morning getting this thing to work.

 

However, Pi-Hole is now up and running on my system on my FreeNAS server which is on 24/7 anyway.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×