<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jordon Replogle</title>
    <description>The latest articles on DEV Community by Jordon Replogle (@jordonr).</description>
    <link>https://dev.to/jordonr</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F102505%2F3ee217b8-66c4-41ca-b360-3b17b49fdb4b.png</url>
      <title>DEV Community: Jordon Replogle</title>
      <link>https://dev.to/jordonr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jordonr"/>
    <language>en</language>
    <item>
      <title>Reverse Proxy MS SQL with Nginx</title>
      <dc:creator>Jordon Replogle</dc:creator>
      <pubDate>Sat, 28 Mar 2020 00:27:58 +0000</pubDate>
      <link>https://dev.to/jordonr/reverse-proxy-ms-sql-with-nginx-3e90</link>
      <guid>https://dev.to/jordonr/reverse-proxy-ms-sql-with-nginx-3e90</guid>
      <description>&lt;p&gt;Hey it's my first post!  Did something nifty today to work around a technical issue I ran into while trying to do my job.&lt;/p&gt;

&lt;p&gt;With the COVID-19 thing, I am working from home.  The VPN connection we have is a point to point, so I have access to the office LAN.  But I don't have access to our data center that is connected to our office via VPN.&lt;/p&gt;

&lt;p&gt;To get around this today I had a Linux VM spun up to create a reverse proxy.  I first started with HAProxy, and it worked great... till I needed UDP for port 1434.  So I switched to Nginx, and was able to proxy both 1433/TCP and 1434/UDP to give me access to the MS SQL server.&lt;/p&gt;

&lt;p&gt;Here's the simple Nginx config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;stream {
    upstream dbtcp {
        server db1:1433;
    }

    upstream dbudp {
        server db1:1434;
    }

    server {
        listen 1433;
        proxy_pass dbtcp;
        proxy_connect_timeout 1s; # detect failure quickly
    }

    server {
        listen 1434 udp;
        proxy_pass dbudp;
        proxy_connect_timeout 1s; # detect failure quickly
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note that Nginx listens to tcp by default and you only need to denote udp.&lt;/p&gt;

</description>
      <category>mssql</category>
      <category>nginx</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
