welcome to PcMac in today's video I'm
going to convert my Raspberry Pi into a
PI whole server with the help of
chocolate this pie hole will be
connected to my network and will block
all the ads on all my devices including
mobile phones tablets laptop anything
that is connected to the network the pie
hole will help to block all the ads from
those devices before starting this video
I would like you to please go and
subscribe to my channel and if you like
my work please hit the like botton so
let's do it let's go ahead and open the
wireless network watcher to check the IP
address of our Raspberry Pi and the IP
address is right here
74 let's go ahead and close it now I'm
going to open my ssh tool i'm using a
new tool here that is solar putty that
is also free you can go ahead and
download it it will help you to connect
lots of devices here and you can just
save your information like your
credentials and it will be directly
connected to your PI for that let's just
couldn't connect to our 74 IP by
double-clicking on it and it will take
in all the information and you are
logged in now so now what we need to do
we are here on the command prompt for pi
so let's go ahead and open my notepad I
have already put all the commands here
so to download the PI whole image here
is the pull command so let's just copy
this command and paste it here I already
downloaded the latest image so it will
not take that much time and it's like
it's done the latest image is already
there now the second part the pie hole
talker
and to run the this image piehole image
will run this command docker and minus T
and the name of the container will be
pie hole and it will require these ports
that is 53 on TCP UDP and 67 80 and 443
I have put my UID and PG ID here to find
the UID and B GID you just need to type
ID here and it will show you your IDs
its thousand thousand UID and GID let's
go back and the time zone that I am
following is a Asia Calcutta no the main
part is the volume on which you need to
point your piehole and your dns mask so
I have created some folder into the MNT
location and provide the access of this
folder the piehole folder to these
locations to do that what you need to do
is you need to provide the permission
with this command chmod 775 and the
location that we want to use is MNT /pi
whole this is the folder that I have
created in MND I'll show you you just
need to do that we need to put sudo
chmod 775
and when tea I hole you can create any
folder because I have used I'm using
piehole so I'm just naming it as pie
hood and when you do that you will
provide a permission to this folder
let's just go to the MNT folder to show
you what all things I have created
so let's LS and you can see there is one
folder right here let's access the
piehole folder as well I have created
two folders here that is DNS mask and
piehole so these two folder are right
here and I have provided the location of
these folders as well then this is the
localhost address and the DNS either you
can use this DNS address or you can use
the Google default DNS address that is
eight eight eight eight eight and that's
it from here let's just copy this
command and paste it here let's go back
to the main prompt
and it's done the images started so
let's just check docker PS - a and you
can see the images running and it's
healthy starting its let me starting so
to access the image what we need to do
we need to type the IP address forward
slash admin so let's do that our
raspberry pi is on 192.168.1.254 word
slash admin hit enter and we are right
here to our admin console so you can see
that now the next commands are right
here if you want to get a random
password for your piehole you just need
to copy this command and paste it in the
command prompt right here and the
password that it's created assigning
random password the password will be
like this so now if i refresh the page
it will ask for the password
I have already reset it in my password
so that's why I am already logged into
my console so let's create a new
password by using this command that is
this one let's just copy this command
and paste it here now you can enter a
new password if you want no password I
have selected no password earlier that's
why I didn't need to put a password
let's put a password here and confirm
the password now the new password is set
let's just refresh the page again now
you can see the login prompt here let's
click on login and just login and as you
can see I am logged in now
username admin let's just update the
password and I am logged in now now as
you can see the two two queries and
query blocked are 0 0 because we didn't
configured it on our router so in the
next step what I need to do I need to
configure my piehole on my route
and I will put all these commands in the
description box you can go ahead and
copy these commands and configure it on
your talker if you face any problem you
have the comment section write your
Curie's in the comment section I'll try
to answer them let's just log in to my
router so now what we need to do we need
to redirect our DNS server to the pie
hole so it can detect everything let's
just go to the network and then LAN
settings and after that manual DNS and
the manual DNS here is 75 and you can
put a secondary DNS 8 8 8 or 1 1 1 as
you want because if our piehole is off
then the DNS will not able to locate
anything any server on a network and you
might get no internet or a slow-speed so
second it you need to put secondary DNS
as well
so if the primary DNS fails your
internet will take the second ray DNS
let's apply the settings and click OK
now once I click OK it will apply the
changes let's go here and open a website
any website let's try a big new a
dot-com and once we go on to eBay the
router just restarted as you can see on
the bottom it's spinning so it might
take a moment to restart so it's
connected let's access the eBay and once
I access it our PI whole server will
start blocking the queries let's just
refresh it as well
so it can contact the Raspberry Pi
because the router restarted and it
disconnected from the router so it will
be connected in a moment let's check our
SSH as well it's working or not we need
to check the IP address might be the IP
address got change so it's changed to 73
we need to set a static IP address so it
will not change every time this is a
practical so I'm using a DHCP so let's
just go back and change from here
73 Save
now we are connected what we need to
make changes on a router as well
it's better if you use a static IP
address if you are planning to use it on
a regular basis just use a static IP
address on the Raspberry Pi that will be
really good let's try to log in on our
piehole so we are successfully connected
to 73 and at sequency five queries
blocked let's just refresh the page and
once we refresh the page you can see the
server is started and let's log in as
well so it start blocking all the ads
you can see here you will not see the
ads which are floating here on the right
side of the screen the site is clean now
let's just check any other website let's
select file hippo so you can see there
is no advertisements here on the right
side of the screen all the
advertisements are blocked so I will
post a document as well in the
description in next week you will see
that document over there as well in
which I'll show you how you can set a
static IP on your Raspberry Pi so you
can follow those instruction and set up
a static IP address as well and that
piehole will be a you can say integral
part of your network you can connect it
always to your network either you can
use a small PI 0 device that can be like
stick on to the router and blocking all
the ads for you everywhere over the
Internet and you can use that so if you
have any questions any query you can
write me down in the comment section and
if you have any problem just let me know
I'll try to answer them and if you like
this video please rate and subscribe to
my channel hit the like button thanks
for watching bye bye take care have a
nice day
