{"id":21638,"date":"2026-10-30T11:44:00","date_gmt":"2026-10-30T08:44:00","guid":{"rendered":"https:\/\/sunucun.com.tr\/blog\/?p=21638"},"modified":"2026-10-30T11:44:00","modified_gmt":"2026-10-30T08:44:00","slug":"how-to-check-open-ports","status":"publish","type":"post","link":"https:\/\/sunucun.com.tr\/blog\/how-to-check-open-ports\/","title":{"rendered":"How to Check Open Ports: Windows, Linux and Online Tools"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_89 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/sunucun.com.tr\/blog\/how-to-check-open-ports\/#What_Is_a_Port_and_Why_Check_It\" >What Is a Port and Why Check It?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/sunucun.com.tr\/blog\/how-to-check-open-ports\/#Port_States_Open_Closed_and_Filtered\" >Port States: Open, Closed and Filtered<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/sunucun.com.tr\/blog\/how-to-check-open-ports\/#Checking_Ports_on_Windows\" >Checking Ports on Windows<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/sunucun.com.tr\/blog\/how-to-check-open-ports\/#Testing_whether_a_remote_port_is_open\" >Testing whether a remote port is open<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/sunucun.com.tr\/blog\/how-to-check-open-ports\/#Seeing_which_ports_are_listening_on_your_computer\" >Seeing which ports are listening on your computer<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/sunucun.com.tr\/blog\/how-to-check-open-ports\/#Checking_Ports_on_Linux_and_macOS\" >Checking Ports on Linux and macOS<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/sunucun.com.tr\/blog\/how-to-check-open-ports\/#Remote_port_test\" >Remote port test<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/sunucun.com.tr\/blog\/how-to-check-open-ports\/#Listing_listening_ports_on_a_server\" >Listing listening ports on a server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/sunucun.com.tr\/blog\/how-to-check-open-ports\/#Scanning_your_own_server_with_nmap\" >Scanning your own server with nmap<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/sunucun.com.tr\/blog\/how-to-check-open-ports\/#Online_Port_Check_Tools\" >Online Port Check Tools<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/sunucun.com.tr\/blog\/how-to-check-open-ports\/#What_to_Do_If_a_Port_Wont_Open\" >What to Do If a Port Won&#8217;t Open<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/sunucun.com.tr\/blog\/how-to-check-open-ports\/#Port_Checks_for_Security\" >Port Checks for Security<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/sunucun.com.tr\/blog\/how-to-check-open-ports\/#Frequently_Asked_Questions\" >Frequently Asked Questions<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/sunucun.com.tr\/blog\/how-to-check-open-ports\/#Is_checking_ports_legal\" >Is checking ports legal?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/sunucun.com.tr\/blog\/how-to-check-open-ports\/#The_port_shows_as_open_but_I_cant_connect_Why\" >The port shows as open but I can&#8217;t connect. Why?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/sunucun.com.tr\/blog\/how-to-check-open-ports\/#Can_I_check_a_port_with_Telnet\" >Can I check a port with Telnet?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/sunucun.com.tr\/blog\/how-to-check-open-ports\/#How_do_I_check_UDP_ports\" >How do I check UDP ports?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<p>A <strong>port check<\/strong> tests whether a specific port on a device or server is reachable (open) from outside. The quickest methods are the <code>Test-NetConnection<\/code> command on Windows, <code>nc<\/code> on Linux and macOS, or an online port checker run against your own IP address.<\/p>\n<p>In this guide we explain how to check open ports, what &#8220;open&#8221;, &#8220;closed&#8221; and &#8220;filtered&#8221; results mean and what to do if a port won&#8217;t open.<\/p>\n<p><em>Note: only scan ports on your own devices or systems you are authorised to manage. Scanning other people&#8217;s systems without permission may breach terms of use and the law.<\/em><\/p>\n<h2><span class=\"ez-toc-section\" id=\"What_Is_a_Port_and_Why_Check_It\"><\/span>What Is a Port and Why Check It?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A port is a numbered gate used to separate the network traffic of applications on a device. For example, websites use ports 80 and 443, SSH uses 22 and Remote Desktop uses 3389.<\/p>\n<p>A port check is usually needed:<\/p>\n<ul>\n<li>when a game or application server can&#8217;t be reached from outside;<\/li>\n<li>to confirm that port forwarding on your router works;<\/li>\n<li>to see, for security, whether unnecessary ports are left open on your server.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Port_States_Open_Closed_and_Filtered\"><\/span>Port States: Open, Closed and Filtered<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<table>\n<thead>\n<tr>\n<th>State<\/th>\n<th>Meaning<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Open<\/strong><\/td>\n<td>An application is listening on the port and accepting connections.<\/td>\n<\/tr>\n<tr>\n<td><strong>Closed<\/strong><\/td>\n<td>The device is reachable but no application is listening on that port.<\/td>\n<\/tr>\n<tr>\n<td><strong>Filtered<\/strong><\/td>\n<td>A firewall is blocking the packets; no response comes back.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span class=\"ez-toc-section\" id=\"Checking_Ports_on_Windows\"><\/span>Checking Ports on Windows<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Testing_whether_a_remote_port_is_open\"><\/span>Testing whether a remote port is open<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Open PowerShell and run:<\/p>\n<p><code>Test-NetConnection server-address -Port 443<\/code><\/p>\n<p>If the result shows <strong>TcpTestSucceeded : True<\/strong>, the port is open.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Seeing_which_ports_are_listening_on_your_computer\"><\/span>Seeing which ports are listening on your computer<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><code>netstat -ano | findstr LISTENING<\/code><\/p>\n<p>To look for a specific port, use <code>netstat -ano | findstr :3389<\/code>. With the PID in the last column you can find which program is using the port in Task Manager.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Checking_Ports_on_Linux_and_macOS\"><\/span>Checking Ports on Linux and macOS<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Remote_port_test\"><\/span>Remote port test<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><code>nc -zv server-address 22<\/code><\/p>\n<p>A &#8220;succeeded&#8221; or &#8220;open&#8221; response means the port is open.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Listing_listening_ports_on_a_server\"><\/span>Listing listening ports on a server<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><code>sudo ss -tulpn<\/code><\/p>\n<p>This command shows all ports listening on TCP and UDP and the services that opened them.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Scanning_your_own_server_with_nmap\"><\/span>Scanning your own server with nmap<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><code>nmap -p 22,80,443 server-address<\/code><\/p>\n<p>nmap checks several ports at once and reports whether each is open, closed or filtered.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Online_Port_Check_Tools\"><\/span>Online Port Check Tools<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you&#8217;re checking the port of a device behind your router, the test has to be done <strong>from outside<\/strong>. Online port checkers try the IP and port you enter over the internet. For an accurate result:<\/p>\n<ul>\n<li>make sure the relevant application (game server, camera software, etc.) is running during the test;<\/li>\n<li>check that the IP shown by the tool matches your router&#8217;s external IP address.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"What_to_Do_If_a_Port_Wont_Open\"><\/span>What to Do If a Port Won&#8217;t Open<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ol>\n<li><strong>Is the application running?<\/strong> If no service is listening, the port shows as closed. Check first with <code>netstat<\/code> or <code>ss<\/code>.<\/li>\n<li><strong>Operating system firewall:<\/strong> add an inbound rule in Windows Defender Firewall. On Linux, define <code>ufw allow 25565\/tcp<\/code> or a firewalld rule.<\/li>\n<li><strong>Port forwarding on the router:<\/strong> forward traffic from the external port to your device&#8217;s local IP address. Don&#8217;t forget to give the device a static local IP.<\/li>\n<li><strong>CGNAT check:<\/strong> if your router&#8217;s external IP differs from the IP you appear with on the internet, your ISP may be using CGNAT. Port forwarding won&#8217;t work in that case; you&#8217;ll need to request a static\/public IP from your ISP.<\/li>\n<li><strong>Provider firewall:<\/strong> if your server is in a <a href=\"https:\/\/sunucun.com.tr\/en\/\" data-internallinksmanager029f6b8e52c=\"97\" title=\"Sunucun data center and infrastructure solutions\">data center<\/a>, there may be a separate network firewall in the panel. Open the rule there too.<\/li>\n<li><strong>The right protocol:<\/strong> some applications use UDP. A TCP test tells you nothing about a UDP port.<\/li>\n<\/ol>\n<h2><span class=\"ez-toc-section\" id=\"Port_Checks_for_Security\"><\/span>Port Checks for Security<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>Keep only the ports you actually use open on your server.<\/li>\n<li>Protect management ports such as SSH and RDP with IP restrictions, and change the default port if needed.<\/li>\n<li>Don&#8217;t expose database ports (MySQL 3306, PostgreSQL 5432) to the internet; allow access only from local or private networks.<\/li>\n<li>Use a firewall on your Linux servers and review its rules regularly.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Frequently_Asked_Questions\"><\/span>Frequently Asked Questions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Is_checking_ports_legal\"><\/span>Is checking ports legal?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Checking your own devices and the servers you manage is a common, legitimate administration task. Don&#8217;t scan other people&#8217;s systems without permission.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"The_port_shows_as_open_but_I_cant_connect_Why\"><\/span>The port shows as open but I can&#8217;t connect. Why?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The application may only allow local connections in its own settings (e.g. listening on <code>127.0.0.1<\/code>). Check that it listens on all interfaces (<code>0.0.0.0<\/code>).<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Can_I_check_a_port_with_Telnet\"><\/span>Can I check a port with Telnet?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Yes; if <code>telnet address port<\/code> connects, the port is open. However, the Telnet client is disabled by default on Windows. <code>Test-NetConnection<\/code> is more practical.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_do_I_check_UDP_ports\"><\/span>How do I check UDP ports?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Because UDP is connectionless, a definite result is harder to get. You can scan with <code>nmap -sU -p port address<\/code>, but the result is often &#8220;open|filtered&#8221;. The most reliable test is to connect with the application itself.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A port check tests whether a specific port on a device or server is reachable (open) from outside. The quickest methods are the Test-NetConnection command on Windows, nc on Linux and macOS, or an online port checker run against your own IP address. In this guide we explain how to check open ports, what &#8220;open&#8221;,&hellip;<\/p>\n","protected":false},"author":1,"featured_media":21639,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[1523],"tags":[],"class_list":["post-21638","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-network"],"_links":{"self":[{"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/posts\/21638","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/comments?post=21638"}],"version-history":[{"count":1,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/posts\/21638\/revisions"}],"predecessor-version":[{"id":21755,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/posts\/21638\/revisions\/21755"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/media\/21639"}],"wp:attachment":[{"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/media?parent=21638"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/categories?post=21638"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/tags?post=21638"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}