How to port forward to a VM in KVM running on RHEL host?

Solution Verified - Updated -

Issue

  • On a RHEL host, there's a VM running over KVM, connected using NAT to the external network. Incoming connections to a particular port of the VM has to be forwarded by the host.
  • For instance, there's an application running on port 8080 of the VM with IP address 192.168.122.87. Incoming request to port 8080 on the host with IP 10.65.223.41 has to be forwarded to the VM.

Environment

  • Red Hat Enterprise Linux

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.