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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content