Connect to Hyper-V VM on Windows Server 2022 using Host's IP Address without Public IP

Abstract: Configure Windows Firewall port forwarding to route RDP traffic from the host IP to a Hyper-V VM on an internal network without a public IP.

Created: 2026-10-05 by
You can connect to a Hyper-V virtual machine on Windows Server 2022 using the host's IP address by configuring port forwarding through Windows Firewall or PowerShell. This method routes incoming Remote Desktop Protocol (RDP) traffic from the host to the specific VM without requiring a public IP address, allowing local network access via a custom port mapping.

Understanding the Network Topology

When you run a Hyper-V virtual machine, it typically operates on an internal virtual switch or a private network that is isolated from the physical network interface of the host server. While this provides security, it prevents external devices on your local area network (LAN) from reaching the VM directly using its internal IP. The goal is to create a bridge where the host acts as a gateway, accepting connections on a specific port and redirecting them to the VM’s RDP service. This setup is particularly useful for administrators who manage multiple servers locally but lack the budget or technical capability to assign public IPs to every virtual instance. By leveraging the host’s existing network connectivity, you maintain a secure boundary while enabling convenient remote management. For more details on managing Hyper-V window behaviors during these sessions, see Restoring Auto Zoom Level in Hyper-V VM Window.

Step 1: Verify Host and VM Network Settings

Before configuring forwarding rules, ensure both the host and the guest are on compatible networks. If your VM is connected to an "External" virtual switch, it may already have direct network access, making port forwarding unnecessary. However, if you are using an "Internal" or "Private" switch, the VM will only communicate with the host and other VMs on that same virtual network. Check the IP configuration of your VM by opening the command prompt inside the guest OS and running ipconfig. Note the IPv4 address. Then, verify the host’s IP address on the same subnet. If they are not on the same subnet, you must adjust the virtual switch settings or assign static IPs to ensure reachability. Misconfigured subnets are the most common reason why port forwarding fails even when rules are correctly applied.

Step 2: Configure Port Forwarding with Netsh

Windows Server 2022 includes the netsh utility, which allows you to configure advanced TCP/IP settings including port redirection. To forward traffic from the host to the VM, you need to add a port proxy rule. Open PowerShell or Command Prompt as Administrator on the host server. Execute the following command structure, replacing placeholders with your actual values:
netsh interface portproxy add v4tov4 listenport=3390 listenaddress=0.0.0.0 connectport=3389 connectaddress=
In this example, we listen on port 3390 on all interfaces (0.0.0.0) and forward it to port 3389 (the default RDP port) on the VM’s IP address. You can choose any available high-numbered port for the listen address to avoid conflicts with other services. After running this command, verify the rule exists by typing netsh interface portproxy show all. This step creates the logical pathway for data packets to travel from the host’s network card to the virtual NIC of the guest.

Step 3: Adjust Windows Firewall Rules

Even with port forwarding configured, Windows Firewall will block incoming connections unless explicitly allowed. You must create an inbound rule on the host server to permit traffic on the listen port you chose (e.g., 3390). Open the Windows Defender Firewall with Advanced Security console. Navigate to Inbound Rules and select New Rule. Choose Port, then TCP, and specify the listen port (3390 in our example). Allow the connection for all profiles (Domain, Private, Public) depending on your network environment. Finally, give the rule a descriptive name like "Hyper-V RDP Forwarding". Without this rule, the firewall drops the packets before they reach the port proxy engine. For users experiencing issues with Remote Desktop connections after changing network settings, refer to Connecting Hyper-V (Kaliguest) using Remote Desktop (Win10 host): Troubleshooting without starting the Hyper-V instance.

Step 4: Connect Using the Host IP

Once the port proxy and firewall rules are active, you can initiate a Remote Desktop Connection from any computer on the same LAN. Open the Remote Desktop client (mstsc) and enter the host server’s IP address followed by a colon and the listen port. For example: 192.168.1.100:3390. The client will establish a connection to the host on port 3390, which immediately redirects the session to the VM on port 3389. You will be prompted for the credentials of the VM, not the host. This seamless transition allows you to manage the VM as if it were physically connected to the network. Ensure that the VM’s own firewall also allows RDP traffic, although this is usually enabled by default on Windows Server guests. If you encounter latency or input lag during these sessions, consider optimizing your display settings. See Seamless RDP Experience with Hyper-V Enhanced Session and Mouselag Remote Desktop (mstsc) for tips on reducing mouselag and improving visual performance.

Troubleshooting Common Issues

If the connection fails, first check if the port proxy rule is active using netsh interface portproxy show all. Ensure no typos exist in the VM IP address. Second, verify that the VM is powered on and has network connectivity. Third, confirm that the firewall rule on the host is enabled and not overridden by a group policy. Finally, test connectivity from another machine on the network to isolate whether the issue is local to your client PC or systemic.

Frequently Asked Questions

Can I use this method to connect from outside my local network?

No, this method relies on the host’s local IP address and does not expose the VM to the internet. To connect remotely over the public internet, you would need a VPN or a dynamic DNS service with proper port forwarding on your router.

Does this affect other services running on the host?

Generally, no. Since you are listening on a specific non-standard port (like 3390), it avoids conflicts with the host’s own RDP service on port 3389. Just ensure the chosen listen port is not used by another application on the host.

What happens if the VM’s IP address changes?

If the VM uses DHCP and receives a new IP, the port proxy rule will break because it points to the old address. You should either assign a static IP to the VM within the virtual switch settings or update the connectaddress in the netsh rule manually.

Is it possible to forward multiple VMs using different ports?

Yes, you can create multiple port proxy rules. Each VM can listen on a unique port on the host (e.g., 3391 for VM1, 3392 for VM2) and forward to their respective internal IPs and standard RDP port 3389.

Why am I getting a "Network Path Not Found" error?

This error usually indicates that the host cannot route traffic to the VM’s IP address. Check the VM’s network adapter status in Hyper-V Manager and ensure the virtual switch is set to allow communication between the host and the guest.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More