Port Forwarding Hotspot to PC on Windows 11: A Step-by-Step Guide
Port forwarding, also referred to as port mapping, enables external internet traffic to establish a connection with a computer situated within a private network. In this article, we will explore how to forward a hotspot to a PC on Windows 11/10.
This process sets up a dedicated connection between a device and the internet, allowing certain applications to circumvent network restrictions and communicate with the device or service. By modifying the network settings on your PC, you can direct incoming information to the appropriate application via specific ports assigned for this function.
For instance, if you’re hosting a Minecraft server for your friends, you’d need to instruct your router to forward their connections to the PC running the server. In this scenario, port forwarding specifies which incoming requests should be redirected to your server.
Steps to Forward a Hotspot to a PC in Windows 11/10
You can set up port forwarding on Windows, whether on physical or virtual machines, by using the following methods:
- Windows Defender Firewall
- Windows Terminal
- NAT rules within Virtual Machines
Be sure you have administrative privileges to perform these actions. Additionally, verify that your mobile hotspot is activated before proceeding.
Determine the IP Address Range of Your Windows Hotspot
You can find the IP address range of your Windows mobile hotspot by using the Command Prompt, PowerShell, or the Network and Sharing Center. Here’s how:
- Press Win + R, type cmd, and hit Enter.
- Input
ipconfig
and press Enter. - Look for the Local Area Connection adapter, vEthernet (Internal Network), or a similar label that represents the mobile hotspot adapter.
Within this adapter’s section, locate the field labeled IPv4 Address. This corresponds to the IP address utilized by your PC’s mobile hotspot. Generally, the IP address range of the mobile hotspot appears as x.y.z.1/24, indicating all devices connected to the hotspot can obtain IP addresses from x.y.z.1 to x.y.z.24.
Forwarding a Hotspot Using Windows Firewall, Terminal, or NAT Rules
For demonstration purposes, let’s use the IP address 192.168.1.10. Be sure to substitute this with the IP you find on your system.
1] Using Windows Firewall
To set up port forwarding via the Windows Defender Firewall, follow these necessary steps:
- Type firewall in the Desktop Search Bar and select Windows Defender Firewall from the list.
- In the subsequent window, right-click on Inbound Rules and select New Rule.
- Select the option for ports, proceed with Next, and specify the port type to be configured—choosing between TCP or UDP.
- Enter the port numbers under Specific Local Ports to be forwarded.
- Choose Allow the connection, then click Next.
- Identify the profile applicable for the rule (Domain, Private, or Public) and continue by clicking Next.
- Input a name for the rule and click Finish to finalize the setup.
2] Using Windows Terminal
Port forwarding can also be configured via Windows Terminal by executing the following steps:
- Enter cmd in the Desktop Search Bar and select Command Prompt.
- In the command prompt, type ipconfig to view your network information.
- Note down the IPv4 address from the Network Adapter’s details.
- Enter the command below to add the port forwarding rule:
netsh interface portproxy add v4tov4 listenport=8080 listenaddress=192.168.1.10 connectport=8080 connectaddress=192.168.1.10
In this command:
- netsh interface portproxy add v4tov4: Establishes a new port forwarding rule for IPv4 traffic.
- listenport=8080: Defines the local port (8080) for listening to all incoming connections.
- listenaddress=192.168.1.10: Sets the static local IP for incoming traffic listening.
- connectport=8080: Indicates the port number on the remote machine for incoming redirection.
- connectaddress=192.168.1.10: Defines the IP of the remote system where incoming traffic will be sent.
This command effectively forwards all incoming traffic directed at port 8080 on the local machine (192.168.1.10) to the same port (8080) on the identical IP address. The reason for this loopback setup is that both systems share the same port and IP, allowing services within the same system to be exposed without external network exposure.
3] Setting NAT Rules in a Virtual Machine
Port forwarding also enables access to services on a Virtual Machine. To configure a VM for port forwarding, follow these steps:
- Open Hyper-V Manager by searching for it in the Desktop Search Bar.
- In the Hyper-V Manager window, navigate to Virtual Switch Manager and select New Virtual Network Switch.
- Choose between Internal or Private for the virtual switch and assign it a name.
- Click on Add Hardware > Network Adapter to attach a network adapter and select the virtual switch created earlier within the network adapter settings.
- Now, create the NAT rule by launching Windows Terminal on the VM and entering the following command:
netsh interface portproxy add v4tov4 listenport=80 listenaddress=0.0.0.0 connectport=8080 connectaddress=192.168.1.10
I trust this information proves helpful.
How to Add, Remove, and Modify Port Forwarding Rules in Windows?
As previously mentioned, you can establish a port forwarding rule using:
netsh interface portproxy add v4tov4 listenport= listenaddress= connectport= connectaddress=
To delete an existing rule, enter the following command in the terminal:
netsh interface portproxy delete v4tov4 listenport= listenaddress=
Disabling a rule requires you to delete it, while enabling one necessitates creating a new rule.
Can I Port Forward to Multiple Devices?
Yes, you can set up port forwarding for several devices or computers using the same ports. You can create port forwarding rules in Windows Firewall, ensuring that both TCP and UDP protocols are selected and that you input the corresponding IP addresses for each computer.
Leave a Reply