OpenVPN + UFW + Private Internet Access

I use the VPN access provider Private Internet Access. I want to use the UFW rules discussed in this very nice How To by this forum’s very own Zane. Early in the how to, the following ufw rule is added

sudo ufw allow out to **vpn serv ip** **port number** proto tcp or udp

Unfortunately, PIA does not publish its IP ranges (and it has 100+ servers for each of its many gateways), as noted in its user forums. In addition, I’ve read that it is not possible to set a rule in ufw to allow connections based on hostname–it just resolves the hostname to a single IP and will not recognize other IPs from the same hostname.

However, I’ve also read that it is possible somehow to query IP addresses belonging to a given $ using OpenVPN. But I do not know how to do this.

Can someone advise me on how to proceed?