PostgreSQL: Allow connection by host name and not IP?
Quote from the manual 


  address 
  
  Specifies the client machine address(es) that this record matches. This field can contain either a host name, an IP address range, or ...


(emphasis mine)

So putting a hostname into pg_hba.conf is supported. 

During the initial connection request, Postgres only sees the IP address (as part of the TCP protocol) and needs to do a lookup to resolve the IP address to a hostname. This only works if the client and the Postgres server are in the same network and are using the same DNS server(s).

My assumption is, that your VPN solution is preventing that hostname lookup to work properly. 

If you always get your IP addresses from the same range, you could configure that range in pg_hba.conf rather than a single address (or hostname)