Sorry it took so long to get back to you.
Here's what I do:
On VM2:
ip route add default via <VM1_IP>
iptables -I FORWARD -i vif+ -o vif+ -j ACCEPT - Note that this allows
*all* traffic to pass between qubes connected to VM2 - adjust as you
wish.
iptables -t raw -I PREROUTING -i <vif interface to which VM1 is connected> -j ACCEPT
iptables -t nat -I PR-QBS -p udp --dport 53 -j DNAT --to 9.9.9.9
That's it.
You'll find that qubes attached to VM2 will use DNS server 9.9.9.9, and
traffic will exit via VM1
You can (and should) have a firewall running on VM1.
Obviously, you can harden this a good deal.
With this set-up you can use standard qubes networking and the rules
will be enforced on VM2.
I always prefer it when there's no need to reconfigure qubes or
the Qubes networking infrastructure, so you can switch a qube between
this and standard arrangement or vpn as you wish.
unman