{"id":885,"date":"2016-08-31T10:02:26","date_gmt":"2016-08-30T23:02:26","guid":{"rendered":"https:\/\/4it.com.au\/kb\/?post_type=article&#038;p=885"},"modified":"2022-12-01T19:33:27","modified_gmt":"2022-12-01T08:33:27","slug":"add-tcp-firewall-rule-windows-using-command-prompt-using-netsh","status":"publish","type":"article","link":"https:\/\/4it.com.au\/kb\/article\/add-tcp-firewall-rule-windows-using-command-prompt-using-netsh\/","title":{"rendered":"How to Add a TCP Firewall Rule in Windows using the Command Prompt using NETSH"},"content":{"rendered":"<p>There are many different types of firewall rules which can be controlled using &#8220;NETSH ADVFIREWALL FIREWALL&#8221;. \u00a0It replaced the old &#8220;netsh firewall&#8221; which was available in Windows XP and earlier.<\/p>\n<p>To add a firewall rule in Windows using the command line to open a specific incoming port enter the following command:<\/p>\n<p><strong>netsh advfirewall firewall add rule name=&#8221;Open Port <span style=\"color: #ff0000;\">XXXX<\/span>&#8221; dir=in action=allow protocol=TCP localport=<span style=\"color: #ff0000;\">XXXX<\/span><\/strong><\/p>\n<p>where XXXX is the TCP port you wish to open<\/p>\n<p>More information on the different uses for &#8220;netsh advfirewall firewall&#8221; can be found at the following Microsoft Support Article <a href=\"https:\/\/support.microsoft.com\/en-au\/kb\/947709\" target=\"_blank\" rel=\"noopener nofollow\">here<\/a>.<\/p>\n<p><em>Note: The command prompt must be Run as Administrator<\/em><\/p>\n<div style='text-align:left' class='yasr-auto-insert-visitor'><\/div>","protected":false},"excerpt":{"rendered":"<p>There are many different types of firewall rules which can be controlled using &#8220;NETSH ADVFIREWALL FIREWALL&#8221;. \u00a0It replaced the old &#8220;netsh firewall&#8221; which was available in Windows XP and earlier. To add a firewall rule in Windows using the command line to open a specific incoming port enter the following command: netsh advfirewall firewall add [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","article-category":[9],"article-tag":[687,686],"class_list":["post-885","article","type-article","status-publish","format-standard","hentry","article-category-windows-commands","article-tag-netsh-advfirewall-tcp-open-port","article-tag-windows-command-prompt-firewall-rules"],"yasr_visitor_votes":{"stars_attributes":{"read_only":false,"span_bottom":false},"number_of_votes":4,"sum_votes":15},"_links":{"self":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article\/885","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/types\/article"}],"author":[{"embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/comments?post=885"}],"version-history":[{"count":0,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article\/885\/revisions"}],"wp:attachment":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/media?parent=885"}],"wp:term":[{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article-category?post=885"},{"taxonomy":"article-tag","embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article-tag?post=885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}