Hi all,
We're testing the private network gateway (Beta) on Azure Databricks so that serverless compute egresses through a subnet in our VNet and reaches on-prem resources (through a hub firewall + ExpressRoute/VPN) from a predictable IP range.
Setup
- Azure Databricks (Premium, VNet-injected, no public IP), westus. Hub-and-spoke network.
- Private network gateway in ALL_TRAFFIC mode, created via the account REST API. State ESTABLISHED, no destinations.
- Gateway subnet: 10.230.52.192/27, in the workspace's spoke VNet, delegated as the docs require.
- private_dns_resolvers: 168.63.129.16 (Azure-provided DNS).
- Routing: the gateway subnet's route table sends 0.0.0.0/0 to an Azure Firewall in the hub. The hub is peered to a VNet that simulates our on-prem network (172.20.27.0/24). In production that hop is ExpressRoute.
- On-prem services (simulated):
- 172.20.27.13:1433: a TCP service that echoes back the client IP it sees, standing in for SQL Server.
- 172.20.27.14:8080: a small HTTP service that does the same.
- On-prem DNS: a DNS server in the simulated on-prem network, authoritative for corp.example.local.
- DNS from Azure: an Azure DNS Private Resolver with a forwarding ruleset (corp.example.local → on-prem DNS, through the outbound endpoint). The ruleset is linked to the workspace VNet, so 168.63.129.16 queried from the gateway subnet resolves both public names and corp.example.local. We don't point the gateway at the resolver's inbound endpoint.
- The NCC also has private endpoint rules (Unity Catalog storage), which keep working as expected.
What works
- Connecting by hostname (sqlserver.corp.example.local:1433) works. The on-prem server sees the client as an IP from the gateway subnet (10.230.52.196), as expected.
- Connecting to a public name that resolves to the on-prem IP (172.20.27.13.nip.io) also works.
What doesn't work
- Connecting to the raw IP (172.20.27.13:1433) from a serverless notebook times out, and the firewall logs show nothing.
socket.create_connection(("sqlserver.corp.example.local", 1433), timeout=5) # OK
socket.create_connection(("172.20.27.13", 1433), timeout=5) # TimeoutError
What we found while debugging
1. The serverless container has nameserver 192.168.200.6, an IPv4 default route via 169.254.1.1 and an IPv6 default route via fe80::1.
2. Every name, private or public, resolves only to AAAA records in what looks like a NAT64 prefix (RFC 8215, 64:ff9b:1::/48), with the IPv4 in the last 32 bits: sqlserver.corp.example.local -> 64:ff9b:1::100:ac14:1b0d (172.20.27.13) ifconfig.me -> 64:ff9b:1::100:22a0:6f91 (34.160.111.145)
This also explains why socket.gethostbyname() (A records only) fails with EAI_AGAIN while create_connection() works.
3. Building the NAT64 address by hand works, even for an IP whose name was never resolved: 64:ff9b:1::100:ac14:1b0e reaches 172.20.27.14:8080, and the server sees a gateway-subnet source IP. So the translation looks stateless.
4. A raw public IPv4 also bypasses the gateway. http://34.160.111.145/ip reports the Databricks default serverless egress IP. The same host through its NAT64 address reports our firewall's public IP.
5. We can't add routes from the notebook (RTNETLINK answers: Operation not permitted), which is expected.
Our reading is that the gateway path depends on DNS: the Databricks resolver returns NAT64 addresses, and only traffic to that prefix goes through the gateway. An IPv4 literal skips DNS and falls through to the default serverless egress, the last row of the routing-priority table in the docs.
Questions
1. Is this the intended behavior? Are raw IPv4 destinations out of scope for the private network gateway, even in ALL_TRAFFIC? The docs say ALL_TRAFFIC "routes all outbound traffic from serverless compute through the gateway", and we didn't find any mention of IP literals.
2. Is there a plan to support IP / CIDR destinations? Today destination_type only accepts DNS_NAME.
3. Is the recommended approach to always connect by FQDN, with a DNS record for every on-prem target that the gateway's resolvers can resolve? Any guidance for legacy code or JDBC URLs with hardcoded IPs?
4. Is the NAT64 prefix stable or documented anywhere, or should we treat it as an internal detail and avoid relying on it?
5. In ALL_TRAFFIC, is it expected that a public IP literal egresses through the default Databricks egress instead of the customer firewall? From an egress-control point of view, that means ALL_TRAFFIC doesn't capture all traffic.
Related: the private network gateway docs, and this thread, where it's mentioned that interception "depends on hostname matching" for NCC private endpoints.
Thanks!