What is My Port Number?
Since certain games and programs use different ports to function, knowing your port numbers can be useful when it comes to configuring firewalls or give certain apps access. Now, are you wondering what is my port number? Here you can learn the steps to find your port number on any OS.
How to Find Your Port Number
Here’s how to find your port number on Windows 8, Windows 10, or Mac device:
How to find ports being used in Windows
Command Promptby typing
cmdin the search box.
ipconfigat the prompt This provides you with some outputs about your IP address. Note that if you are behind a router, you may not see your public IP. You may instead see a router IP, such as 192.168.1.1 or 192.168.2.31. If you want your public IP, you can go to What is my IP.
- Now, type
netstat -afor a list of connections and port numbers that are currently being used. Note that the output of this will take a good ten minutes or so.
How to find the port number on macOS
System Preferencesby clicking on the Apple icon.
- Go to
- Choose your network and then click
- Select the
- Enter the
IP addressyou want to scan. If you need to know your IP address, go to What is my IP.
What is a Port Number?
To put it simply, a port number is the means through which a specific message is identified when it’s forwarded to a server. As there are 65,535 ports for each IP address, a specific designation would refer to one or several of those thousands of ports. Depending upon the service type, the message will either be associated with a TCP or a UDP port.
TCP vs. UDP
TCP stands for Transmission Control Protocol and sends the data after establishing a connection. which makes it more reliable than UDP for data transfers. On the other hand, UDP stands for User Datagram Protocol and sends data packets connection-less which makes it lightweight and significantly faster than TCP. You don’t really need to be particularly concerned with the details of TCP versus UDP here; port forwarding might apply to TCP or UDP, though. For more information,
Read: What is Port Forwarding?
What is the Difference between an IP Address and a Port Number?
A computer network is made up of a collection of devices – such as routers, printers, laptops, and cameras – that are connected together for sharing data and resources.
Each device within the network has a unique numerical label allocated to it, known as the Internet Protocol (IP) address. This helps with two main functions:
- Network or host identification
- Location addressing
A port number works in tandem with the IP address to direct specific traffic to a specific destination on a network. This can be done to optimize performance or to grant access altogether, as in the case of a web server. If the webserver port wasn’t open, you wouldn’t be able to run one, and people wouldn’t be able to connect to you.
How to use a port number for Port Forwarding?
Port Forwarding is best-suited for hosting servers, allowing P2P file transfers, seamless downloading, or running remote desktop applications. It allows you to remotely access devices on a private network using port numbers. You can forward ports behind CGNAT, which most ISPs perform to conserve IP bandwidth. For more information,
To use your port number for port forwarding, follow these steps:
- Type your router’s IP into the address bar on the web browser.
- Enter your router’s credentials to view the settings menu.
- Navigate to the port forwarding section of your router.
- Create a Port Forwarding rule (Add New or Add Custom Service).
- Enter the IP address of your gaming device in your router in the correct box.
- Type the TCP and UDP port numbers (Example: 25565 for Minecraft server).
- Restart your router to let the changes take effect.
Once your changes take effect, you can host a server, download P2P files, or access remote devices.
Frequently Asked Questions
The following are answers to some of the most frequently asked questions about port numbers.
Why Do I Need to Know my Port Number?
You need to use different ports for specific applications and that’s why you should know about port numbers. With the help of port numbers, you can:
- Configure security firewalls on any device, be it Windows or Mac
- Filter out IP addresses that range from mail service (SMTP), file transfer (FTP), web service (HTTP)
- Learn which incoming port is receiving or sending encrypted data and which one aren’t
- Enhance your online security without compromising private data
What is an IP Address?
An IP address is simply an address on the internet. Just like homes have addresses, so do computers connected to the internet. There are two types of IP addresses: public and private. The private IP is the address allocated to your device by your router. The public IP address is provided by your ISP and it is the address that allows you to explore the internet. You can easily check your IP address via an IP lookup tool. Visit the IP lookup tool, and it will show your public IP address as well as IP location, ISP and even operating system.
How do I find the port number of a specific IP address?
All you have to do is type “netstat -a” on Command Prompt and hit the Enter button. This will populate a list of your active TCP connections. The port numbers will be shown after the IP address and the two are separated by a colon. For instance, if your IP address is something like 192.168.45.2 and you’re being displayed an entry for 192.168.45.2:57961, it means the port number 57961 is open and possibly in use.
What does a port scanner do?
Basically, a port scanner probes a host or server for open ports. These applications are commonly used by administrators to verify network security policies (but usually to see that ports are CLOSED, not open). In fact, even hackers use port scanners to identify open ports on a host so they can exploit any vulnerabilities attributed to those open ports.
Is my port open?
There are many port checking tools available on the internet that allow you to check your public (external) IP address and detect if there are any open ports associated with your IP address. This can help you in checking if port forwarding has been set up correctly on your router, or if a firewall is getting in the way of your server applications.