#Connect to Flexible PostgreSQL in other subnet via network gateway

1 messages · Page 1 of 1 (latest)

blissful hamlet
#

Currently I have a data subnet with a network security group. Inside data there is a flexible posgresql server & database. When connecting to the network gateway I can connect to postgres using the IP but I can't use the address specified by the private DNS zone, although it is linked to the vnet.

I am sure I am overlooking something! Any help would be highly appreciated since it's taking me already way to long!

thank you in advance 🫡

blissful hamlet
slender ivy
#

I don't get it, what do you mean with a network gateway, a virtual network gateway. Azure Private DNS and Azure VPN Gateway require additional services to work together. Azure's solution is called Azure Private DNS Resolver - a managed DNS server cluster. You can add the cluster member IP addresses to the virtual network's DNS server settings. VPN Gateway will (in case of OpenVPN) push those DNS servers to VPN clients

blissful hamlet
#

I am using the following services

  • Network Security Group
  • Public IP Address
  • Azure Database for PostgreSQL flexible server
  • Azure Database for PostgreSQL flexible server
  • Private DNS zone
  • Virtual Network
  • Virtual network gateway

I have two subnets in the vnet

  • data has a flexibleServers delegation
  • GatewaySubnet

The PostgreSQL servers have records set for them in the Private DNS zone

What works:
Connect to vnet via Virtual network gateway and access the PostgreSQL serves via ip.

What doesn't work:
Connect to vnet via Virtual network gateway and access the PostgreSQL servers via url given in the connection details on the connect settings tab (in the PostgreSQL server settings)

What could solve this
adding a DNS Private Resolver? I am quite new to azure so I am not entirely sure here.

blissful hamlet
slender ivy
slender ivy
#

You can also try to integrate the vnet of the vpn gateway with the vnet of the postgres private dns zone using a peering