Explore the whole video on YouTube. However, the short explanation and resources are provided on this page. Feel free to read it.
What are Ports?
In the context of computer networking, a port is a communication endpoint. At the software level, within an operating system, a port is a logical construct that identifies a specific process or a type of network service.
Port Numbers: Ports are identified by port numbers, ranging from 0 to 65535. They are divided into three categories:
Well-Known Ports (0-1023): These are used by system or well-known services.
Registered Ports (1024-49151): These are used by user or registered services.
Dynamic or Private Ports (49152-65535): These are used for dynamic or private purposes, often temporarily for communication between client and server applications.
Services: These refer to specific functions provided by software applications, like web servers, email servers, and file transfer services, which listen on specific ports to receive and respond to network requests.
What are well known ports and services?
Here's a list of some well-known ports and the services typically associated with them.
Client-Server Model: In most cases, the server listens on a well-known port number for incoming requests from clients. For instance, a web server typically listens on port 80 for HTTP requests.
Firewalls and Port Forwarding: Network administrators often manage access to services by controlling traffic on specific ports through firewalls. They may also use port forwarding to redirect requests from one port to another.
Understanding ports and their associated services is crucial for network configuration, security, and troubleshooting.
What is port forwarding?
Port forwarding is a networking technique used to redirect communication requests from one address and port number combination to another while the packets traverse a network gateway, such as a router or firewall. This is commonly used to make services on a private network accessible to hosts on the other side of a gateway.
Public and Private Networks:
Public IP Address: The IP address that is accessible from the outside world (the internet).
Private IP Address: The IP address used within a private network, not directly accessible from the internet.
Port Forwarding Process:
An external request comes to the public IP address of a router on a specific port.
The router forwards this request to a specific internal IP address and port within the private network.
What is Port Tunneling?
Port tunneling, often referred to as port forwarding in the context of secure communication, is a technique used to securely transmit data between networks or devices by encapsulating the data packets within another protocol. This is typically done using protocols like SSH (Secure Shell) or VPN (Virtual Private Network) to ensure the data is encrypted and protected during transmission.
Port tunneling is a versatile and powerful technique that enhances security, accessibility, and flexibility in network communication. By encapsulating and encrypting data, it provides a secure means to transmit information across different network environments.
What is NGROK?
Ngrok is a tool that creates secure tunnels from a public endpoint to a locally running web service. It enables developers to expose their local development environment to the internet, making it easier to test and demonstrate web applications, APIs, and other services without deploying them to a production environment.
Secure Tunnels: Ngrok creates secure tunnels to your localhost, allowing you to expose a local server to the internet securely.
Custom Subdomains: With Ngrok, you can assign a custom subdomain for your tunnel, making it easier to access and share.
HTTPS Support: Ngrok provides HTTPS endpoints, ensuring that the data transmitted is encrypted and secure.
Web Interface: Ngrok offers a web interface that allows you to inspect HTTP traffic and debug requests in real-time.
Portability: Ngrok is a portable tool that can be run on various operating systems, including Windows, macOS, and Linux.
Authentication and Access Control: You can protect your tunnels with HTTP basic authentication and restrict access to specific IP addresses.
How NGROK Works?
Start a Local Server: Begin by running your application or web server on a local port.
Run Ngrok: Use the Ngrok command to create a tunnel to your local server. For example, to tunnel a local server running on port 8080, you would run:
> ngrok http 8080
Access the Public URL: Ngrok will provide you with a public URL (both HTTP and HTTPS) that forwards requests to your local server.
Have any Questions?
If you have any more question about this particular thing or any general question is also considered, in that case, you can fill this google form.