Pi-hole configuration qubes os 4.1

and also in, ### create new standalone qube

when I do
qvm-create --template $TemplateVM --class StandaloneVM --label red $PiholeVM

i have this message

[lovely@dom0 ~]$ qvm-create --template $TemplateVM --class StandaloneVM --label red $PiholeVM
usage: qvm-create [--verbose] [--quiet] [--help] [--class CLS] [--standalone] [--disp]
                  [--property NAME=VALUE] [--pool VOLUME_NAME=POOL_NAME] [-P POOL_NAME]
                  [--template VALUE] [--label VALUE] [--help-classes]
                  [--root-copy-from FILENAME | --root-move-from FILENAME]
                  [VMNAME]
qvm-create: error: argument --template/-t: expected one argument
[lovely@dom0 ~]$ 

and what happens, if you use:

qvm-create --template debian-11-minimal --class StandaloneVM --label red sys-pidns2

PS.: You also can use sys-pihole instead of using sys-pidns2 if you are more comfortable with it.

thank you for your help, I will continue the installation, just to confirm something, I installed debian-template-minimal, following https://www.qubes-os.org/doc/templates/minimal/ but I must install what extension needed for the pi-hole machine, among `

pciutils 
vim-minimal 
less psmisc 
gnome-keyring
Audio: pulseaudio-qubes
qubes-core-agent-networking
qubes-core-agent-networking
qubes-agent-dom0-updates
qubes-core-agent-networking
qubes-core-agent-network-manager
tcpdump telnet
nmap ncat.
qubes-usb-proxy
qubes-input-proxy-sender
default-mgmt-dvm: requires 
qubes-core-agent-passwordless-root
qubes-mgmt-salt-vm-connector
qubes-core-agent
qubes-core-agent-nautilus
qubes-core-agent-thunar
qubes-core-agent-dom0-updates
qubes-menus
qubes-desktop-linux-common
qubes-gpg-split
qubes-u2f
qubes-pdf-converter
qubes-img-converter
qubes-thunderbird
qubes-app-shutdown-idle: 
qubes-mgmt-salt-vm-connector
`

i’m blocked on

qvm-run --user root --pass-io --no-gui $PiholeVM 'systemctl stop resolvconf && systemctl disable resolvconf'

[lovely@dom0 ~]$ qvm-run --user root --pass-io --no-gui PiholeVM 'systemctl stop resolvconf && systemctl disable resolvconf'
Failed to stop resolvconf.service: Unit resolvconf.service not loaded.

looks like your resolvconf isn’t/wasn’t running and so you get that error message.
You should move on with:

qvm-run --user root --pass-io --no-gui PiholeVM 'systemctl disable resolvconf'

Any message again?

Thank you, I will continue with the installation.

I have the same problem the same message

dex@dom0 ~]$ qvm-run --user root --pass-io --no-gui PiholeVM 'systemctl disable resolvconf'
Failed to disable unit: Unit file resolvconf.service does not exist.

thats okay, so the service is disabled already. You can move on with the other steps

ok thank you

[lovely@dom0 ~]$ qvm-run --auto --user root --pass-io --no-gui PiholeVM 'git clone --depth 1 https://github.com/pi-hole/pi-hole.git Pi-hole'
/bin/bash: line 1: git: command not found

i have the error

does the problem come from the debian-template-minimal? Or is it related to my wifi connection?

I installed gît, but it gives me the same error, I don’t know why

who knows why i got this error ???

hello, I took everything from zero, but this time with template-fedora-34
concerning the resolver command, I have the same error return, so as on template-debian-minimal, now by continuing I have arrived, at

# Flush the PR-QBS chain
iptables -t nat -F PR-QBS

type or[lovely@dom0 ~]$ iptables -t nat -F PR-QBS
bash: iptables: command not found

This lines have to be added in fw-update.sh under /rw/config/network-hooks.d/

you actually do this with the two commands:

qvm-run --user=root --pass-io --no-gui $PiholeVM 'mkdir -p /rw/config/network-hooks.d'
qvm-run --user=root $PiholeVM "xterm -e 'nano /rw/config/network-hooks.d/fw-update.sh'"
1 Like

I added the two commands in terminal dom0

vm-run --user=root --pass-io --no-gui $PiholeVM 'mkdir -p /rw/config/network-hooks.d'
qvm-run --user=root $PiholeVM "xterm -e 'nano /rw/config/network-hooks.d/fw-update.sh'"

while continuing to do nothing, and when I redo

iptables -t nat -F PR-QBS

it gives me the same error, or is it me who understands something?

looks like it can’t handle the $PiholeVM placeholder…
What about you’re doing it that way:

qvm-run --user=root --pass-io --no-gui sys-pihole 'mkdir -p /rw/config/network-hooks.d'
qvm-run --user=root sys-pihole "xterm -e 'nano /rw/config/network-hooks.d/fw-update.sh'"

IF your pihole qube is called ‘sys-pihole’

After the second command a terminal should be opened, where you have to insert all the following commands (until ----End------ line)

it gives me these

type or paste code[lovely@dom0 ~]$ qvm-run --user=root --pass-io --no-gui PiholeVM 'mkdir -p /rw/config/network-hooks.d'
[lovely@dom0 ~]$ qvm-run --user=root PiholeVM "xterm -e 'nano /rw/config/network-hooks.d/fw-update.sh'"
Running 'xterm -e 'nano /rw/config/network-hooks.d/fw-update.sh'' on PiholeVM
[lovely@dom0 ~]$ 


the first command should be finished successful then and now (with the second command) it should open a terminal window anywhere on your desktop…

the second command makes that there is a terminal which should appear but it disappears too quickly before even appearing

If I understand correctly, I have to access the file,
fw-update.sh
which is in my virtual pi-hole machine, and when I access I will put the iptable command in it
iptables -t nat -F PR-QBS
and I save and I quit and I continue the installation, is that right?

1 Like

here is what I did, and what it gave, in terminal dom0 I did
qvm-run --user=root PiholeVM "xterm"

and it opened the terminal

and I tried to access the file, but the file does not exist
the network-hooks.d folder is empty
if I understood correctly, I will create the fw-update.sh file, since it is not created

1 Like

I created the file
fw-update.sh
and I put inside this file
these two

# Flush the PR-QBS chain
iptables -t nat -F PR-QBS

# Add a rule that redirects all the DNS traffic to localhost:53
iptables -t nat -I PR-QBS -i vif+ -p udp --dport 53 -j DNAT --to-destination 127.0.0.1

and what should be done? will I continue the installation? thank you