Manual DNS for sys-firewall2

hi I want to use different DNS configurations so one network supporting qubes should especially use another DNS Server.

Is it possible to configure the DNS e.g. for 192.168.1.XXX

thanks for your reply but my problem is still not solved because the user runs unbound on the same os this because of 127.0.0.1 right?

and I want to use my pihole in my network but outside my qubes machine

I’ll try

Add the following to /rw/config/qubes-ip-change-hook in your sys-firewall2:

#!/bin/sh
# This will Flush PR-QBS chain
iptables -t nat -F PR-QBS

# Redirects all the DNS traffic to 192.168.1.XXX:53
iptables -t nat -I PR-QBS -i vif+ -p tcp --dport 53 -j DNAT --to-destination 192.168.1.XXX
iptables -t nat -I PR-QBS -i vif+ -p udp --dport 53 -j DNAT --to-destination 192.168.1.XXX

Usually editing /etc/resolv.conf in the template of your sys-net should do that.
Or use network-manager or systemd-resolved if they are managing that file. Just check what your template distro uses.
It’s not Qubes specific.

do I have to activate qubes-firewall service

qubes-firewall service is enabled for all NetVMs (the ones that have “Provides network” option enabled) by default.