<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Reverse Engineered]]></title><description><![CDATA[Building things, breaking stuff, and everything in between.]]></description><link>https://blog.dereenigne.com/</link><generator>Ghost 0.9</generator><lastBuildDate>Thu, 07 May 2026 11:03:25 GMT</lastBuildDate><atom:link href="https://blog.dereenigne.com/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Microsoft SQL Server dynamic ports, Windows Firewall, and you]]></title><description><![CDATA[<p>A frequently recurring question that I've come across in my years working with Microsoft's SQL Server is regarding how to allow a remote SQL Server Management Studio (SSMS) to connect to a local instance of SQL Server running <strong>dynamic ports</strong>, through Windows Firewall.  This is something that all good sysadmins</p>]]></description><link>https://blog.dereenigne.com/microsoft-sql-server-dynamic-ports-windows-firewall-and-you/</link><guid isPermaLink="false">fbbbd450-8283-4fc9-9c7a-2e30eb39267f</guid><category><![CDATA[microsoft sql server]]></category><category><![CDATA[windows firewall]]></category><dc:creator><![CDATA[James]]></dc:creator><pubDate>Thu, 04 Feb 2016 11:04:00 GMT</pubDate><content:encoded><![CDATA[<p>A frequently recurring question that I've come across in my years working with Microsoft's SQL Server is regarding how to allow a remote SQL Server Management Studio (SSMS) to connect to a local instance of SQL Server running <strong>dynamic ports</strong>, through Windows Firewall.  This is something that all good sysadmins should know, but many developers, testers, and tech support staff do not<!--preview-->.</p>

<h4 id="theproblem">The Problem</h4>

<p>This doesn't sound like it should be a problem initially, but colleagues and clients of mine (and according to Google &amp; Stack Exchange, <em>many</em> other people online) seem to stumble with this relatively often.  A co-worker of mine faced this issue yesterday, so I decided to write it up.</p>

<p>The usual scenario goes something like this:</p>

<ol>
<li>Set up a database server on their new workstation for testing purposes  </li>
<li>Enable named pipes &amp; TCP/IP access in SQL Server Configuration Manager  </li>
<li>Add the required firewall rules for <strong>sqlservr.exe</strong> to accept inbound connections  </li>
<li>Try and fail to connect from another workstation  </li>
<li>Re-read MSDN's explanation of how to add SQL Server firewall rules, deleting and re-adding the new rule  </li>
<li>Try and fail to connect again</li>
</ol>

<p>Users generally become even more frustrated when they find that they can connect if they just disable the firewall entirely.  So why doesn't the firewall rule seem to work?</p>

<h4 id="theexplanation">The Explanation</h4>

<p>This is actually very clear once you understand how SQL Server Database Engine and Browser connections work, and how SSMS connects by default.</p>

<p>Here's a few pieces of key information:</p>

<ul>
<li>The default behaviour for new connections in SSMS is to connect the default SQL Server port of <strong>1433</strong></li>
<li>When using <strong>dynamic ports</strong>, port <strong>1433</strong> is usually not the correct port you want to connect to</li>
<li>When connecting, SSMS sends a UDP message to the server on port <strong>1434</strong>, which is the port which SQL Server Browser listens on</li>
<li>SQL Server Browser tells SSMS which port to find a named instance on</li>
<li>Each instance of SQL Server Database Engine uses <strong>sqlservr.exe</strong></li>
<li>SQL Server Browser uses <strong>sqlbrowser.exe</strong> (found in SQL Server's Shared folder, not the instance folder)</li>
</ul>

<p>What this means is that when you input a server to connect to in SSMS, like <code>[DEV-JM\SQL2016]</code>, Management Studio needs a response from SQL Server Browser.. but the UDP packet to port <strong>1434</strong> goes unanswered, because while SQL Server Browser is running, your firewall rule is only set up for <strong>sqlservr.exe</strong> and not <strong>sqlbrowser.exe</strong>.</p>

<h4 id="thesolution">The Solution</h4>

<p>There are three ways around this:</p>

<ul>
<li>Add a rule to allow inbound connections to <strong>sqlbrowser.exe</strong> or <strong>UDP</strong> port <strong>1434</strong> <font color="#27ae60"><strong>&lt;-- Correct solution</strong></font></li>
<li>Find the exact port your instance is running on and connect to your server including the port number, eg. <code>[DEV-JM,4321]</code></li>
<li>Disable Windows Firewall entirely. <font color="#f44336">&lt;-- This is a terrible workaround!  Only do this if you must.</font></li>
</ul>

<p>Going forward I will just link to this post when I see someone having this problem.. and if you somehow landed here by searching for an answer, then welcome!  And I hope I've provided a resolution for you.</p>]]></content:encoded></item><item><title><![CDATA[What's all this then?]]></title><description><![CDATA[<p>Welcome!  I figure a short introduction is in order in case you have no idea who I am or what I do, and also so I can briefly explain why I've started a blog again and what kinds of things you can expect to find here<!--preview-->.</p>

<h4 id="whoiam">Who I am</h4>

<p>Hi,</p>]]></description><link>https://blog.dereenigne.com/whats-all-this-then/</link><guid isPermaLink="false">b3119c4c-c435-46b0-a057-c72bb4f40e6a</guid><dc:creator><![CDATA[James]]></dc:creator><pubDate>Sun, 31 Jan 2016 21:07:00 GMT</pubDate><content:encoded><![CDATA[<p>Welcome!  I figure a short introduction is in order in case you have no idea who I am or what I do, and also so I can briefly explain why I've started a blog again and what kinds of things you can expect to find here<!--preview-->.</p>

