What is Port Forwarding | How can convert local IP to public IP

 Port forwarding is a networking technique used to allow external devices or users to access services or applications running on a specific device within a private local network (e.g., a home or business network). It involves forwarding network traffic from a specific port on the router to a corresponding port on a device within the local network.



Here's how port forwarding works:



  1. Local Network: In a typical home or business network, multiple devices (computers, game consoles, security cameras, etc.) are connected to a router. Each device has a private local IP address assigned by the router.
  2. Public IP Address: The router is also connected to the internet and has a public IP address that's used for communication with external networks (the internet). This public IP address is unique to your network and is assigned by your Internet Service Provider (ISP).

  3. Ports: Ports are like virtual doors on a computer or device. They allow different types of network traffic to enter or exit the device. Ports are numbered, and specific services or applications often use predefined port numbers. For example, web traffic typically uses port 80, and email traffic often uses port 25.
  4. Port Forwarding: When you set up port forwarding on your router, you tell the router to forward incoming network traffic on a specific external (public) port to a specific internal (private) IP address and port on one of the devices in your local network.
  5. Here's a simplified example:
  6. You want to host a game server on your computer (192.168.1.100) for a game that uses port 12345.
  7. You configure your router to forward incoming traffic on port 12345 to the IP address 192.168.1.100 and port 12345.
  8. When someone from the internet tries to connect to your game server, they use your public IP address and port 12345.
  9. The router receives the incoming traffic on port 12345 and forwards it to your computer (192.168.1.100) on port 12345.
  10. Your computer processes the game server's data, and the game connection is established.
  11. Port forwarding is commonly used for various purposes, including:
  12. Hosting Servers: To host game servers, web servers, FTP servers, or other services from within your private network, making them accessible from the internet.
  13. Remote Access: To access devices within your local network remotely, such as security cameras, home automation systems, or remote desktop connections.
  14. Gaming: To improve online gaming experiences by ensuring that the necessary ports are open for game servers and voice chat services.
  15. File Sharing: For peer-to-peer file sharing or running BitTorrent clients.


Port forwarding can be a useful tool, but it should be configured with caution because it can expose your devices to the internet and potential security risks. Always ensure your network is properly secured, and consider using other security measures like firewalls and strong passwords in conjunction with port forwarding.

port forwarding through your router's



Port forwarding is a configuration process that you typically perform through your router's web-based interface. Here are the general steps to set up port forwarding on your router:

Note: Before proceeding, make sure you have administrative access to your router, and you know its IP address. The exact steps can vary depending on your router's make and model, so consult your router's documentation for specific instructions.

Access Your Router's Web Interface:


  • Open a web browser on a device connected to your local network.
  • Enter your router's IP address in the browser's address bar. Common router IP addresses are "192.168.0.1" or "192.168.1.1." If you're not sure, you can usually find this information on a sticker on your router or in the router's documentation.

Log In to the Router:


  • You will be prompted to log in to your router's web interface. Enter the router's username and password. If you haven't changed these from the default values, they are often found on the router or in the router's manual. Be sure to change these default credentials for security reasons.

Locate the Port Forwarding Section:

  • The location of the port forwarding settings can vary depending on your router's make and model. Look for a section or menu item labeled "Port Forwarding," "Port Mapping," "NAT Forwarding," or something similar.

Create a Port Forwarding Rule:


Within the port forwarding section, you'll typically find options to create a new port forwarding rule. Here's what you'll need to configure:
  • Service Name: Give the rule a descriptive name like "Game Server" or the name of the service you're setting up.
  • Port Range: Specify the external (public) port or range of ports that should be forwarded. This is the port number that people from the internet will use to connect to your service.
  • Protocol: Choose the protocol used by the service, often TCP, UDP, or both.
  • Internal IP Address: Enter the local IP address of the device in your network where the service is running. You can find this IP address by running the "ipconfig" command on Windows or the equivalent on other operating systems.
  • Internal Port: Specify the internal port number. This is the port on the local device where the service is listening.

Save or Apply the Settings:


  • Once you've filled in the necessary information, save or apply the settings in your router's interface.

Restart the Router (if necessary):


  • In some cases, you may need to restart your router for the changes to take effect.

Test the Port Forwarding:


  • To ensure that your port forwarding is working correctly, you can use an online port checker tool to see if the specified port is open and accessible from the internet. Simply search for "port checker" online, and you'll find various tools to test your port forwarding setup.
  • After completing these steps, the specified external port should now be forwarded to the internal device, allowing external users or services to access the internal service running on that device. Make sure your firewall settings on the local device are also configured to allow incoming connections on the specified port for the service you want to access.


port forwarding without routers

Port forwarding is a network configuration feature that is typically performed on a router or gateway device. It allows you to direct incoming traffic from a specific port to a specific device on your local network. If you do not have a router or gateway device, it becomes more challenging to achieve port forwarding, and you may need to explore alternative solutions depending on your network setup.

Here are a few considerations and potential alternatives:

Direct Connection to the Internet: If you are directly connected to the internet without a router, your device is likely assigned a public IP address. In this scenario, you do not need to perform port forwarding because incoming traffic will already reach your device directly. However, you need to ensure that your device's firewall settings allow incoming connections on the desired port.

Use a Software Firewall: If you have a software firewall installed on your computer (e.g., Windows Firewall), you can configure it to allow incoming traffic on specific ports. This is not exactly port forwarding but can achieve a similar result for services running on your computer. Here's how to do it in Windows:

  • Open Windows Defender Firewall (search for it in the Start menu).
  • Click on "Advanced settings."
  • In the left pane, click on "Inbound Rules."
  • Click on "New Rule..." in the right pane.
  • Follow the wizard to create a new rule allowing incoming traffic on the desired port.
Consider a Cloud Solution: If you want to make services on your computer accessible from the internet without a router, you can explore cloud-based solutions. For example, you can use cloud hosting services like AWS, Azure, or Google Cloud to host your services in the cloud, and these services allow you to control inbound traffic to your virtual machines or containers. This is not traditional port forwarding but can achieve similar results by hosting your services in the cloud.

Mobile Hotspot and Cellular Networks: If you are using a mobile hotspot or cellular network to connect to the internet, port forwarding might not be possible because cellular networks typically use Network Address Translation (NAT) and do not provide public IP addresses directly to devices. In this case, you may need to explore VPN or tunneling solutions to make your device accessible from the internet.

Please note that without a router or a gateway device, your options for controlling incoming traffic become limited, and the specific solution will depend on your network setup and requirements. In many cases, having a router is the most practical way to manage incoming traffic and security for devices on a local network.

Post a Comment

0 Comments