Din IP: Ukendt · Din Status: BeskyttetUbeskyttetUkendt

Spring til hovedindholdet

How to find your port number

You might sometimes need to open a port to make applications work properly. You’ll need to know its number to do that, but how are you supposed to find it? It’s not as complicated as it might sound. Read on to find out how.

How to find your port number

What is a port number?

A port number is a way of identifying a specific application or process over a network. Every device connecting to the internet uses ports so that different applications could establish connections simultaneously.

If you browse the web, download files and use a printer at the same time, all these operations use different ports. For example, File Transfer Protocol (FTP) data transfers use port number 20 while HTTPS uses 443. There are 65,535 ports in total, but not all of them are available for regular users.

What is my port number?

While an IP address is attached to a device, port numbers are attributed to different processes and connections within that device. They are used to make these processes identifiable on the internet and help the receiving end on the web to identify the operation and take the right action.

Port numbers are like extensions to your IP address. For example, your computer’s IP address is 192.168.11.1, while the file transfer protocol (FTP) port number is 20. Thus, the IP for an open FTP port would be 192.168.11.1:20. By seeing this address, the server will “understand” your request.

Port numbers have different numbers and types. Every different action has its own port so that they can all coexist under the same IP address:

  • Well-known ports (0 to 1023) are used by major companies like Apple or MSN for their services.
  • Registered ports (1024 to 49151) can be assigned to specific services by request.
  • Dynamic or private ports (49152 to 65536) can be used by everyone for private servers and temporary purposes.

Check out our brief video on finding your port number below.

TCP vs. UDP

Port numbers have different numbers and types. Every different action has its own port so that they can all coexist under the same IP address:

  • TCP is more reliable as it always must establish endpoints between sending and receiving locations for the connection to happen. It guarantees that packets of data will always reach the addressee. It also tracks data to make sure it isn’t lost, meaning that the data arrives securely and in order. This internet protocol is used for web browsing or email applications;
  • UDP is faster but less reliable as it does not require an established connection. It also allows data to be sent in the wrong order. It doesn’t check data as thoroughly as TCP, so it is more lightweight and quicker. It is employed for operations where speed is an essential factor, like online gaming, video conferences, etc. You can read more about TCP and UDP in this article.

Why do you need to know your port number?

It allows you to have more control over your software. Because applications use specific ports, they should always be open for them to work properly. On the other hand, closing them can improve your security. If one of your apps can’t connect to the internet, you might want to check the relevant port and open or close it. You can also open a port on your router and assign it to any device or program by using port forwarding.

Firewalls can block some ports, so manually allowing them to bypass firewalls may be necessary.

How to find your port number on Windows

  1. Type “Cmd” in the search box.
  2. Open “Command Prompt.”command prompt
  3. Enter the netstat -a command to see your port numbers.netstat command in command line window

How to find your port number on Mac

  1. Open “Terminal.”spotlight window on mac
  2. Type the netstat -a | grep -i “listen” command and press “Enter” to see the list of opened ports.netstat command in terminal

How to open a port on Windows 10 and 11

  1. Go to “Control Panel.”control panel in start menu
  2. Go to “System and Security” -> “Windows Defender Firewall.”windows defender firewall
  3. Select “Advanced settings.”advanced settings in windows defender firewall
  4. Click on “Inbound Rules” on the left.inbound rules action
  5. Click on “New Rule” on the right.new rule settings
  6. Choose the “Port” option.port option in rule type wizard
  7. Go to “Protocol and Ports.” Choose the protocol (TCP or UDP) and add the port number into the “Specific Local Ports” section. You can find the list here.specific local ports for TCP
  8. Press “Next” and choose “Allow the connection.”allow the connection option
  9. Select what type of network this rule applies to and click “Next.”applying rule for private domain and public
  10. Add a name and short description to the rule and click “Finish.”specify rule and description for this rule

To close the port, simply remove the rule.

How to open a port on Mac

It is very easy to open a port on Mac. Here’s how:

  1. Open “System Preferences.”system preferences on mac
  2. Go to “Security and Privacy” > “Firewall” > “Firewall Options.”firewall options in firewall tab
  3. Tap plus sign.plus sign
  4. Choose an application and click “Add.”choosing app
  5. Make sure that “Allow Incoming Connections” is turned on.confirm allowed incoming connections
  6. Click “OK.”

To close the port, simply remove it from the list.

Common port numbers

Port numberDescription
20FTP (File Transfer Protocol) data transfer
21FTP (File Transfer Protocol) command control
22SSH (Secure Shell)
23Telnet
25SMTP (Simple Mail Transfer Protocol)
53DNS (Domain Name System)
67, 68DHCP (Dynamic Host Configuration Protocol)
80HTTP (Hypertext Transfer Protocol)
110POP3 (Post Office Protocol)
119NNTP (Network News Transfer Protocol)
123NTP (Network Time Protocol)
143IMAP (Internet Message Access Protocol)
161SNMP (Simple Network Management Protocol)
194IRC (Internet Relay Chat)
443HTTPS (Hypertext Transfer Protocol Secure)
546, 547DHCPv6 (Dynamic Host Configuration Protocol version 6)

Once a port number has been configured on your router, you won’t typically need to change it anytime soon. Thankfully, port numbers aren’t long, complex strings of code and are easy to commit to memory after several uses.

Don’t forget that each open port on your router is a potential attack vector for a hacker or cyber criminal. Use your open ports sparingly and don’t forget to secure your router with NordVPN.

Want to find out more?

Check out to NordVPN on YouTube