<h4 id="whoiam">Who I am</h4>

<p>Hi, I'm James.  I'm a 29 year old software developer and human being from Australia.  I've been dabbling in code since I was around 10 years old and been working full-time as a software developer for the past 9 years.</p>

<h4 id="whativedone">What I've done</h4>

<p>My first foray into the world of programming was back in about 1996 when I discovered scripting for the hugely popular IRC client, <a href="http://www.mirc.com/">mIRC</a>.  From the moment I saw the power of scripting, I was hooked.  By 1998 I had a copy of Borland's Delphi 3 and was working on my own (really shitty) IRC client.  Prior to this I had learned about game hacking by modifying their running process memory in real time, and it wasn't long before I put the two together.  I went on to create many <a href="https://en.wikipedia.org/wiki/Trainer_(games)">trainers</a>, hacks and other nefarious utilities targeting numerous games and software, utilising and learning along the way:</p>

<ul>
<li>Win32 memory and kernel hacking techniques</li>
<li>Cryptographic analysis &amp; how to bypass application security.</li>
<li>Object-oriented Pascal (Delphi)</li>
<li>C &amp; C++</li>
<li>Assembly</li>
<li>PHP</li>
<li>MySQL</li>
</ul>

<p>I know it sounds like I was up to no good, but being quite young at the time I thought it was cool and rebellious.  I learned a ton along the way, and have those countless misspent after-school hours to thank for the career I have today.</p>

<h4 id="whatidonow">What I do now</h4>

<p>Fast forward many years to 2016 and I've now been working in a commercial software house for 9 years and have worked on projects using:</p>

<ul>
<li>C# / .NET framework - desktop apps, web applications, web APIs &amp; services</li>
<li>Pascal / Delphi</li>
<li>SQL – covering Microsoft SQL Server, MySQL, PostgreSQL &amp; SQLite</li>
<li>JavaScript &amp; jQuery</li>
<li>Java &amp; Android</li>
<li>Python (minimal use)</li>
</ul>

<h4 id="whatillbepostinghere">What I'll be posting here</h4>

<p>I intend to use this blog as a place to document anything I find interesting as I'm building, breaking, or researching things.  My primary focus at the moment is working on Android applications so it's likely that Android will be the subject of many of the posts I write here.</p>

<p>From time to time there may also be excessively-nostalgic posts sharing memories of programming experiences from my past which I found funny or interesting.  I make no apologies for this.  You have been warned.</p>]]></content:encoded></item><item><title><![CDATA[Hello, World!]]></title><description><![CDATA[<p>If you are reading this, <del>it's already too late</del> it means this new blog has sprung into existence, only to have its first post be a total cliché.</p>]]></description><link>https://blog.dereenigne.com/hello-world/</link><guid isPermaLink="false">60fedbe4-44ba-4d3d-a235-6ca6456e5b1b</guid><dc:creator><![CDATA[James]]></dc:creator><pubDate>Wed, 13 Jan 2016 06:12:00 GMT</pubDate><content:encoded><![CDATA[<p>If you are reading this, <del>it's already too late</del> it means this new blog has sprung into existence, only to have its first post be a total cliché.</p>]]></content:encoded></item></channel></rss>