{"id":11,"date":"2003-05-21T09:58:28","date_gmt":"2003-05-21T14:58:28","guid":{"rendered":"http:\/\/192.168.33.66\/wp\/?p=11"},"modified":"2009-12-30T22:11:33","modified_gmt":"2009-12-31T03:11:33","slug":"firewall-changeover","status":"publish","type":"post","link":"https:\/\/wildow.com\/?p=11","title":{"rendered":"RDP change port number"},"content":{"rendered":"<p>Here&#8217;s the brain dump on port changes:<\/p>\n<p>===================================== Serverside Port Change:<br \/>\nThis is documented in the following article &#8211;<br \/>\nHow to Change Terminal Server&#8217;s Listening Port (Q187623) <a href=\"http:\/\/support.microsoft.com\/?id=kb;en-us;Q187623\">http:\/\/support.microsoft.com?id=kb;en-us;Q187623<\/a><br \/>\nBasically, you need to change the value of the following registry entry: HKLM\\System\\CurrentControlSet\\Control\\Terminal Server\\WinStations\\RDP-Tcp<br \/>\nPlease note the following &#8211; (1) The port is normally displayed as a hex number; the default 3389 shows up as 0d3d.  Make sure you watch whether it is in hex or decimal mode when entering a new port! if you change the port to 2028 but are in hex mode, that&#8217;s actually equivalent to 8232 decimal! (2) You will need to restart the server for the changes to take effect.<\/p>\n<p><!--more--> ===================================== Clientside Port Change<br \/>\nThis has to be handled on a per-connection basis.<br \/>\nA &#8211; With the Full TS Client:<br \/>\nA.1 &#8211; Command Line<br \/>\nIf running from the commandline, just add a colon and the new decimal port number to the IP address\/servername.  For example, if the server is &#8220;Hydra&#8221; and the new port number is 4000, you would run<\/p>\n<pre>    mstsc \/v:Hydra:4000\r\n<\/pre>\n<p>A.2 &#8211; In The GUI<br \/>\nIn the GUI, do the same &#8211; add :&lt;portnumber&gt; to the server name, so instead of just typing Hydra, type Hydra:4000.<br \/>\nA.3 &#8211; In an RDP file<br \/>\nIf you save settings to an RDP file, you can keep the port number in there. There are two ways to do this.  Either<br \/>\n+ find the &#8220;full address&#8221; parameter, which should like this<\/p>\n<pre>    full address:s:Hydra<\/pre>\n<p>and change it to<\/p>\n<pre>    full address:s:Hydra:4000<\/pre>\n<p>OR + add a new line for &#8220;port&#8221; to the file, like this:<\/p>\n<pre>    port:i:4000\r\n<\/pre>\n<p>B &#8211; With the Web Client<br \/>\nThere&#8217;s only one way to do this.  You need to set a value for AdvancedSettings2.RDPPort within the web page hosting the client.  If the variable name representing the client is &#8220;MsRdpClient&#8221; this can be done like this anywhere in the page that is executed before the client&#8217;s Connect() method is called:<\/p>\n<pre>    MsRdpClient.AdvancedSettings2.RDPort = 4000<\/pre>\n<p>Note that the same technique works if you have the client embedded in an application, HTA, or running from a direct script.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s the brain dump on port changes: ===================================== Serverside Port Change: This is documented in the following article &#8211; How to Change Terminal Server&#8217;s Listening Port (Q187623) http:\/\/support.microsoft.com?id=kb;en-us;Q187623 Basically, you need to change the value of the following registry entry: &#8230; <a class=\"more-link\" href=\"https:\/\/wildow.com\/?p=11\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-11","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/wildow.com\/index.php?rest_route=\/wp\/v2\/posts\/11","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wildow.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wildow.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wildow.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wildow.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11"}],"version-history":[{"count":1,"href":"https:\/\/wildow.com\/index.php?rest_route=\/wp\/v2\/posts\/11\/revisions"}],"predecessor-version":[{"id":351,"href":"https:\/\/wildow.com\/index.php?rest_route=\/wp\/v2\/posts\/11\/revisions\/351"}],"wp:attachment":[{"href":"https:\/\/wildow.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wildow.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wildow.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}