Search code examples
nginxportforwarding

Nginx: one port to multiple IP fowarding


I am new to Nginx, and I am looking to have my router port forward a No Machine remote access (NX) request to a Nginx server which would then forward the request again to the correct Virtual Machine for viewing. I am trying to do this because my router only allows one port to one IP forwarding. I want one port to multiple IP forwarding. How would one go about doing this? The issue seems to be that No Machine only allows me to specify my router IP and no way of having Nginx know which machine to forward the request to that it is given from the router.


Solution

  • NginX is of no use here. It will work for HTTP and HTTPS , so Ignore it.

    What you're actually thinking of is Port address translation. However PAT will work only when the connection is initiated from the secured side (your virtual machines in this case). So again, this is not helpful either.

    The only other possible way is to have individual 1-to-1 NAT. Not sure about the type of router you have, but I had done something similar in the past using IPTables.

    Besides, this question is more suited to ServerFault where you might get better responses than on StackOverflow.