Pihole VM
Description:
So the other day my Pihole3 started making a very high pitch squeeking sound and I had to power it off. I’ve had if for a few years or so but wanted to see if I can move Pihole to a VM instead since my gaming computer is on all the time anyways. Here is what I did to move it over:
To Resolve:
-
First, in HyperV I copied my template Rocky8 VM and spun it up. It comes with a default name and IP so I changed those and rebooted.
-
Next, I added firewall rules:
1 2 3 4 5
firewall-cmd --permanent --add-service=http --add-service=dns firewall-cmd --permanent --new-zone=ftl firewall-cmd --permanent --zone=ftl --add-interface=lo firewall-cmd --permanent --zone=ftl --add-port=4711/tcp firewall-cmd --reload
-
Download and install:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
mkdir pihole cd /home/gerry/pihole wget -O basic-install.sh https://install.pi-hole.net sudo install wget -y sudo chmod +x ./basic-install.sh sudo bash basic-install.sh SELinux Enforcing detected, exiting installer sudo setenforce 0 sudo getenforce # Says permissive but default is still enforcing sudo vi /etc/selinux/config, set to permissive run installer... fails: Unsupported OS detected: Rocky 8.7 If you are seeing this message and you do have a supported OS, please contact support. run again: sudo PIHOLE_SKIP_OS_CHECK=true bash basic-install.sh
-
Change UI password
pihole -a -p
-
Restore backup from old pihole
-
Fix IP address where it has two IPs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
[gerry@pihole ~]$ ip add show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:15:5d:0d:c9:0f brd ff:ff:ff:ff:ff:ff inet 192.168.10.80/24 brd 192.168.10.255 scope global noprefixroute eth0 valid_lft forever preferred_lft forever inet 192.168.10.253/24 brd 192.168.10.255 scope global secondary noprefixroute eth0 valid_lft forever preferred_lft forever inet6 fe80::215:5dff:fe0d:c90f/64 scope link noprefixroute valid_lft forever preferred_lft forever sudo ip addr del 192.168.10.80/24 dev eth0 [gerry@pihole ~]$ sudo ip addr show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:15:5d:0d:c9:0f brd ff:ff:ff:ff:ff:ff inet 192.168.10.253/24 brd 192.168.10.255 scope global noprefixroute eth0 valid_lft forever preferred_lft forever inet6 fe80::215:5dff:fe0d:c90f/64 scope link noprefixroute valid_lft forever preferred_lft forever
-
One more update:
sudo PIHOLE_SKIP_OS_CHECK=true pihole -up
Comments