<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Why is Databricks Using Private IP Instead of NAT Gateway's Public IP to Connect with Source System in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/why-is-databricks-using-private-ip-instead-of-nat-gateway-s/m-p/115485#M3254</link>
    <description>&lt;P&gt;I have a publicly accessible SQL database that is protected by a firewall. I am trying to connect this SQL database to Databricks, but I'm encountering an authentication error. I have double-checked the credentials, port, and host, and they are all correct.&lt;/P&gt;&lt;P&gt;To allow the connection, I whitelisted the public IP of the NAT gateway attached to the Databricks subnet in the SQL database firewall. However, when I checked the SQL database logs, I noticed that the incoming requests are not coming from the NAT gateway's public IP. Instead, the requests are originating from the private IP of the Databricks all-purpose cluster.&lt;/P&gt;&lt;P&gt;Why is this happening, and how can I resolve it?&lt;/P&gt;</description>
    <pubDate>Tue, 15 Apr 2025 09:14:44 GMT</pubDate>
    <dc:creator>chandru44</dc:creator>
    <dc:date>2025-04-15T09:14:44Z</dc:date>
    <item>
      <title>Why is Databricks Using Private IP Instead of NAT Gateway's Public IP to Connect with Source System</title>
      <link>https://community.databricks.com/t5/administration-architecture/why-is-databricks-using-private-ip-instead-of-nat-gateway-s/m-p/115485#M3254</link>
      <description>&lt;P&gt;I have a publicly accessible SQL database that is protected by a firewall. I am trying to connect this SQL database to Databricks, but I'm encountering an authentication error. I have double-checked the credentials, port, and host, and they are all correct.&lt;/P&gt;&lt;P&gt;To allow the connection, I whitelisted the public IP of the NAT gateway attached to the Databricks subnet in the SQL database firewall. However, when I checked the SQL database logs, I noticed that the incoming requests are not coming from the NAT gateway's public IP. Instead, the requests are originating from the private IP of the Databricks all-purpose cluster.&lt;/P&gt;&lt;P&gt;Why is this happening, and how can I resolve it?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Apr 2025 09:14:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/why-is-databricks-using-private-ip-instead-of-nat-gateway-s/m-p/115485#M3254</guid>
      <dc:creator>chandru44</dc:creator>
      <dc:date>2025-04-15T09:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Databricks Using Private IP Instead of NAT Gateway's Public IP to Connect with Source Sys</title>
      <link>https://community.databricks.com/t5/administration-architecture/why-is-databricks-using-private-ip-instead-of-nat-gateway-s/m-p/115500#M3255</link>
      <description>&lt;P&gt;&lt;SPAN&gt;The issue occurs because the Databricks cluster's outbound traffic isn't routed through the NAT Gateway due to misconfigured network settings or conflicting outbound connectivity configurations. This should be mostly resolved by your Network team but you can follow these steps as well as&lt;/SPAN&gt;&lt;/P&gt;&lt;H2&gt;1.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Verify NAT Gateway Configuration&lt;/STRONG&gt;&lt;/H2&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;P class=""&gt;Ensure the NAT Gateway is&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;directly attached to the Databricks cluster's subnet&lt;/STRONG&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;Confirm the NAT Gateway has a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;public IP or prefix assigned&lt;/STRONG&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;Check&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;User-Defined Routes (UDRs)&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in the subnet's route table to ensure all outbound traffic (0.0.0.0/0) is directed to the NAT Gateway&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H2&gt;2.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Check for Conflicting Outbound Configurations&lt;/STRONG&gt;&lt;/H2&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;P class=""&gt;&lt;STRONG&gt;Instance-level public IPs&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;on Databricks VMs or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Azure Load Balancer outbound rules&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;can override the NAT Gateway&lt;SPAN class=""&gt;&lt;A class="" href="https://learn.microsoft.com/en-us/azure/nat-gateway/faq" target="_blank" rel="nofollow noopener"&gt;1&lt;/A&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Remove these if present.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;If&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Azure Firewall&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is deployed, ensure it isn’t handling outbound traffic for the subnet&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H2&gt;3.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Validate Traffic Flow&lt;/STRONG&gt;&lt;/H2&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;P class=""&gt;Use a test notebook to check the outbound IP:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;python&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;%&lt;/SPAN&gt;sh curl ifconfig&lt;SPAN class=""&gt;.&lt;/SPAN&gt;me &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P class=""&gt;The result should match the NAT Gateway’s public IP&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;If the IP is incorrect, restart the cluster to force new connections through the NAT Gateway&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H2&gt;4.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Whitelist All NAT Gateway IPs&lt;/STRONG&gt;&lt;/H2&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;P class=""&gt;If the NAT Gateway uses&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;multiple public IPs&lt;/STRONG&gt;, all must be whitelisted in the SQL database firewall&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H2&gt;5.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Ensure Subnet Association&lt;/STRONG&gt;&lt;/H2&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;P class=""&gt;Confirm the Databricks cluster’s VNet-injected subnet is the same subnet where the NAT Gateway is attached&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H2&gt;6.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Check Secure Cluster Connectivity (SCC)&lt;/STRONG&gt;&lt;/H2&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;P class=""&gt;SCC being&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;disabled&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;allows the use of NAT Gateway without restrictions&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;If SCC is enabled, it may bypass the NAT Gateway.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H2&gt;Example Route Table Configuration&lt;/H2&gt;&lt;DIV class=""&gt;Address Prefix Next Hop Type Next Hop IP Address &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;0.0.0.0/0&lt;/TD&gt;&lt;TD&gt;NAT Gateway&lt;/TD&gt;&lt;TD&gt;(NAT Gateway IP)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P class=""&gt;By addressing these points, your Databricks cluster’s outbound traffic will use the NAT Gateway’s public IP, allowing the SQL database firewall to recognize the whitelisted IP.&lt;/P&gt;&lt;P class=""&gt;Aviral &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Apr 2025 10:50:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/why-is-databricks-using-private-ip-instead-of-nat-gateway-s/m-p/115500#M3255</guid>
      <dc:creator>Aviral-Bhardwaj</dc:creator>
      <dc:date>2025-04-15T10:50:45Z</dc:date>
    </item>
  </channel>
</rss>

